lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date: Fri, 15 Dec 2023 06:31:15 +0800
From: kernel test robot <lkp@...el.com>
To: Felix Fietkau <nbd@....name>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: drivers/net/wireless/mediatek/mt76/mt7915/main.c:498:17: sparse:
 sparse: dubious: x & !y

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ