diff mbox series

[5/5] mac80211_hwsim: Declare support for Multi-BSSID

Message ID 1544184650-14124-5-git-send-email-jouni@codeaurora.org (mailing list archive)
State Superseded
Delegated to: Johannes Berg
Headers show
Series [1/5] cfg80211: Parsing of Multiple BSSID information in scanning | expand

Commit Message

Jouni Malinen Dec. 7, 2018, 12:10 p.m. UTC
This can be used to test cfg80211 support for Multi-BSSID scan result
parsing.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
---
 drivers/net/wireless/mac80211_hwsim.c | 1 +
 1 file changed, 1 insertion(+)

Comments

kernel test robot Dec. 19, 2018, 12:16 p.m. UTC | #1
Hi Jouni,

I love your patch! Perhaps something to improve:

[auto build test WARNING on mac80211-next/master]
[also build test WARNING on v4.20-rc7 next-20181218]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Jouni-Malinen/cfg80211-Parsing-of-Multiple-BSSID-information-in-scanning/20181208-040803
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   include/linux/slab.h:332:43: warning: dubious: x & !y
   include/linux/slab.h:332:43: warning: dubious: x & !y
   include/linux/slab.h:332:43: warning: dubious: x & !y
   include/linux/slab.h:332:43: warning: dubious: x & !y
   include/linux/slab.h:332:43: warning: dubious: x & !y
   include/linux/slab.h:332:43: warning: dubious: x & !y
   include/linux/slab.h:332:43: warning: dubious: x & !y
   include/linux/slab.h:332:43: warning: dubious: x & !y
>> net/wireless/scan.c:319:1: warning: context imbalance in 'cfg80211_add_nontrans_list' - different lock contexts for basic block
>> net/wireless/scan.c:1543:1: warning: context imbalance in 'cfg80211_update_notlisted_nontrans' - different lock contexts for basic block

vim +/cfg80211_add_nontrans_list +319 net/wireless/scan.c

bad457b4 Peng Xu     2018-12-07  317  
bad457b4 Peng Xu     2018-12-07  318  static int
6ff7973a Sara Sharon 2018-12-07 @319  cfg80211_add_nontrans_list(struct cfg80211_bss *trans_bss,
6ff7973a Sara Sharon 2018-12-07  320  			   struct cfg80211_bss *nontrans_bss)
bad457b4 Peng Xu     2018-12-07  321  {
bad457b4 Peng Xu     2018-12-07  322  	const u8 *ssid;
bad457b4 Peng Xu     2018-12-07  323  	size_t ssid_len;
6ff7973a Sara Sharon 2018-12-07  324  	struct cfg80211_bss *bss = NULL;
bad457b4 Peng Xu     2018-12-07  325  
bad457b4 Peng Xu     2018-12-07  326  	rcu_read_lock();
6ff7973a Sara Sharon 2018-12-07  327  	ssid = ieee80211_bss_get_ie(nontrans_bss, WLAN_EID_SSID);
bad457b4 Peng Xu     2018-12-07  328  	if (!ssid)
bad457b4 Peng Xu     2018-12-07  329  		return -EINVAL;
bad457b4 Peng Xu     2018-12-07  330  	ssid_len = ssid[1];
bad457b4 Peng Xu     2018-12-07  331  	ssid = ssid + 2;
bad457b4 Peng Xu     2018-12-07  332  	rcu_read_unlock();
bad457b4 Peng Xu     2018-12-07  333  
bad457b4 Peng Xu     2018-12-07  334  	/* check if nontrans_bss is in the list */
bad457b4 Peng Xu     2018-12-07  335  	list_for_each_entry(bss, &trans_bss->nontrans_list, nontrans_list) {
6ff7973a Sara Sharon 2018-12-07  336  		if (is_bss(bss, nontrans_bss->bssid, ssid, ssid_len))
bad457b4 Peng Xu     2018-12-07  337  			return 0;
bad457b4 Peng Xu     2018-12-07  338  	}
bad457b4 Peng Xu     2018-12-07  339  
bad457b4 Peng Xu     2018-12-07  340  	/* add to the list */
bad457b4 Peng Xu     2018-12-07  341  	list_add_tail(&nontrans_bss->nontrans_list, &trans_bss->nontrans_list);
bad457b4 Peng Xu     2018-12-07  342  	return 0;
bad457b4 Peng Xu     2018-12-07  343  }
bad457b4 Peng Xu     2018-12-07  344  

:::::: The code at line 319 was first introduced by commit
:::::: 6ff7973a64687877f58afbbf55036c096b75c6ea cfg80211: Move Multiple BSS info to struct cfg80211_bss to be visible

:::::: TO: Sara Sharon <sara.sharon@intel.com>
:::::: CC: 0day robot <lkp@intel.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox series

Patch

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 0540834..d5024ad 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2766,6 +2766,7 @@  static int mac80211_hwsim_new_radio(struct genl_info *info,
 	ieee80211_hw_set(hw, TDLS_WIDER_BW);
 	if (rctbl)
 		ieee80211_hw_set(hw, SUPPORTS_RC_TABLE);
+	ieee80211_hw_set(hw, SUPPORTS_MULTI_BSSID);
 
 	hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS |
 			    WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |