Search Linux Wireless

Re: [PATCH v2] nl80211/cfg80211: support 6 GHz scanning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johannes,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mac80211-next/master]
[also build test ERROR on next-20200528]
[cannot apply to mac80211/master v5.7-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Johannes-Berg/nl80211-cfg80211-support-6-GHz-scanning/20200528-232159
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2d068e534f1671459e1b135852c1b3c10502e929)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> net/wireless/scan.c:493:21: error: use of undeclared identifier 'IEEE80211_RNR_TBTT_PARAMS_OCT_RECOMMENDED'
u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_OCT_RECOMMENDED);
^
>> net/wireless/scan.c:495:21: error: use of undeclared identifier 'IEEE80211_RNR_TBTT_PARAMS_SAME_SSID'
u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_SAME_SSID);
^
>> net/wireless/scan.c:497:21: error: use of undeclared identifier 'IEEE80211_RNR_TBTT_PARAMS_MULTI_BSSID'
u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_MULTI_BSSID);
^
>> net/wireless/scan.c:499:21: error: use of undeclared identifier 'IEEE80211_RNR_TBTT_PARAMS_TRANSMITTED_BSSID'
u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_TRANSMITTED_BSSID);
^
>> net/wireless/scan.c:501:21: error: use of undeclared identifier 'IEEE80211_RNR_TBTT_PARAMS_PROBE_ACTIVE'
u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_PROBE_ACTIVE);
^
>> net/wireless/scan.c:503:21: error: use of undeclared identifier 'IEEE80211_RNR_TBTT_PARAMS_COLOC_ESS'
u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_COLOC_ESS);
^
>> net/wireless/scan.c:505:27: error: use of undeclared identifier 'IEEE80211_RNR_TBTT_PARAMS_COLOC_AP'
return u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_COLOC_AP);
^
>> net/wireless/scan.c:541:16: error: use of undeclared identifier 'IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM'
if (length == IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM) {
^
>> net/wireless/scan.c:553:16: error: use of undeclared identifier 'IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM'
if (length == IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM) {
^
>> net/wireless/scan.c:589:28: error: use of undeclared identifier 'WLAN_EID_REDUCED_NEIGHBOR_REPORT'; did you mean 'WLAN_EID_NEIGHBOR_REPORT'?
elem = cfg80211_find_elem(WLAN_EID_REDUCED_NEIGHBOR_REPORT, ies->data,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WLAN_EID_NEIGHBOR_REPORT
include/linux/ieee80211.h:2615:2: note: 'WLAN_EID_NEIGHBOR_REPORT' declared here
WLAN_EID_NEIGHBOR_REPORT = 52,
^
>> net/wireless/scan.c:602:21: error: invalid application of 'sizeof' to an incomplete type 'struct ieee80211_neighbor_ap_info'
while (pos + sizeof(*ap_info) <= end) {
^~~~~~~~~~
net/wireless/scan.c:582:9: note: forward declaration of 'struct ieee80211_neighbor_ap_info'
struct ieee80211_neighbor_ap_info *ap_info;
^
>> net/wireless/scan.c:608:30: error: incomplete definition of type 'struct ieee80211_neighbor_ap_info'
count = u8_get_bits(ap_info->tbtt_info_hdr,
~~~~~~~^
net/wireless/scan.c:582:9: note: forward declaration of 'struct ieee80211_neighbor_ap_info'
struct ieee80211_neighbor_ap_info *ap_info;
^
>> net/wireless/scan.c:609:9: error: use of undeclared identifier 'IEEE80211_AP_INFO_TBTT_HDR_COUNT'
IEEE80211_AP_INFO_TBTT_HDR_COUNT) + 1;
^
net/wireless/scan.c:610:19: error: incomplete definition of type 'struct ieee80211_neighbor_ap_info'
length = ap_info->tbtt_info_len;
~~~~~~~^
net/wireless/scan.c:582:9: note: forward declaration of 'struct ieee80211_neighbor_ap_info'
struct ieee80211_neighbor_ap_info *ap_info;
^
net/wireless/scan.c:612:16: error: invalid application of 'sizeof' to an incomplete type 'struct ieee80211_neighbor_ap_info'
pos += sizeof(*ap_info);
^~~~~~~~~~
net/wireless/scan.c:582:9: note: forward declaration of 'struct ieee80211_neighbor_ap_info'
struct ieee80211_neighbor_ap_info *ap_info;
^
net/wireless/scan.c:614:49: error: incomplete definition of type 'struct ieee80211_neighbor_ap_info'
if (!ieee80211_operating_class_to_band(ap_info->op_class,
~~~~~~~^
net/wireless/scan.c:582:9: note: forward declaration of 'struct ieee80211_neighbor_ap_info'
struct ieee80211_neighbor_ap_info *ap_info;
^
net/wireless/scan.c:618:48: error: incomplete definition of type 'struct ieee80211_neighbor_ap_info'
freq = ieee80211_channel_to_frequency(ap_info->channel, band);
~~~~~~~^
net/wireless/scan.c:582:9: note: forward declaration of 'struct ieee80211_neighbor_ap_info'
struct ieee80211_neighbor_ap_info *ap_info;
^
net/wireless/scan.c:620:34: error: incomplete definition of type 'struct ieee80211_neighbor_ap_info'
if (end - pos < count * ap_info->tbtt_info_len)
~~~~~~~^
net/wireless/scan.c:582:9: note: forward declaration of 'struct ieee80211_neighbor_ap_info'
struct ieee80211_neighbor_ap_info *ap_info;
^
net/wireless/scan.c:630:18: error: use of undeclared identifier 'IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM'
(length != IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM &&
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

vim +/IEEE80211_RNR_TBTT_PARAMS_OCT_RECOMMENDED +493 net/wireless/scan.c

   488	
   489	static u8 cfg80211_parse_bss_param(u8 data,
   490					   struct cfg80211_colocated_ap *coloc_ap)
   491	{
   492		coloc_ap->oct_recommended =
 > 493			u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_OCT_RECOMMENDED);
   494		coloc_ap->same_ssid =
 > 495			u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_SAME_SSID);
   496		coloc_ap->multi_bss =
 > 497			u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_MULTI_BSSID);
   498		coloc_ap->transmitted_bssid =
 > 499			u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_TRANSMITTED_BSSID);
   500		coloc_ap->unsolicited_probe =
 > 501			u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_PROBE_ACTIVE);
   502		coloc_ap->colocated_ess =
 > 503			u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_COLOC_ESS);
   504	
 > 505		return u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_COLOC_AP);
   506	}
   507	
   508	static int cfg80211_calc_short_ssid(const struct cfg80211_bss_ies *ies,
   509					    const struct element **elem, u32 *s_ssid)
   510	{
   511	
   512		*elem = cfg80211_find_elem(WLAN_EID_SSID, ies->data, ies->len);
   513		if (!*elem || (*elem)->datalen > IEEE80211_MAX_SSID_LEN)
   514			return -EINVAL;
   515	
   516		*s_ssid = ~crc32_le(~0, (*elem)->data, (*elem)->datalen);
   517		return 0;
   518	}
   519	
   520	static void cfg80211_free_coloc_ap_list(struct list_head *coloc_ap_list)
   521	{
   522		struct cfg80211_colocated_ap *ap, *tmp_ap;
   523	
   524		list_for_each_entry_safe(ap, tmp_ap, coloc_ap_list, list) {
   525			list_del(&ap->list);
   526			kfree(ap);
   527		}
   528	}
   529	
   530	static int cfg80211_parse_ap_info(struct cfg80211_colocated_ap *entry,
   531					  const u8 *pos, u8 length,
   532					  const struct element *ssid_elem,
   533					  int s_ssid_tmp)
   534	{
   535		/* skip the TBTT offset */
   536		pos++;
   537	
   538		memcpy(entry->bssid, pos, ETH_ALEN);
   539		pos += ETH_ALEN;
   540	
 > 541		if (length == IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM) {
   542			memcpy(&entry->short_ssid, pos,
   543			       sizeof(entry->short_ssid));
   544			entry->short_ssid_valid = true;
   545			pos += 4;
   546		}
   547	
   548		/* skip non colocated APs */
   549		if (!cfg80211_parse_bss_param(*pos, entry))
   550			return -EINVAL;
   551		pos++;
   552	
 > 553		if (length == IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM) {
   554			/*
   555			 * no information about the short ssid. Consider the entry valid
   556			 * for now. It would later be dropped in case there are explicit
   557			 * SSIDs that need to be matched
   558			 */
   559			if (!entry->same_ssid)
   560				return 0;
   561		}
   562	
   563		if (entry->same_ssid) {
   564			entry->short_ssid = s_ssid_tmp;
   565			entry->short_ssid_valid = true;
   566	
   567			/*
   568			 * This is safe because we validate datalen in
   569			 * cfg80211_parse_colocated_ap(), before calling this
   570			 * function.
   571			 */
   572			memcpy(&entry->ssid, &ssid_elem->data,
   573			       ssid_elem->datalen);
   574			entry->ssid_len = ssid_elem->datalen;
   575		}
   576		return 0;
   577	}
   578	
   579	static int cfg80211_parse_colocated_ap(const struct cfg80211_bss_ies *ies,
   580					       struct list_head *list)
   581	{
 > 582		struct ieee80211_neighbor_ap_info *ap_info;
   583		const struct element *elem, *ssid_elem;
   584		const u8 *pos, *end;
   585		u32 s_ssid_tmp;
   586		int n_coloc = 0, ret;
   587		LIST_HEAD(ap_list);
   588	
 > 589		elem = cfg80211_find_elem(WLAN_EID_REDUCED_NEIGHBOR_REPORT, ies->data,
   590					  ies->len);
   591		if (!elem)
   592			return 0;
   593	
   594		pos = elem->data;
   595		end = pos + elem->datalen;
   596	
   597		ret = cfg80211_calc_short_ssid(ies, &ssid_elem, &s_ssid_tmp);
   598		if (ret)
   599			return ret;
   600	
   601		/* RNR IE may contain more than one NEIGHBOR_AP_INFO */
 > 602		while (pos + sizeof(*ap_info) <= end) {
   603			enum nl80211_band band;
   604			int freq;
   605			u8 length, i, count;
   606	
   607			ap_info = (void *)pos;
 > 608			count = u8_get_bits(ap_info->tbtt_info_hdr,
 > 609					    IEEE80211_AP_INFO_TBTT_HDR_COUNT) + 1;
   610			length = ap_info->tbtt_info_len;
   611	
   612			pos += sizeof(*ap_info);
   613	
   614			if (!ieee80211_operating_class_to_band(ap_info->op_class,
   615							       &band))
   616				break;
   617	
   618			freq = ieee80211_channel_to_frequency(ap_info->channel, band);
   619	
   620			if (end - pos < count * ap_info->tbtt_info_len)
   621				break;
   622	
   623			/*
   624			 * TBTT info must include bss param + BSSID +
   625			 * (short SSID or same_ssid bit to be set).
   626			 * ignore other options, and move to the
   627			 * next AP info
   628			 */
   629			if (band != NL80211_BAND_6GHZ ||
   630			    (length != IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM &&
   631			     length < IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM)) {
   632				pos += count * ap_info->tbtt_info_len;
   633				continue;
   634			}
   635	
   636			for (i = 0; i < count; i++) {
   637				struct cfg80211_colocated_ap *entry;
   638	
   639				entry = kzalloc(sizeof(*entry) + IEEE80211_MAX_SSID_LEN,
   640						GFP_ATOMIC);
   641	
   642				if (!entry)
   643					break;
   644	
   645				entry->center_freq = freq;
   646	
   647				if (!cfg80211_parse_ap_info(entry, pos, length, elem,
   648							    s_ssid_tmp)){
   649					n_coloc++;
   650					list_add_tail(&entry->list, &ap_list);
   651				} else {
   652					kfree(entry);
   653				}
   654	
   655				pos += ap_info->tbtt_info_len;
   656			}
   657		}
   658	
   659		if (pos != end) {
   660			cfg80211_free_coloc_ap_list(&ap_list);
   661			return 0;
   662		}
   663	
   664		list_splice_tail(&ap_list, list);
   665		return n_coloc;
   666	}
   667	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux