From: kernel test robot <lkp@intel.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: drivers/net/wireless/mediatek/mt76/mt7915/main.c:498:17: sparse: sparse: dubious: x & !y
Date: Fri, 15 Dec 2023 06:31:15 +0800 [thread overview]
Message-ID: <202312150611.uXOFKEPm-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c7402612e2e61b76177f22e6e7f705adcbecc6fe
commit: b2491018587a4aca6ea398bbad8f142306b8e086 wifi: mt76: mt7915: fix monitor mode issues
date: 3 months ago
config: i386-randconfig-063-20231025 (https://download.01.org/0day-ci/archive/20231215/202312150611.uXOFKEPm-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231215/202312150611.uXOFKEPm-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312150611.uXOFKEPm-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/net/wireless/mediatek/mt76/mt7915/main.c:498:17: sparse: sparse: dubious: x & !y
vim +498 drivers/net/wireless/mediatek/mt76/mt7915/main.c
452
453 static int mt7915_config(struct ieee80211_hw *hw, u32 changed)
454 {
455 struct mt7915_dev *dev = mt7915_hw_dev(hw);
456 struct mt7915_phy *phy = mt7915_hw_phy(hw);
457 int ret;
458
459 if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
460 #ifdef CONFIG_NL80211_TESTMODE
461 if (phy->mt76->test.state != MT76_TM_STATE_OFF) {
462 mutex_lock(&dev->mt76.mutex);
463 mt76_testmode_reset(phy->mt76, false);
464 mutex_unlock(&dev->mt76.mutex);
465 }
466 #endif
467 ieee80211_stop_queues(hw);
468 ret = mt7915_set_channel(phy);
469 if (ret)
470 return ret;
471 ieee80211_wake_queues(hw);
472 }
473
474 if (changed & (IEEE80211_CONF_CHANGE_POWER |
475 IEEE80211_CONF_CHANGE_CHANNEL)) {
476 ret = mt7915_mcu_set_txpower_sku(phy);
477 if (ret)
478 return ret;
479 }
480
481 mutex_lock(&dev->mt76.mutex);
482
483 if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
484 bool enabled = !!(hw->conf.flags & IEEE80211_CONF_MONITOR);
485 bool band = phy->mt76->band_idx;
486 u32 rxfilter = phy->rxfilter;
487
488 if (!enabled) {
489 rxfilter |= MT_WF_RFCR_DROP_OTHER_UC;
490 dev->monitor_mask &= ~BIT(band);
491 } else {
492 rxfilter &= ~MT_WF_RFCR_DROP_OTHER_UC;
493 dev->monitor_mask |= BIT(band);
494 }
495
496 mt76_rmw_field(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_RXD_G5_EN,
497 enabled);
> 498 mt76_rmw_field(dev, MT_DMA_DCR0(band), MT_MDP_DCR0_RX_HDR_TRANS_EN,
499 !dev->monitor_mask);
500 mt76_testmode_reset(phy->mt76, true);
501 mt76_wr(dev, MT_WF_RFCR(band), rxfilter);
502 }
503
504 mutex_unlock(&dev->mt76.mutex);
505
506 return 0;
507 }
508
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-12-14 22:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202312150611.uXOFKEPm-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.