2018-12-07 12:11:01

by Jouni Malinen

[permalink] [raw]
Subject: [PATCH 1/5] cfg80211: Parsing of Multiple BSSID information in scanning

From: Peng Xu <[email protected]>

This extends cfg80211 BSS table processing to be able to parse Multiple
BSSID element from Beacon and Probe Response frames and to update the
BSS profiles in internal database for non-transmitted BSSs.

Signed-off-by: Peng Xu <[email protected]>
Signed-off-by: Sara Sharon <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Jouni Malinen <[email protected]>
---
net/wireless/core.h | 1 +
net/wireless/scan.c | 504 ++++++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 466 insertions(+), 39 deletions(-)

diff --git a/net/wireless/core.h b/net/wireless/core.h
index c5d6f34..d58c56a 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -152,6 +152,7 @@ extern int cfg80211_rdev_list_generation;
struct cfg80211_internal_bss {
struct list_head list;
struct list_head hidden_list;
+ struct list_head nontrans_list;
struct rb_node rbn;
u64 ts_boottime;
unsigned long ts;
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index d0e7472..559f56d 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -4,7 +4,7 @@
*
* Copyright 2008 Johannes Berg <[email protected]>
* Copyright 2013-2014 Intel Mobile Communications GmbH
- * Copyright 2016 Intel Deutschland GmbH
+ * Copyright 2016-2017 Intel Deutschland GmbH
*/
#include <linux/kernel.h>
#include <linux/slab.h>
@@ -150,6 +150,7 @@ static bool __cfg80211_unlink_bss(struct cfg80211_registered_device *rdev,
}

list_del_init(&bss->list);
+ list_del_init(&bss->nontrans_list);
rb_erase(&bss->rbn, &rdev->bss_tree);
rdev->bss_entries--;
WARN_ONCE((rdev->bss_entries == 0) ^ list_empty(&rdev->bss_list),
@@ -159,6 +160,170 @@ static bool __cfg80211_unlink_bss(struct cfg80211_registered_device *rdev,
return true;
}

+static void cfg80211_gen_new_bssid(const u8 *bssid, u8 max_bssid,
+ u8 mbssid_index, u8 *new_bssid_addr)
+{
+ u64 bssid_tmp, new_bssid = 0;
+ u64 lsb_n;
+
+ bssid_tmp = ether_addr_to_u64(bssid);
+
+ lsb_n = bssid_tmp & ((1 << max_bssid) - 1);
+ new_bssid = bssid_tmp;
+ new_bssid &= ~((1 << max_bssid) - 1);
+ new_bssid |= (lsb_n + mbssid_index) % (1 << max_bssid);
+
+ u64_to_ether_addr(new_bssid, new_bssid_addr);
+}
+
+static size_t cfg80211_gen_new_ie(const u8 *ie, size_t ielen,
+ const u8 *subelement, size_t subie_len,
+ u8 *new_ie, gfp_t gfp)
+{
+ u8 *pos, *tmp;
+ const u8 *tmp_old, *tmp_new;
+ u8 *sub_copy;
+
+ /* copy subelement as we need to change its content to
+ * mark an ie after it is processed.
+ */
+ sub_copy = kmalloc(subie_len, gfp);
+ if (!sub_copy)
+ return 0;
+ memcpy(sub_copy, subelement, subie_len);
+
+ pos = &new_ie[0];
+
+ /* set new ssid */
+ tmp_new = cfg80211_find_ie(WLAN_EID_SSID, sub_copy, subie_len);
+ if (tmp_new) {
+ memcpy(pos, tmp_new, tmp_new[1] + 2);
+ pos += (tmp_new[1] + 2);
+ }
+
+ /* go through IEs in ie (skip SSID) and subelement,
+ * merge them into new_ie
+ */
+ tmp_old = cfg80211_find_ie(WLAN_EID_SSID, ie, ielen);
+ tmp_old = (tmp_old) ? tmp_old + tmp_old[1] + 2 : ie;
+
+ while (tmp_old + tmp_old[1] + 2 - ie <= ielen) {
+ if (tmp_old[0] == 0) {
+ tmp_old++;
+ continue;
+ }
+
+ tmp = (u8 *)cfg80211_find_ie(tmp_old[0], sub_copy, subie_len);
+ if (!tmp) {
+ /* ie in old ie but not in subelement */
+ if (tmp_old[0] != WLAN_EID_MULTIPLE_BSSID) {
+ memcpy(pos, tmp_old, tmp_old[1] + 2);
+ pos += tmp_old[1] + 2;
+ }
+ } else {
+ /* ie in transmitting ie also in subelement,
+ * copy from subelement and flag the ie in subelement
+ * as copied (by setting eid field to 0xff). For
+ * vendor ie, compare OUI + type + subType to
+ * determine if they are the same ie.
+ */
+ if (tmp_old[0] == WLAN_EID_VENDOR_SPECIFIC) {
+ if (!memcmp(tmp_old + 2, tmp + 2, 5)) {
+ /* same vendor ie, copy from
+ * subelement
+ */
+ memcpy(pos, tmp, tmp[1] + 2);
+ pos += tmp[1] + 2;
+ tmp[0] = 0xff;
+ } else {
+ memcpy(pos, tmp_old, tmp_old[1] + 2);
+ pos += tmp_old[1] + 2;
+ }
+ } else {
+ /* copy ie from subelement into new ie */
+ memcpy(pos, tmp, tmp[1] + 2);
+ pos += tmp[1] + 2;
+ tmp[0] = 0xff;
+ }
+ }
+
+ if (tmp_old + tmp_old[1] + 2 - ie == ielen)
+ break;
+
+ tmp_old += tmp_old[1] + 2;
+ }
+
+ /* go through subelement again to check if there is any ie not
+ * copied to new ie, skip ssid, capability, bssid-index ie
+ */
+ tmp_new = sub_copy;
+ while (tmp_new + tmp_new[1] + 2 - sub_copy <= subie_len) {
+ if (!(tmp_new[0] == WLAN_EID_NON_TX_BSSID_CAP ||
+ tmp_new[0] == WLAN_EID_SSID ||
+ tmp_new[0] == WLAN_EID_MULTI_BSSID_IDX ||
+ tmp_new[0] == 0xff)) {
+ memcpy(pos, tmp_new, tmp_new[1] + 2);
+ pos += tmp_new[1] + 2;
+ }
+ if (tmp_new + tmp_new[1] + 2 - sub_copy == subie_len)
+ break;
+ tmp_new += tmp_new[1] + 2;
+ }
+
+ kfree(sub_copy);
+ return pos - new_ie;
+}
+
+static bool is_bss(struct cfg80211_bss *a, const u8 *bssid,
+ const u8 *ssid, size_t ssid_len)
+{
+ const struct cfg80211_bss_ies *ies;
+ const u8 *ssidie;
+
+ if (bssid && !ether_addr_equal(a->bssid, bssid))
+ return false;
+
+ if (!ssid)
+ return true;
+
+ ies = rcu_access_pointer(a->ies);
+ if (!ies)
+ return false;
+ ssidie = cfg80211_find_ie(WLAN_EID_SSID, ies->data, ies->len);
+ if (!ssidie)
+ return false;
+ if (ssidie[1] != ssid_len)
+ return false;
+ return memcmp(ssidie + 2, ssid, ssid_len) == 0;
+}
+
+static int
+cfg80211_add_nontrans_list(struct cfg80211_internal_bss *trans_bss,
+ struct cfg80211_internal_bss *nontrans_bss)
+{
+ const u8 *ssid;
+ size_t ssid_len;
+ struct cfg80211_internal_bss *bss = NULL;
+
+ rcu_read_lock();
+ ssid = ieee80211_bss_get_ie(&nontrans_bss->pub, WLAN_EID_SSID);
+ if (!ssid)
+ return -EINVAL;
+ ssid_len = ssid[1];
+ ssid = ssid + 2;
+ rcu_read_unlock();
+
+ /* check if nontrans_bss is in the list */
+ list_for_each_entry(bss, &trans_bss->nontrans_list, nontrans_list) {
+ if (is_bss(&bss->pub, nontrans_bss->pub.bssid, ssid, ssid_len))
+ return 0;
+ }
+
+ /* add to the list */
+ list_add_tail(&nontrans_bss->nontrans_list, &trans_bss->nontrans_list);
+ return 0;
+}
+
static void __cfg80211_bss_expire(struct cfg80211_registered_device *rdev,
unsigned long expire_time)
{
@@ -525,29 +690,6 @@ const u8 *cfg80211_find_vendor_ie(unsigned int oui, int oui_type,
}
EXPORT_SYMBOL(cfg80211_find_vendor_ie);

-static bool is_bss(struct cfg80211_bss *a, const u8 *bssid,
- const u8 *ssid, size_t ssid_len)
-{
- const struct cfg80211_bss_ies *ies;
- const u8 *ssidie;
-
- if (bssid && !ether_addr_equal(a->bssid, bssid))
- return false;
-
- if (!ssid)
- return true;
-
- ies = rcu_access_pointer(a->ies);
- if (!ies)
- return false;
- ssidie = cfg80211_find_ie(WLAN_EID_SSID, ies->data, ies->len);
- if (!ssidie)
- return false;
- if (ssidie[1] != ssid_len)
- return false;
- return memcmp(ssidie + 2, ssid, ssid_len) == 0;
-}
-
/**
* enum bss_compare_mode - BSS compare mode
* @BSS_CMP_REGULAR: regular compare mode (for insertion and normal find)
@@ -1130,17 +1272,19 @@ cfg80211_get_bss_channel(struct wiphy *wiphy, const u8 *ie, size_t ielen,
}

/* Returned bss is reference counted and must be cleaned up appropriately. */
-struct cfg80211_bss *
-cfg80211_inform_bss_data(struct wiphy *wiphy,
- struct cfg80211_inform_bss *data,
- enum cfg80211_bss_frame_type ftype,
- const u8 *bssid, u64 tsf, u16 capability,
- u16 beacon_interval, const u8 *ie, size_t ielen,
- gfp_t gfp)
+static struct cfg80211_bss *
+cfg80211_inform_single_bss_data(struct wiphy *wiphy,
+ struct cfg80211_inform_bss *data,
+ enum cfg80211_bss_frame_type ftype,
+ const u8 *bssid, u64 tsf, u16 capability,
+ u16 beacon_interval, const u8 *ie, size_t ielen,
+ struct cfg80211_bss *trans_bss,
+ gfp_t gfp)
{
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct cfg80211_bss_ies *ies;
struct ieee80211_channel *channel;
- struct cfg80211_internal_bss tmp = {}, *res;
+ struct cfg80211_internal_bss tmp = {}, *res, *trans_internal;
int bss_type;
bool signal_valid;

@@ -1209,19 +1353,250 @@ cfg80211_inform_bss_data(struct wiphy *wiphy,
regulatory_hint_found_beacon(wiphy, channel, gfp);
}

+ if (trans_bss) {
+ /* this is a nontransmitting bss, we need to add it to
+ * transmitting bss' list if it is not there
+ */
+ trans_internal = container_of(trans_bss,
+ struct cfg80211_internal_bss,
+ pub);
+ if (cfg80211_add_nontrans_list(trans_internal, res)) {
+ if (__cfg80211_unlink_bss(rdev, res))
+ rdev->bss_generation++;
+ }
+ }
+
trace_cfg80211_return_bss(&res->pub);
/* cfg80211_bss_update gives us a referenced result */
return &res->pub;
}
-EXPORT_SYMBOL(cfg80211_inform_bss_data);

-/* cfg80211_inform_bss_width_frame helper */
+static void cfg80211_parse_mbssid_data(struct wiphy *wiphy,
+ struct cfg80211_inform_bss *data,
+ enum cfg80211_bss_frame_type ftype,
+ const u8 *bssid, u64 tsf,
+ u16 beacon_interval, const u8 *ie,
+ size_t ielen,
+ struct cfg80211_bss *trans_bss,
+ gfp_t gfp)
+{
+ const u8 *pos, *subelement, *mbssid_end_pos;
+ const u8 *tmp, *mbssid_index_ie;
+ size_t subie_len, new_ie_len;
+ u8 new_bssid[ETH_ALEN];
+ u8 *new_ie;
+ u16 capability;
+ struct cfg80211_bss *bss;
+
+ if (!trans_bss)
+ return;
+ if (!cfg80211_find_ie(WLAN_EID_MULTIPLE_BSSID, ie, ielen))
+ return;
+
+ pos = ie;
+
+ new_ie = kmalloc(IEEE80211_MAX_DATA_LEN, gfp);
+ if (!new_ie)
+ return;
+
+ while (pos < ie + ielen + 2) {
+ tmp = cfg80211_find_ie(WLAN_EID_MULTIPLE_BSSID, pos,
+ ielen - (pos - ie));
+ if (!tmp)
+ break;
+
+ mbssid_end_pos = tmp + tmp[1] + 2;
+ /* Skip Element ID, Len, MaxBSSID Indicator */
+ if (tmp[1] < 4)
+ break;
+ for (subelement = tmp + 3; subelement < mbssid_end_pos - 1;
+ subelement += 2 + subelement[1]) {
+ subie_len = subelement[1];
+ if (mbssid_end_pos - subelement < 2 + subie_len)
+ break;
+ if (subelement[0] != 0 || subelement[1] < 4) {
+ /* not a valid BSS profile */
+ continue;
+ }
+
+ if (subelement[2] != WLAN_EID_NON_TX_BSSID_CAP ||
+ subelement[3] != 2) {
+ /* The first element within the Nontransmitted
+ * BSSID Profile is not the Nontransmitted
+ * BSSID Capability element.
+ */
+ continue;
+ }
+
+ /* found a Nontransmitted BSSID Profile */
+ mbssid_index_ie = cfg80211_find_ie
+ (WLAN_EID_MULTI_BSSID_IDX,
+ subelement + 2, subie_len);
+ if (!mbssid_index_ie || mbssid_index_ie[1] < 1 ||
+ mbssid_index_ie[2] == 0) {
+ /* No valid Multiple BSSID-Index element */
+ continue;
+ }
+
+ cfg80211_gen_new_bssid(bssid, tmp[2],
+ mbssid_index_ie[2],
+ new_bssid);
+ memset(new_ie, 0, IEEE80211_MAX_DATA_LEN);
+ new_ie_len = cfg80211_gen_new_ie(ie, ielen,
+ subelement + 2,
+ subie_len, new_ie,
+ gfp);
+ if (!new_ie_len)
+ continue;
+
+ capability = le16_to_cpup((const __le16 *)
+ &subelement[4]);
+ bss = cfg80211_inform_single_bss_data(wiphy, data,
+ ftype,
+ new_bssid, tsf,
+ capability,
+ beacon_interval,
+ new_ie,
+ new_ie_len,
+ trans_bss, gfp);
+ if (!bss)
+ break;
+ cfg80211_put_bss(wiphy, bss);
+ }
+
+ pos = mbssid_end_pos;
+ }
+
+ kfree(new_ie);
+}
+
struct cfg80211_bss *
-cfg80211_inform_bss_frame_data(struct wiphy *wiphy,
- struct cfg80211_inform_bss *data,
- struct ieee80211_mgmt *mgmt, size_t len,
- gfp_t gfp)
+cfg80211_inform_bss_data(struct wiphy *wiphy,
+ struct cfg80211_inform_bss *data,
+ enum cfg80211_bss_frame_type ftype,
+ const u8 *bssid, u64 tsf, u16 capability,
+ u16 beacon_interval, const u8 *ie, size_t ielen,
+ gfp_t gfp)
+{
+ struct cfg80211_bss *res;

+ res = cfg80211_inform_single_bss_data(wiphy, data, ftype, bssid, tsf,
+ capability, beacon_interval, ie,
+ ielen, NULL, gfp);
+ cfg80211_parse_mbssid_data(wiphy, data, ftype, bssid, tsf,
+ beacon_interval, ie, ielen, res, gfp);
+ return res;
+}
+EXPORT_SYMBOL(cfg80211_inform_bss_data);
+
+static void
+cfg80211_parse_mbssid_frame_data(struct wiphy *wiphy,
+ struct cfg80211_inform_bss *data,
+ struct ieee80211_mgmt *mgmt, size_t len,
+ struct cfg80211_bss *trans_bss,
+ gfp_t gfp)
+{
+ enum cfg80211_bss_frame_type ftype;
+ const u8 *ie = mgmt->u.probe_resp.variable;
+ size_t ielen = len - offsetof(struct ieee80211_mgmt,
+ u.probe_resp.variable);
+
+ ftype = ieee80211_is_beacon(mgmt->frame_control) ?
+ CFG80211_BSS_FTYPE_BEACON : CFG80211_BSS_FTYPE_PRESP;
+
+ cfg80211_parse_mbssid_data(wiphy, data, ftype, mgmt->bssid,
+ le64_to_cpu(mgmt->u.probe_resp.timestamp),
+ le16_to_cpu(mgmt->u.probe_resp.beacon_int),
+ ie, ielen, trans_bss, gfp);
+}
+
+static void
+cfg80211_update_notlisted_nontrans(struct wiphy *wiphy,
+ struct cfg80211_internal_bss *nontrans_bss,
+ struct ieee80211_mgmt *mgmt, size_t len,
+ gfp_t gfp)
+{
+ u8 *ie, *new_ie, *pos;
+ const u8 *nontrans_ssid, *trans_ssid, *mbssid;
+ size_t ielen = len - offsetof(struct ieee80211_mgmt,
+ u.probe_resp.variable);
+ size_t new_ie_len;
+ struct cfg80211_bss_ies *new_ies;
+ const struct cfg80211_bss_ies *old;
+ u8 cpy_len;
+
+ ie = mgmt->u.probe_resp.variable;
+
+ new_ie_len = ielen;
+ trans_ssid = cfg80211_find_ie(WLAN_EID_SSID, ie, ielen);
+ if (!trans_ssid)
+ return;
+ new_ie_len -= trans_ssid[1];
+ mbssid = cfg80211_find_ie(WLAN_EID_MULTIPLE_BSSID, ie, ielen);
+ if (!mbssid)
+ return;
+ new_ie_len -= mbssid[1];
+ rcu_read_lock();
+ nontrans_ssid = ieee80211_bss_get_ie(&nontrans_bss->pub, WLAN_EID_SSID);
+ if (!nontrans_ssid)
+ return;
+ new_ie_len += nontrans_ssid[1];
+ rcu_read_unlock();
+
+ /* generate new ie for nontrans BSS
+ * 1. replace SSID with nontrans BSS' SSID
+ * 2. skip MBSSID IE
+ */
+ new_ie = kzalloc(new_ie_len, gfp);
+ if (!new_ie)
+ return;
+ new_ies = kzalloc(sizeof(*new_ies) + new_ie_len, gfp);
+ if (!new_ies) {
+ kfree(new_ie);
+ return;
+ }
+
+ pos = new_ie;
+
+ /* copy the nontransmitted SSID */
+ cpy_len = nontrans_ssid[1] + 2;
+ memcpy(pos, nontrans_ssid, cpy_len);
+ pos += cpy_len;
+ /* copy the IEs between SSID and MBSSID */
+ cpy_len = trans_ssid[1] + 2;
+ memcpy(pos, (trans_ssid + cpy_len), (mbssid - (trans_ssid + cpy_len)));
+ pos += (mbssid - (trans_ssid + cpy_len));
+ /* copy the IEs after MBSSID */
+ cpy_len = mbssid[1] + 2;
+ memcpy(pos, mbssid + cpy_len, ((ie + ielen) - (mbssid + cpy_len)));
+
+ /* update ie */
+ new_ies->len = new_ie_len;
+ new_ies->tsf = le64_to_cpu(mgmt->u.probe_resp.timestamp);
+ new_ies->from_beacon = ieee80211_is_beacon(mgmt->frame_control);
+ memcpy(new_ies->data, new_ie, new_ie_len);
+ if (ieee80211_is_probe_resp(mgmt->frame_control)) {
+ old = rcu_access_pointer(nontrans_bss->pub.proberesp_ies);
+ rcu_assign_pointer(nontrans_bss->pub.proberesp_ies, new_ies);
+ rcu_assign_pointer(nontrans_bss->pub.ies, new_ies);
+ if (old)
+ kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head);
+ } else {
+ old = rcu_access_pointer(nontrans_bss->pub.beacon_ies);
+ rcu_assign_pointer(nontrans_bss->pub.beacon_ies, new_ies);
+ rcu_assign_pointer(nontrans_bss->pub.ies, new_ies);
+ if (old)
+ kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head);
+ }
+}
+
+/* cfg80211_inform_bss_width_frame helper */
+static struct cfg80211_bss *
+cfg80211_inform_single_bss_frame_data(struct wiphy *wiphy,
+ struct cfg80211_inform_bss *data,
+ struct ieee80211_mgmt *mgmt, size_t len,
+ struct cfg80211_bss *trans_bss,
+ gfp_t gfp)
{
struct cfg80211_internal_bss tmp = {}, *res;
struct cfg80211_bss_ies *ies;
@@ -1300,6 +1675,50 @@ cfg80211_inform_bss_frame_data(struct wiphy *wiphy,
/* cfg80211_bss_update gives us a referenced result */
return &res->pub;
}
+
+struct cfg80211_bss *
+cfg80211_inform_bss_frame_data(struct wiphy *wiphy,
+ struct cfg80211_inform_bss *data,
+ struct ieee80211_mgmt *mgmt, size_t len,
+ gfp_t gfp)
+{
+ struct cfg80211_bss *res;
+ struct cfg80211_internal_bss *trans_bss, *tmp_bss;
+ const u8 *ie = mgmt->u.probe_resp.variable;
+ const struct cfg80211_bss_ies *ies1, *ies2;
+ size_t ielen = len - offsetof(struct ieee80211_mgmt,
+ u.probe_resp.variable);
+
+ res = cfg80211_inform_single_bss_frame_data(wiphy, data, mgmt,
+ len, NULL, gfp);
+ if (!res || !cfg80211_find_ie(WLAN_EID_MULTIPLE_BSSID, ie, ielen))
+ return res;
+
+ /* process each non-transmitting bss */
+ cfg80211_parse_mbssid_frame_data(wiphy, data, mgmt, len, res, gfp);
+
+ /* check if the res has other nontransmitting bss which is not
+ * in MBSSID IE
+ */
+ ies1 = rcu_access_pointer(res->ies);
+ trans_bss = container_of(res, struct cfg80211_internal_bss, pub);
+ if (!trans_bss)
+ return res;
+
+ /* go through nontrans_list, if the timestamp of the BSS is
+ * earlier than the timestamp of the transmitting BSS then
+ * update it
+ */
+ list_for_each_entry(tmp_bss, &trans_bss->nontrans_list,
+ nontrans_list) {
+ ies2 = rcu_access_pointer(tmp_bss->pub.ies);
+ if (ies2->tsf < ies1->tsf)
+ cfg80211_update_notlisted_nontrans(wiphy, tmp_bss,
+ mgmt, len, gfp);
+ }
+
+ return res;
+}
EXPORT_SYMBOL(cfg80211_inform_bss_frame_data);

void cfg80211_ref_bss(struct wiphy *wiphy, struct cfg80211_bss *pub)
@@ -1337,7 +1756,7 @@ EXPORT_SYMBOL(cfg80211_put_bss);
void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *pub)
{
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
- struct cfg80211_internal_bss *bss;
+ struct cfg80211_internal_bss *bss, *nontrans_bss, *tmp;

if (WARN_ON(!pub))
return;
@@ -1346,6 +1765,13 @@ void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *pub)

spin_lock_bh(&rdev->bss_lock);
if (!list_empty(&bss->list)) {
+ list_for_each_entry_safe(nontrans_bss, tmp,
+ &bss->nontrans_list,
+ nontrans_list) {
+ if (__cfg80211_unlink_bss(rdev, nontrans_bss))
+ rdev->bss_generation++;
+ }
+
if (__cfg80211_unlink_bss(rdev, bss))
rdev->bss_generation++;
}
--
2.7.4



2018-12-07 12:11:01

by Jouni Malinen

[permalink] [raw]
Subject: [PATCH 2/5] cfg80211: Properly track transmitting and non-transmitting BSS

From: Sara Sharon <[email protected]>

When holding data of the non-transmitting BSS, we need to keep the
transmitting BSS data on. Otherwise it will be released, and release
the non-transmitting BSS with it.

Signed-off-by: Sara Sharon <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Jouni Malinen <[email protected]>
---
net/wireless/core.h | 9 +++++++++
net/wireless/scan.c | 36 ++++++++++++++++++++++++++++++++++--
2 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/net/wireless/core.h b/net/wireless/core.h
index d58c56a..b1afc4b 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -153,6 +153,7 @@ struct cfg80211_internal_bss {
struct list_head list;
struct list_head hidden_list;
struct list_head nontrans_list;
+ struct cfg80211_bss *transmitted_bss;
struct rb_node rbn;
u64 ts_boottime;
unsigned long ts;
@@ -183,12 +184,20 @@ static inline struct cfg80211_internal_bss *bss_from_pub(struct cfg80211_bss *pu
static inline void cfg80211_hold_bss(struct cfg80211_internal_bss *bss)
{
atomic_inc(&bss->hold);
+ if (bss->transmitted_bss)
+ cfg80211_hold_bss(container_of(bss->transmitted_bss,
+ struct cfg80211_internal_bss,
+ pub));
}

static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
{
int r = atomic_dec_return(&bss->hold);
WARN_ON(r < 0);
+ if (bss->transmitted_bss)
+ cfg80211_unhold_bss(container_of(bss->transmitted_bss,
+ struct cfg80211_internal_bss,
+ pub));
}


diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 559f56d..6f2fed2 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -109,6 +109,12 @@ static inline void bss_ref_get(struct cfg80211_registered_device *rdev,
pub);
bss->refcount++;
}
+ if (bss->transmitted_bss) {
+ bss = container_of(bss->transmitted_bss,
+ struct cfg80211_internal_bss,
+ pub);
+ bss->refcount++;
+ }
}

static inline void bss_ref_put(struct cfg80211_registered_device *rdev,
@@ -125,6 +131,18 @@ static inline void bss_ref_put(struct cfg80211_registered_device *rdev,
if (hbss->refcount == 0)
bss_free(hbss);
}
+
+ if (bss->transmitted_bss) {
+ struct cfg80211_internal_bss *tbss;
+
+ tbss = container_of(bss->transmitted_bss,
+ struct cfg80211_internal_bss,
+ pub);
+ tbss->refcount--;
+ if (tbss->refcount == 0)
+ bss_free(tbss);
+ }
+
bss->refcount--;
if (bss->refcount == 0)
bss_free(bss);
@@ -1028,6 +1046,7 @@ static bool cfg80211_combine_bsses(struct cfg80211_registered_device *rdev,
static struct cfg80211_internal_bss *
cfg80211_bss_update(struct cfg80211_registered_device *rdev,
struct cfg80211_internal_bss *tmp,
+ struct cfg80211_bss *trans_bss,
bool signal_valid)
{
struct cfg80211_internal_bss *found = NULL;
@@ -1184,6 +1203,17 @@ cfg80211_bss_update(struct cfg80211_registered_device *rdev,
goto drop;
}

+ /* This must be before the call to bss_ref_get */
+ if (trans_bss) {
+ struct cfg80211_internal_bss *pbss =
+ container_of(trans_bss,
+ struct cfg80211_internal_bss,
+ pub);
+
+ new->transmitted_bss = trans_bss;
+ bss_ref_get(rdev, pbss);
+ }
+
list_add_tail(&new->list, &rdev->bss_list);
rdev->bss_entries++;
rb_insert_bss(rdev, new);
@@ -1339,7 +1369,8 @@ cfg80211_inform_single_bss_data(struct wiphy *wiphy,

signal_valid = abs(data->chan->center_freq - channel->center_freq) <=
wiphy->max_adj_channel_rssi_comp;
- res = cfg80211_bss_update(wiphy_to_rdev(wiphy), &tmp, signal_valid);
+ res = cfg80211_bss_update(wiphy_to_rdev(wiphy), &tmp, trans_bss,
+ signal_valid);
if (!res)
return NULL;

@@ -1657,7 +1688,8 @@ cfg80211_inform_single_bss_frame_data(struct wiphy *wiphy,

signal_valid = abs(data->chan->center_freq - channel->center_freq) <=
wiphy->max_adj_channel_rssi_comp;
- res = cfg80211_bss_update(wiphy_to_rdev(wiphy), &tmp, signal_valid);
+ res = cfg80211_bss_update(wiphy_to_rdev(wiphy), &tmp, trans_bss,
+ signal_valid);
if (!res)
return NULL;

--
2.7.4


2018-12-07 12:11:04

by Jouni Malinen

[permalink] [raw]
Subject: [PATCH 3/5] cfg80211: Move Multiple BSS info to struct cfg80211_bss to be visible

From: Sara Sharon <[email protected]>

Previously the transmitted BSS and the non-trasmitted BSS list were
defined in struct cfg80211_internal_bss. Move them to struct cfg80211_bss
since mac80211 needs this info.

Signed-off-by: Sara Sharon <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Jouni Malinen <[email protected]>
---
include/net/cfg80211.h | 2 ++
net/wireless/core.h | 10 +++----
net/wireless/scan.c | 79 +++++++++++++++++++++++++-------------------------
3 files changed, 45 insertions(+), 46 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index ede7fcd..839f717 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2019,6 +2019,8 @@ struct cfg80211_bss {
const struct cfg80211_bss_ies __rcu *proberesp_ies;

struct cfg80211_bss *hidden_beacon_bss;
+ struct cfg80211_bss *transmitted_bss;
+ struct list_head nontrans_list;

s32 signal;

diff --git a/net/wireless/core.h b/net/wireless/core.h
index b1afc4b..40c01b6 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -152,8 +152,6 @@ extern int cfg80211_rdev_list_generation;
struct cfg80211_internal_bss {
struct list_head list;
struct list_head hidden_list;
- struct list_head nontrans_list;
- struct cfg80211_bss *transmitted_bss;
struct rb_node rbn;
u64 ts_boottime;
unsigned long ts;
@@ -184,8 +182,8 @@ static inline struct cfg80211_internal_bss *bss_from_pub(struct cfg80211_bss *pu
static inline void cfg80211_hold_bss(struct cfg80211_internal_bss *bss)
{
atomic_inc(&bss->hold);
- if (bss->transmitted_bss)
- cfg80211_hold_bss(container_of(bss->transmitted_bss,
+ if (bss->pub.transmitted_bss)
+ cfg80211_hold_bss(container_of(bss->pub.transmitted_bss,
struct cfg80211_internal_bss,
pub));
}
@@ -194,8 +192,8 @@ static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
{
int r = atomic_dec_return(&bss->hold);
WARN_ON(r < 0);
- if (bss->transmitted_bss)
- cfg80211_unhold_bss(container_of(bss->transmitted_bss,
+ if (bss->pub.transmitted_bss)
+ cfg80211_unhold_bss(container_of(bss->pub.transmitted_bss,
struct cfg80211_internal_bss,
pub));
}
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 6f2fed2..25ce73d 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -109,8 +109,8 @@ static inline void bss_ref_get(struct cfg80211_registered_device *rdev,
pub);
bss->refcount++;
}
- if (bss->transmitted_bss) {
- bss = container_of(bss->transmitted_bss,
+ if (bss->pub.transmitted_bss) {
+ bss = container_of(bss->pub.transmitted_bss,
struct cfg80211_internal_bss,
pub);
bss->refcount++;
@@ -132,10 +132,10 @@ static inline void bss_ref_put(struct cfg80211_registered_device *rdev,
bss_free(hbss);
}

- if (bss->transmitted_bss) {
+ if (bss->pub.transmitted_bss) {
struct cfg80211_internal_bss *tbss;

- tbss = container_of(bss->transmitted_bss,
+ tbss = container_of(bss->pub.transmitted_bss,
struct cfg80211_internal_bss,
pub);
tbss->refcount--;
@@ -168,7 +168,7 @@ static bool __cfg80211_unlink_bss(struct cfg80211_registered_device *rdev,
}

list_del_init(&bss->list);
- list_del_init(&bss->nontrans_list);
+ list_del_init(&bss->pub.nontrans_list);
rb_erase(&bss->rbn, &rdev->bss_tree);
rdev->bss_entries--;
WARN_ONCE((rdev->bss_entries == 0) ^ list_empty(&rdev->bss_list),
@@ -316,15 +316,15 @@ static bool is_bss(struct cfg80211_bss *a, const u8 *bssid,
}

static int
-cfg80211_add_nontrans_list(struct cfg80211_internal_bss *trans_bss,
- struct cfg80211_internal_bss *nontrans_bss)
+cfg80211_add_nontrans_list(struct cfg80211_bss *trans_bss,
+ struct cfg80211_bss *nontrans_bss)
{
const u8 *ssid;
size_t ssid_len;
- struct cfg80211_internal_bss *bss = NULL;
+ struct cfg80211_bss *bss = NULL;

rcu_read_lock();
- ssid = ieee80211_bss_get_ie(&nontrans_bss->pub, WLAN_EID_SSID);
+ ssid = ieee80211_bss_get_ie(nontrans_bss, WLAN_EID_SSID);
if (!ssid)
return -EINVAL;
ssid_len = ssid[1];
@@ -333,7 +333,7 @@ cfg80211_add_nontrans_list(struct cfg80211_internal_bss *trans_bss,

/* check if nontrans_bss is in the list */
list_for_each_entry(bss, &trans_bss->nontrans_list, nontrans_list) {
- if (is_bss(&bss->pub, nontrans_bss->pub.bssid, ssid, ssid_len))
+ if (is_bss(bss, nontrans_bss->bssid, ssid, ssid_len))
return 0;
}

@@ -1170,6 +1170,7 @@ cfg80211_bss_update(struct cfg80211_registered_device *rdev,
memcpy(new, tmp, sizeof(*new));
new->refcount = 1;
INIT_LIST_HEAD(&new->hidden_list);
+ INIT_LIST_HEAD(&new->pub.nontrans_list);

if (rcu_access_pointer(tmp->pub.proberesp_ies)) {
hidden = rb_find_bss(rdev, tmp, BSS_CMP_HIDE_ZLEN);
@@ -1210,7 +1211,7 @@ cfg80211_bss_update(struct cfg80211_registered_device *rdev,
struct cfg80211_internal_bss,
pub);

- new->transmitted_bss = trans_bss;
+ new->pub.transmitted_bss = trans_bss;
bss_ref_get(rdev, pbss);
}

@@ -1314,7 +1315,7 @@ cfg80211_inform_single_bss_data(struct wiphy *wiphy,
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct cfg80211_bss_ies *ies;
struct ieee80211_channel *channel;
- struct cfg80211_internal_bss tmp = {}, *res, *trans_internal;
+ struct cfg80211_internal_bss tmp = {}, *res;
int bss_type;
bool signal_valid;

@@ -1388,10 +1389,7 @@ cfg80211_inform_single_bss_data(struct wiphy *wiphy,
/* this is a nontransmitting bss, we need to add it to
* transmitting bss' list if it is not there
*/
- trans_internal = container_of(trans_bss,
- struct cfg80211_internal_bss,
- pub);
- if (cfg80211_add_nontrans_list(trans_internal, res)) {
+ if (cfg80211_add_nontrans_list(trans_bss, &res->pub)) {
if (__cfg80211_unlink_bss(rdev, res))
rdev->bss_generation++;
}
@@ -1543,7 +1541,7 @@ cfg80211_parse_mbssid_frame_data(struct wiphy *wiphy,

static void
cfg80211_update_notlisted_nontrans(struct wiphy *wiphy,
- struct cfg80211_internal_bss *nontrans_bss,
+ struct cfg80211_bss *nontrans_bss,
struct ieee80211_mgmt *mgmt, size_t len,
gfp_t gfp)
{
@@ -1568,7 +1566,7 @@ cfg80211_update_notlisted_nontrans(struct wiphy *wiphy,
return;
new_ie_len -= mbssid[1];
rcu_read_lock();
- nontrans_ssid = ieee80211_bss_get_ie(&nontrans_bss->pub, WLAN_EID_SSID);
+ nontrans_ssid = ieee80211_bss_get_ie(nontrans_bss, WLAN_EID_SSID);
if (!nontrans_ssid)
return;
new_ie_len += nontrans_ssid[1];
@@ -1607,15 +1605,15 @@ cfg80211_update_notlisted_nontrans(struct wiphy *wiphy,
new_ies->from_beacon = ieee80211_is_beacon(mgmt->frame_control);
memcpy(new_ies->data, new_ie, new_ie_len);
if (ieee80211_is_probe_resp(mgmt->frame_control)) {
- old = rcu_access_pointer(nontrans_bss->pub.proberesp_ies);
- rcu_assign_pointer(nontrans_bss->pub.proberesp_ies, new_ies);
- rcu_assign_pointer(nontrans_bss->pub.ies, new_ies);
+ old = rcu_access_pointer(nontrans_bss->proberesp_ies);
+ rcu_assign_pointer(nontrans_bss->proberesp_ies, new_ies);
+ rcu_assign_pointer(nontrans_bss->ies, new_ies);
if (old)
kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head);
} else {
- old = rcu_access_pointer(nontrans_bss->pub.beacon_ies);
- rcu_assign_pointer(nontrans_bss->pub.beacon_ies, new_ies);
- rcu_assign_pointer(nontrans_bss->pub.ies, new_ies);
+ old = rcu_access_pointer(nontrans_bss->beacon_ies);
+ rcu_assign_pointer(nontrans_bss->beacon_ies, new_ies);
+ rcu_assign_pointer(nontrans_bss->ies, new_ies);
if (old)
kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head);
}
@@ -1714,8 +1712,7 @@ cfg80211_inform_bss_frame_data(struct wiphy *wiphy,
struct ieee80211_mgmt *mgmt, size_t len,
gfp_t gfp)
{
- struct cfg80211_bss *res;
- struct cfg80211_internal_bss *trans_bss, *tmp_bss;
+ struct cfg80211_bss *res, *tmp_bss;
const u8 *ie = mgmt->u.probe_resp.variable;
const struct cfg80211_bss_ies *ies1, *ies2;
size_t ielen = len - offsetof(struct ieee80211_mgmt,
@@ -1733,17 +1730,14 @@ cfg80211_inform_bss_frame_data(struct wiphy *wiphy,
* in MBSSID IE
*/
ies1 = rcu_access_pointer(res->ies);
- trans_bss = container_of(res, struct cfg80211_internal_bss, pub);
- if (!trans_bss)
- return res;

/* go through nontrans_list, if the timestamp of the BSS is
* earlier than the timestamp of the transmitting BSS then
* update it
*/
- list_for_each_entry(tmp_bss, &trans_bss->nontrans_list,
+ list_for_each_entry(tmp_bss, &res->nontrans_list,
nontrans_list) {
- ies2 = rcu_access_pointer(tmp_bss->pub.ies);
+ ies2 = rcu_access_pointer(tmp_bss->ies);
if (ies2->tsf < ies1->tsf)
cfg80211_update_notlisted_nontrans(wiphy, tmp_bss,
mgmt, len, gfp);
@@ -1788,7 +1782,8 @@ EXPORT_SYMBOL(cfg80211_put_bss);
void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *pub)
{
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
- struct cfg80211_internal_bss *bss, *nontrans_bss, *tmp;
+ struct cfg80211_internal_bss *bss, *tmp1;
+ struct cfg80211_bss *nontrans_bss, *tmp;

if (WARN_ON(!pub))
return;
@@ -1796,17 +1791,21 @@ void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *pub)
bss = container_of(pub, struct cfg80211_internal_bss, pub);

spin_lock_bh(&rdev->bss_lock);
- if (!list_empty(&bss->list)) {
- list_for_each_entry_safe(nontrans_bss, tmp,
- &bss->nontrans_list,
- nontrans_list) {
- if (__cfg80211_unlink_bss(rdev, nontrans_bss))
- rdev->bss_generation++;
- }
+ if (list_empty(&bss->list))
+ goto out;

- if (__cfg80211_unlink_bss(rdev, bss))
+ list_for_each_entry_safe(nontrans_bss, tmp,
+ &pub->nontrans_list,
+ nontrans_list) {
+ tmp1 = container_of(nontrans_bss,
+ struct cfg80211_internal_bss, pub);
+ if (__cfg80211_unlink_bss(rdev, tmp1))
rdev->bss_generation++;
}
+
+ if (__cfg80211_unlink_bss(rdev, bss))
+ rdev->bss_generation++;
+out:
spin_unlock_bh(&rdev->bss_lock);
}
EXPORT_SYMBOL(cfg80211_unlink_bss);
--
2.7.4


2018-12-07 12:11:06

by Jouni Malinen

[permalink] [raw]
Subject: [PATCH 5/5] mac80211_hwsim: Declare support for Multi-BSSID

This can be used to test cfg80211 support for Multi-BSSID scan result
parsing.

Signed-off-by: Jouni Malinen <[email protected]>
---
drivers/net/wireless/mac80211_hwsim.c | 1 +
1 file changed, 1 insertion(+)

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 |
--
2.7.4


2018-12-07 12:11:07

by Jouni Malinen

[permalink] [raw]
Subject: [PATCH 4/5] mac80211: Declare support for Multi-BSSID if driver supports it

From: Sara Sharon <[email protected]>

Define bits and flags for indicating support of Multi-BSSID feature and
indicate support for this if the driver supports it.

Signed-off-by: Sara Sharon <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Jouni Malinen <[email protected]>
---
include/linux/ieee80211.h | 6 ++++++
include/net/mac80211.h | 3 +++
net/mac80211/debugfs.c | 1 +
net/mac80211/main.c | 4 ++++
4 files changed, 14 insertions(+)

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 407d6fd..0a84f4e 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -2656,6 +2656,12 @@ enum ieee80211_tdls_actioncode {
*/
#define WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING BIT(2)

+/* Multiple BSSID capability is set in the 6th bit of the 3rd byte of the
+ * @WLAN_EID_EXT_CAPABILITY information element
+ */
+#define WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT BIT(6)
+
+
/* TDLS capabilities in the the 4th byte of @WLAN_EID_EXT_CAPABILITY */
#define WLAN_EXT_CAPA4_TDLS_BUFFER_STA BIT(4)
#define WLAN_EXT_CAPA4_TDLS_PEER_PSM BIT(5)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 9386cf9..e7c4e11 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2181,6 +2181,8 @@ struct ieee80211_txq {
* MMPDUs on station interfaces. This of course requires the driver to use
* TXQs to start with.
*
+ * @IEEE80211_HW_SUPPORTS_MULTI_BSSID: Hardware supports multi BSSID
+ *
* @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
*/
enum ieee80211_hw_flags {
@@ -2229,6 +2231,7 @@ enum ieee80211_hw_flags {
IEEE80211_HW_BUFF_MMPDU_TXQ,
IEEE80211_HW_SUPPORTS_VHT_EXT_NSS_BW,
IEEE80211_HW_STA_MMPDU_TXQ,
+ IEEE80211_HW_SUPPORTS_MULTI_BSSID,

/* keep last, obviously */
NUM_IEEE80211_HW_FLAGS
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 3fe541e..28a7e60 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -218,6 +218,7 @@ static const char *hw_flag_names[] = {
FLAG(BUFF_MMPDU_TXQ),
FLAG(SUPPORTS_VHT_EXT_NSS_BW),
FLAG(STA_MMPDU_TXQ),
+ FLAG(SUPPORTS_MULTI_BSSID),
#undef FLAG
};

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 83e71e6..6ad4288 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1104,6 +1104,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
if (ieee80211_hw_check(&local->hw, CHANCTX_STA_CSA))
local->ext_capa[0] |= WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING;

+ /* mac80211 supports multi BSSID, if the driver supports it */
+ if (ieee80211_hw_check(&local->hw, SUPPORTS_MULTI_BSSID))
+ local->ext_capa[2] |= WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT;
+
local->hw.wiphy->max_num_csa_counters = IEEE80211_MAX_CSA_COUNTERS_NUM;

result = wiphy_register(local->hw.wiphy);
--
2.7.4


2018-12-07 21:11:19

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 2/5] cfg80211: Properly track transmitting and non-transmitting BSS

Hi Sara,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mac80211-next/master]
[also build test ERROR on v4.20-rc5 next-20181207]
[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: i386-randconfig-x011-201848 (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=i386

All errors (new ones prefixed by >>):

In file included from net/wireless/nl80211.h:9:0,
from net/wireless/ibss.c:14:
net/wireless/core.h: In function 'cfg80211_hold_bss':
>> net/wireless/core.h:184:20: error: inlining failed in call to always_inline 'cfg80211_hold_bss': recursive inlining
static inline void cfg80211_hold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~
net/wireless/core.h:188:3: note: called from here
cfg80211_hold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function 'cfg80211_unhold_bss':
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function '__cfg80211_clear_ibss.constprop':
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function '__cfg80211_ibss_joined':
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
>> net/wireless/core.h:184:20: error: inlining failed in call to always_inline 'cfg80211_hold_bss': recursive inlining
static inline void cfg80211_hold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~
net/wireless/core.h:188:3: note: called from here
cfg80211_hold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
--
In file included from net/wireless/nl80211.h:9:0,
from net/wireless/sme.c:21:
net/wireless/core.h: In function 'cfg80211_hold_bss':
>> net/wireless/core.h:184:20: error: inlining failed in call to always_inline 'cfg80211_hold_bss': recursive inlining
static inline void cfg80211_hold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~
net/wireless/core.h:188:3: note: called from here
cfg80211_hold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function 'cfg80211_unhold_bss':
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function '__cfg80211_connect_result':
>> net/wireless/core.h:184:20: error: inlining failed in call to always_inline 'cfg80211_hold_bss': recursive inlining
static inline void cfg80211_hold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~
net/wireless/core.h:188:3: note: called from here
cfg80211_hold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function 'cfg80211_connect_done':
>> net/wireless/core.h:184:20: error: inlining failed in call to always_inline 'cfg80211_hold_bss': recursive inlining
static inline void cfg80211_hold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~
net/wireless/core.h:188:3: note: called from here
cfg80211_hold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function '__cfg80211_roamed':
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
>> net/wireless/core.h:184:20: error: inlining failed in call to always_inline 'cfg80211_hold_bss': recursive inlining
static inline void cfg80211_hold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~
net/wireless/core.h:188:3: note: called from here
cfg80211_hold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function '__cfg80211_disconnected':
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function 'cfg80211_connect':
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
--
In file included from net/wireless/nl80211.h:9:0,
from net/wireless/core.c:26:
net/wireless/core.h: In function 'cfg80211_unhold_bss':
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function 'cfg80211_netdev_notifier_call':
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
--
In file included from net/wireless/mlme.c:18:0:
net/wireless/core.h: In function 'cfg80211_hold_bss':
>> net/wireless/core.h:184:20: error: inlining failed in call to always_inline 'cfg80211_hold_bss': recursive inlining
static inline void cfg80211_hold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~
net/wireless/core.h:188:3: note: called from here
cfg80211_hold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function 'cfg80211_unhold_bss':
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function 'cfg80211_rx_assoc_resp':
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function 'cfg80211_assoc_timeout':
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function 'cfg80211_abandon_assoc':
>> net/wireless/core.h:193:20: error: inlining failed in call to always_inline 'cfg80211_unhold_bss': recursive inlining
static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~~~
net/wireless/core.h:198:3: note: called from here
cfg80211_unhold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~
net/wireless/core.h: In function 'cfg80211_mlme_assoc':
>> net/wireless/core.h:184:20: error: inlining failed in call to always_inline 'cfg80211_hold_bss': recursive inlining
static inline void cfg80211_hold_bss(struct cfg80211_internal_bss *bss)
^~~~~~~~~~~~~~~~~
net/wireless/core.h:188:3: note: called from here
cfg80211_hold_bss(container_of(bss->transmitted_bss,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struct cfg80211_internal_bss,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub));
~~~~~

vim +/cfg80211_hold_bss +184 net/wireless/core.h

19957bb3 Johannes Berg 2009-07-02 183
19957bb3 Johannes Berg 2009-07-02 @184 static inline void cfg80211_hold_bss(struct cfg80211_internal_bss *bss)
19957bb3 Johannes Berg 2009-07-02 185 {
19957bb3 Johannes Berg 2009-07-02 186 atomic_inc(&bss->hold);
ac02934e Sara Sharon 2018-12-07 187 if (bss->transmitted_bss)
ac02934e Sara Sharon 2018-12-07 @188 cfg80211_hold_bss(container_of(bss->transmitted_bss,
ac02934e Sara Sharon 2018-12-07 189 struct cfg80211_internal_bss,
ac02934e Sara Sharon 2018-12-07 190 pub));
19957bb3 Johannes Berg 2009-07-02 191 }
19957bb3 Johannes Berg 2009-07-02 192
19957bb3 Johannes Berg 2009-07-02 @193 static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss)
19957bb3 Johannes Berg 2009-07-02 194 {
19957bb3 Johannes Berg 2009-07-02 195 int r = atomic_dec_return(&bss->hold);
19957bb3 Johannes Berg 2009-07-02 196 WARN_ON(r < 0);
ac02934e Sara Sharon 2018-12-07 197 if (bss->transmitted_bss)
ac02934e Sara Sharon 2018-12-07 198 cfg80211_unhold_bss(container_of(bss->transmitted_bss,
ac02934e Sara Sharon 2018-12-07 199 struct cfg80211_internal_bss,
ac02934e Sara Sharon 2018-12-07 200 pub));
19957bb3 Johannes Berg 2009-07-02 201 }
19957bb3 Johannes Berg 2009-07-02 202

:::::: The code at line 184 was first introduced by commit
:::::: 19957bb399e2722719c0e20c9ae91cf8b6aaff04 cfg80211: keep track of BSSes

:::::: TO: Johannes Berg <[email protected]>
:::::: CC: John W. Linville <[email protected]>

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


Attachments:
(No filename) (15.99 kB)
.config.gz (26.91 kB)
Download all attachments

2018-12-09 09:17:25

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 3/5] cfg80211: Move Multiple BSS info to struct cfg80211_bss to be visible

Hi Sara,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mac80211-next/master]
[also build test WARNING on v4.20-rc5 next-20181207]
[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
reproduce: make htmldocs

All warnings (new ones prefixed by >>):

kernel/resource.c:337: warning: Function parameter or member 'flags' not described in 'find_next_iomem_res'
kernel/resource.c:337: warning: Function parameter or member 'desc' not described in 'find_next_iomem_res'
kernel/resource.c:337: warning: Function parameter or member 'first_lvl' not described in 'find_next_iomem_res'
kernel/resource.c:337: warning: Function parameter or member 'res' not described in 'find_next_iomem_res'
kernel/resource.c:409: warning: Function parameter or member 'arg' not described in 'walk_iomem_res_desc'
kernel/resource.c:409: warning: Function parameter or member 'func' not described in 'walk_iomem_res_desc'
kernel/resource.c:409: warning: Function parameter or member 'arg' not described in 'walk_iomem_res_desc'
kernel/resource.c:409: warning: Function parameter or member 'func' not described in 'walk_iomem_res_desc'
include/linux/rcutree.h:1: warning: no structured comments found
kernel/rcu/tree.c:684: warning: Excess function parameter 'irq' description in 'rcu_nmi_exit'
include/linux/srcu.h:175: warning: Function parameter or member 'p' not described in 'srcu_dereference_notrace'
include/linux/srcu.h:175: warning: Function parameter or member 'sp' not described in 'srcu_dereference_notrace'
include/linux/gfp.h:1: warning: no structured comments found
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:4687: warning: Function parameter or member 'wext.ibss' not described in 'wireless_dev'
include/net/cfg80211.h:4687: warning: Function parameter or member 'wext.connect' not described in 'wireless_dev'
include/net/cfg80211.h:4687: warning: Function parameter or member 'wext.keys' not described in 'wireless_dev'
include/net/cfg80211.h:4687: warning: Function parameter or member 'wext.ie' not described in 'wireless_dev'
include/net/cfg80211.h:4687: warning: Function parameter or member 'wext.ie_len' not described in 'wireless_dev'
include/net/cfg80211.h:4687: warning: Function parameter or member 'wext.bssid' not described in 'wireless_dev'
include/net/cfg80211.h:4687: warning: Function parameter or member 'wext.ssid' not described in 'wireless_dev'
include/net/cfg80211.h:4687: warning: Function parameter or member 'wext.default_key' not described in 'wireless_dev'
include/net/cfg80211.h:4687: warning: Function parameter or member 'wext.default_mgmt_key' not described in 'wireless_dev'
include/net/cfg80211.h:4687: warning: Function parameter or member 'wext.prev_bssid_valid' not described in 'wireless_dev'
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
>> include/net/cfg80211.h:2035: warning: Function parameter or member 'transmitted_bss' not described in 'cfg80211_bss'
>> include/net/cfg80211.h:2035: warning: Function parameter or member 'nontrans_list' not described in 'cfg80211_bss'
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/cfg80211.h:2848: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:2390: warning: Function parameter or member 'radiotap_timestamp.units_pos' not described in 'ieee80211_hw'
include/net/mac80211.h:2390: warning: Function parameter or member 'radiotap_timestamp.accuracy' not described in 'ieee80211_hw'
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:1001: warning: Function parameter or member 'control.rates' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'control.rts_cts_rate_idx' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'control.use_rts' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'control.use_cts_prot' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'control.short_preamble' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'control.skip_table' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'control.jiffies' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'control.vif' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'control.hw_key' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'control.flags' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'control.enqueue_time' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'ack' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'ack.cookie' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'status.rates' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'status.ack_signal' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'status.ampdu_ack_len' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'status.ampdu_len' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'status.antenna' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'status.tx_time' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'status.is_valid_ack_signal' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'status.status_driver_data' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'driver_rates' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'pad' not described in 'ieee80211_tx_info'
include/net/mac80211.h:1001: warning: Function parameter or member 'rate_driver_data' not described in 'ieee80211_tx_info'
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '
include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params '

vim +2035 include/net/cfg80211.h

9caf0364 Johannes Berg 2012-11-29 1983
9caf0364 Johannes Berg 2012-11-29 1984 /**
2a519311 Johannes Berg 2009-02-10 1985 * struct cfg80211_bss - BSS description
2a519311 Johannes Berg 2009-02-10 1986 *
2a519311 Johannes Berg 2009-02-10 1987 * This structure describes a BSS (which may also be a mesh network)
2a519311 Johannes Berg 2009-02-10 1988 * for use in scan results and similar.
2a519311 Johannes Berg 2009-02-10 1989 *
abe37c4b Johannes Berg 2010-06-07 1990 * @channel: channel this BSS is on
dcd6eac1 Simon Wunderlich 2013-07-08 1991 * @scan_width: width of the control channel
2a519311 Johannes Berg 2009-02-10 1992 * @bssid: BSSID of the BSS
2a519311 Johannes Berg 2009-02-10 1993 * @beacon_interval: the beacon interval as from the frame
2a519311 Johannes Berg 2009-02-10 1994 * @capability: the capability field in host byte order
83c7aa1a Johannes Berg 2013-02-05 1995 * @ies: the information elements (Note that there is no guarantee that these
83c7aa1a Johannes Berg 2013-02-05 1996 * are well-formed!); this is a pointer to either the beacon_ies or
83c7aa1a Johannes Berg 2013-02-05 1997 * proberesp_ies depending on whether Probe Response frame has been
83c7aa1a Johannes Berg 2013-02-05 1998 * received. It is always non-%NULL.
34a6eddb Jouni Malinen 2010-01-06 1999 * @beacon_ies: the information elements from the last Beacon frame
776b3580 Johannes Berg 2013-02-01 2000 * (implementation note: if @hidden_beacon_bss is set this struct doesn't
776b3580 Johannes Berg 2013-02-01 2001 * own the beacon_ies, but they're just pointers to the ones from the
776b3580 Johannes Berg 2013-02-01 2002 * @hidden_beacon_bss struct)
34a6eddb Jouni Malinen 2010-01-06 2003 * @proberesp_ies: the information elements from the last Probe Response frame
776b3580 Johannes Berg 2013-02-01 2004 * @hidden_beacon_bss: in case this BSS struct represents a probe response from
776b3580 Johannes Berg 2013-02-01 2005 * a BSS that hides the SSID in its beacon, this points to the BSS struct
776b3580 Johannes Berg 2013-02-01 2006 * that holds the beacon data. @beacon_ies is still valid, of course, and
776b3580 Johannes Berg 2013-02-01 2007 * points to the same data as hidden_beacon_bss->beacon_ies in that case.
77965c97 Johannes Berg 2009-02-18 2008 * @signal: signal strength value (type depends on the wiphy's signal_type)
983dafaa Sunil Dutt 2017-12-13 2009 * @chains: bitmask for filled values in @chain_signal.
983dafaa Sunil Dutt 2017-12-13 2010 * @chain_signal: per-chain signal strength of last received BSS in dBm.
2a519311 Johannes Berg 2009-02-10 2011 * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes
2a519311 Johannes Berg 2009-02-10 2012 */
2a519311 Johannes Berg 2009-02-10 2013 struct cfg80211_bss {
2a519311 Johannes Berg 2009-02-10 2014 struct ieee80211_channel *channel;
dcd6eac1 Simon Wunderlich 2013-07-08 2015 enum nl80211_bss_scan_width scan_width;
2a519311 Johannes Berg 2009-02-10 2016
9caf0364 Johannes Berg 2012-11-29 2017 const struct cfg80211_bss_ies __rcu *ies;
9caf0364 Johannes Berg 2012-11-29 2018 const struct cfg80211_bss_ies __rcu *beacon_ies;
9caf0364 Johannes Berg 2012-11-29 2019 const struct cfg80211_bss_ies __rcu *proberesp_ies;
9caf0364 Johannes Berg 2012-11-29 2020
776b3580 Johannes Berg 2013-02-01 2021 struct cfg80211_bss *hidden_beacon_bss;
6ff7973a Sara Sharon 2018-12-07 2022 struct cfg80211_bss *transmitted_bss;
6ff7973a Sara Sharon 2018-12-07 2023 struct list_head nontrans_list;
9caf0364 Johannes Berg 2012-11-29 2024
9caf0364 Johannes Berg 2012-11-29 2025 s32 signal;
9caf0364 Johannes Berg 2012-11-29 2026
2a519311 Johannes Berg 2009-02-10 2027 u16 beacon_interval;
2a519311 Johannes Berg 2009-02-10 2028 u16 capability;
2a519311 Johannes Berg 2009-02-10 2029
9caf0364 Johannes Berg 2012-11-29 2030 u8 bssid[ETH_ALEN];
983dafaa Sunil Dutt 2017-12-13 2031 u8 chains;
983dafaa Sunil Dutt 2017-12-13 2032 s8 chain_signal[IEEE80211_MAX_CHAINS];
2a519311 Johannes Berg 2009-02-10 2033
1c06ef98 Johannes Berg 2012-12-28 2034 u8 priv[0] __aligned(sizeof(void *));
2a519311 Johannes Berg 2009-02-10 @2035 };
2a519311 Johannes Berg 2009-02-10 2036

:::::: The code at line 2035 was first introduced by commit
:::::: 2a5193119269062608582418deba7af82844159a cfg80211/nl80211: scanning (and mac80211 update to use it)

:::::: TO: Johannes Berg <[email protected]>
:::::: CC: John W. Linville <[email protected]>

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


Attachments:
(No filename) (28.69 kB)
.config.gz (6.44 kB)
Download all attachments

2018-12-19 12:16:57

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 5/5] mac80211_hwsim: Declare support for Multi-BSSID

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 <[email protected]>
:::::: CC: 0day robot <[email protected]>

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


Attachments:
(No filename) (3.55 kB)
.config.gz (65.01 kB)
Download all attachments