History

cfg80211: add bss_type and privacy arguments in cfg80211_get_bss()

802.11ad adds new a network type (PBSS) and changes the capability field interpretation for the DMG (60G) band. The same 2 bits that were interpreted as "ESS" and "IBSS" before are re-used as a 2-bit field with 3 valid values (and 1 reserved). Valid values are: "IBSS", "PBSS" (new) and "AP". In order to get the BSS struct for the new PBSS networks, change the cfg80211_get_bss() function to take a new enum ieee80211_bss_type argument with the valid network types, as "capa_mask" and "capa_val" no longer work correctly (the search must be band-aware now.) The remaining bits in "capa_mask" and "capa_val" are used only for privacy matching so replace those two with a privacy enum as well.

Dedy Lansky committed 11 years ago

Commit 6eb18131 parent 76a70e913 files · +168 −80Browse files

Unified · Split

13 files
  1. drivers/net/wireless/ath/ath10k/mac.c +2 −1
  2. drivers/net/wireless/ath/ath6kl/cfg80211.c +5 −4
  3. drivers/net/wireless/ath/wil6210/cfg80211.c +1 −1
  4. drivers/net/wireless/cw1200/sta.c +2 −2
  5. drivers/net/wireless/libertas/cfg.c +3 −3
  6. drivers/net/wireless/mwifiex/cfg80211.c +4 −4
  7. include/net/cfg80211.h +37 −2
  8. net/mac80211/ibss.c +12 −31
  9. net/wireless/ibss.c +1 −1
  10. net/wireless/mlme.c +4 −2
  11. net/wireless/scan.c +78 −8
  12. net/wireless/sme.c +6 −10
  13. net/wireless/trace.h +13 −11
drivers/net/wireless/ath/ath10k/mac.c+2−1
@@ -1386,7 +1386,8 @@ static void ath10k_peer_assoc_h_crypto(struct ath10k *ar, · 1385 unmodified lines
13861386 lockdep_assert_held(&ar->conf_mutex);
13871387
13881388 bss = cfg80211_get_bss(ar->hw->wiphy, ar->hw->conf.chandef.chan,
1389− info->bssid, NULL, 0, 0, 0);
1389+ info->bssid, NULL, 0, IEEE80211_BSS_TYPE_ANY,
1390+ IEEE80211_PRIVACY_ANY);
13901391 if (bss) {
13911392 const struct cfg80211_bss_ies *ies;
13921393
drivers/net/wireless/ath/ath6kl/cfg80211.c+5−4
@@ -686,20 +686,21 @@ ath6kl_add_bss_if_needed(struct ath6kl_vif *vif, · 685 unmodified lines
686686 {
687687 struct ath6kl *ar = vif->ar;
688688 struct cfg80211_bss *bss;
689− u16 cap_mask, cap_val;
689+ u16 cap_val;
690+ enum ieee80211_bss_type bss_type;
690691 u8 *ie;
691692
692693 if (nw_type & ADHOC_NETWORK) {
693− cap_mask = WLAN_CAPABILITY_IBSS;
694694 cap_val = WLAN_CAPABILITY_IBSS;
695+ bss_type = IEEE80211_BSS_TYPE_IBSS;
695696 } else {
696− cap_mask = WLAN_CAPABILITY_ESS;
697697 cap_val = WLAN_CAPABILITY_ESS;
698+ bss_type = IEEE80211_BSS_TYPE_ESS;
698699 }
699700
700701 bss = cfg80211_get_bss(ar->wiphy, chan, bssid,
701702 vif->ssid, vif->ssid_len,
702− cap_mask, cap_val);
703+ bss_type, IEEE80211_PRIVACY_ANY);
703704 if (bss == NULL) {
704705 /*
705706 * Since cfg80211 may not yet know about the BSS,
drivers/net/wireless/ath/wil6210/cfg80211.c+1−1
@@ -395,7 +395,7 @@ static int wil_cfg80211_connect(struct wiphy *wiphy, · 394 unmodified lines
395395
396396 bss = cfg80211_get_bss(wiphy, sme->channel, sme->bssid,
397397 sme->ssid, sme->ssid_len,
398− WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
398+ IEEE80211_BSS_TYPE_ESS, IEEE80211_PRIVACY_ANY);
399399 if (!bss) {
400400 wil_err(wil, "Unable to find BSS\n");
401401 return -ENOENT;
drivers/net/wireless/cw1200/sta.c+2−2
@@ -1240,8 +1240,8 @@ static void cw1200_do_join(struct cw1200_common *priv) · 1239 unmodified lines
12401240
12411241 bssid = priv->vif->bss_conf.bssid;
12421242
1243− bss = cfg80211_get_bss(priv->hw->wiphy, priv->channel,
1244− bssid, NULL, 0, 0, 0);
1243+ bss = cfg80211_get_bss(priv->hw->wiphy, priv->channel, bssid, NULL, 0,
1244+ IEEE80211_BSS_TYPE_ANY, IEEE80211_PRIVACY_ANY);
12451245
12461246 if (!bss && !conf->ibss_joined) {
12471247 wsm_unlock_tx(priv);
drivers/net/wireless/libertas/cfg.c+3−3
@@ -1356,8 +1356,8 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev, · 1355 unmodified lines
13561356
13571357 /* Find the BSS we want using available scan results */
13581358 bss = cfg80211_get_bss(wiphy, sme->channel, sme->bssid,
1359− sme->ssid, sme->ssid_len,
1360− WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
1359+ sme->ssid, sme->ssid_len, IEEE80211_BSS_TYPE_ESS,
1360+ IEEE80211_PRIVACY_ANY);
13611361 if (!bss) {
13621362 wiphy_err(wiphy, "assoc: bss %pM not in scan results\n",
13631363 sme->bssid);
@@ -2000,7 +2000,7 @@ static int lbs_join_ibss(struct wiphy *wiphy, struct net_device *dev, · 636 unmodified lines
20002000 * bss list is populated already */
20012001 bss = cfg80211_get_bss(wiphy, params->chandef.chan, params->bssid,
20022002 params->ssid, params->ssid_len,
2003− WLAN_CAPABILITY_IBSS, WLAN_CAPABILITY_IBSS);
2003+ IEEE80211_BSS_TYPE_IBSS, IEEE80211_PRIVACY_ANY);
20042004
20052005 if (bss) {
20062006 ret = lbs_ibss_join_existing(priv, params, bss);
drivers/net/wireless/mwifiex/cfg80211.c+4−4
@@ -1954,13 +1954,13 @@ done: · 1953 unmodified lines
19541954 if (mode == NL80211_IFTYPE_ADHOC)
19551955 bss = cfg80211_get_bss(priv->wdev.wiphy, channel,
19561956 bssid, ssid, ssid_len,
1957− WLAN_CAPABILITY_IBSS,
1958− WLAN_CAPABILITY_IBSS);
1957+ IEEE80211_BSS_TYPE_IBSS,
1958+ IEEE80211_PRIVACY_ANY);
19591959 else
19601960 bss = cfg80211_get_bss(priv->wdev.wiphy, channel,
19611961 bssid, ssid, ssid_len,
1962− WLAN_CAPABILITY_ESS,
1963− WLAN_CAPABILITY_ESS);
1962+ IEEE80211_BSS_TYPE_ESS,
1963+ IEEE80211_PRIVACY_ANY);
19641964
19651965 if (!bss) {
19661966 if (is_scanning_required) {
include/net/cfg80211.h+37−2
@@ -214,6 +214,39 @@ enum ieee80211_rate_flags { · 213 unmodified lines
214214 IEEE80211_RATE_SUPPORTS_10MHZ = 1<<6,
215215 };
216216
217+/**
218+ * enum ieee80211_bss_type - BSS type filter
219+ *
220+ * @IEEE80211_BSS_TYPE_ESS: Infrastructure BSS
221+ * @IEEE80211_BSS_TYPE_PBSS: Personal BSS
222+ * @IEEE80211_BSS_TYPE_IBSS: Independent BSS
223+ * @IEEE80211_BSS_TYPE_MBSS: Mesh BSS
224+ * @IEEE80211_BSS_TYPE_ANY: Wildcard value for matching any BSS type
225+ */
226+enum ieee80211_bss_type {
227+ IEEE80211_BSS_TYPE_ESS,
228+ IEEE80211_BSS_TYPE_PBSS,
229+ IEEE80211_BSS_TYPE_IBSS,
230+ IEEE80211_BSS_TYPE_MBSS,
231+ IEEE80211_BSS_TYPE_ANY
232+};
233+
234+/**
235+ * enum ieee80211_privacy - BSS privacy filter
236+ *
237+ * @IEEE80211_PRIVACY_ON: privacy bit set
238+ * @IEEE80211_PRIVACY_OFF: privacy bit clear
239+ * @IEEE80211_PRIVACY_ANY: Wildcard value for matching any privacy setting
240+ */
241+enum ieee80211_privacy {
242+ IEEE80211_PRIVACY_ON,
243+ IEEE80211_PRIVACY_OFF,
244+ IEEE80211_PRIVACY_ANY
245+};
246+
247+#define IEEE80211_PRIVACY(x) \
248+ ((x) ? IEEE80211_PRIVACY_ON : IEEE80211_PRIVACY_OFF)
249+
217250 /**
218251 * struct ieee80211_rate - bitrate definition
219252 *
@@ -4012,14 +4045,16 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy, · 3792 unmodified lines
40124045 struct ieee80211_channel *channel,
40134046 const u8 *bssid,
40144047 const u8 *ssid, size_t ssid_len,
4015− u16 capa_mask, u16 capa_val);
4048+ enum ieee80211_bss_type bss_type,
4049+ enum ieee80211_privacy);
40164050 static inline struct cfg80211_bss *
40174051 cfg80211_get_ibss(struct wiphy *wiphy,
40184052 struct ieee80211_channel *channel,
40194053 const u8 *ssid, size_t ssid_len)
40204054 {
40214055 return cfg80211_get_bss(wiphy, channel, NULL, ssid, ssid_len,
4022− WLAN_CAPABILITY_IBSS, WLAN_CAPABILITY_IBSS);
4056+ IEEE80211_BSS_TYPE_IBSS,
4057+ IEEE80211_PRIVACY_ANY);
40234058 }
40244059
40254060 /**
net/mac80211/ibss.c+12−31
@@ -470,22 +470,19 @@ int ieee80211_ibss_csa_beacon(struct ieee80211_sub_if_data *sdata, · 469 unmodified lines
470470 struct beacon_data *presp, *old_presp;
471471 struct cfg80211_bss *cbss;
472472 const struct cfg80211_bss_ies *ies;
473− u16 capability;
473+ u16 capability = 0;
474474 u64 tsf;
475475 int ret = 0;
476476
477477 sdata_assert_lock(sdata);
478478
479− capability = WLAN_CAPABILITY_IBSS;
480−
481479 if (ifibss->privacy)
482− capability |= WLAN_CAPABILITY_PRIVACY;
480+ capability = WLAN_CAPABILITY_PRIVACY;
483481
484482 cbss = cfg80211_get_bss(sdata->local->hw.wiphy, ifibss->chandef.chan,
485483 ifibss->bssid, ifibss->ssid,
486− ifibss->ssid_len, WLAN_CAPABILITY_IBSS |
487− WLAN_CAPABILITY_PRIVACY,
488− capability);
484+ ifibss->ssid_len, IEEE80211_BSS_TYPE_IBSS,
485+ IEEE80211_PRIVACY(ifibss->privacy));
489486
490487 if (WARN_ON(!cbss)) {
491488 ret = -EINVAL;
@@ -525,23 +522,17 @@ int ieee80211_ibss_finish_csa(struct ieee80211_sub_if_data *sdata) · 33 unmodified lines
525522 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
526523 struct cfg80211_bss *cbss;
527524 int err, changed = 0;
528− u16 capability;
529525
530526 sdata_assert_lock(sdata);
531527
532528 /* update cfg80211 bss information with the new channel */
533529 if (!is_zero_ether_addr(ifibss->bssid)) {
534− capability = WLAN_CAPABILITY_IBSS;
535−
536− if (ifibss->privacy)
537− capability |= WLAN_CAPABILITY_PRIVACY;
538−
539530 cbss = cfg80211_get_bss(sdata->local->hw.wiphy,
540531 ifibss->chandef.chan,
541532 ifibss->bssid, ifibss->ssid,
542− ifibss->ssid_len, WLAN_CAPABILITY_IBSS |
543− WLAN_CAPABILITY_PRIVACY,
544− capability);
533+ ifibss->ssid_len,
534+ IEEE80211_BSS_TYPE_IBSS,
535+ IEEE80211_PRIVACY(ifibss->privacy));
545536 /* XXX: should not really modify cfg80211 data */
546537 if (cbss) {
547538 cbss->channel = sdata->csa_chandef.chan;
@@ -682,19 +673,13 @@ static void ieee80211_ibss_disconnect(struct ieee80211_sub_if_data *sdata) · 134 unmodified lines
682673 struct cfg80211_bss *cbss;
683674 struct beacon_data *presp;
684675 struct sta_info *sta;
685− u16 capability;
686676
687677 if (!is_zero_ether_addr(ifibss->bssid)) {
688− capability = WLAN_CAPABILITY_IBSS;
689−
690− if (ifibss->privacy)
691− capability |= WLAN_CAPABILITY_PRIVACY;
692−
693678 cbss = cfg80211_get_bss(local->hw.wiphy, ifibss->chandef.chan,
694679 ifibss->bssid, ifibss->ssid,
695− ifibss->ssid_len, WLAN_CAPABILITY_IBSS |
696− WLAN_CAPABILITY_PRIVACY,
697− capability);
680+ ifibss->ssid_len,
681+ IEEE80211_BSS_TYPE_IBSS,
682+ IEEE80211_PRIVACY(ifibss->privacy));
698683
699684 if (cbss) {
700685 cfg80211_unlink_bss(local->hw.wiphy, cbss);
@@ -1325,7 +1310,6 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) · 624 unmodified lines
13251310 const u8 *bssid = NULL;
13261311 enum nl80211_bss_scan_width scan_width;
13271312 int active_ibss;
1328− u16 capability;
13291313
13301314 sdata_assert_lock(sdata);
13311315
@@ -1335,9 +1319,6 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) · 3 unmodified lines
13351319 if (active_ibss)
13361320 return;
13371321
1338− capability = WLAN_CAPABILITY_IBSS;
1339− if (ifibss->privacy)
1340− capability |= WLAN_CAPABILITY_PRIVACY;
13411322 if (ifibss->fixed_bssid)
13421323 bssid = ifibss->bssid;
13431324 if (ifibss->fixed_channel)
@@ -1346,8 +1327,8 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) · 2 unmodified lines
13461327 bssid = ifibss->bssid;
13471328 cbss = cfg80211_get_bss(local->hw.wiphy, chan, bssid,
13481329 ifibss->ssid, ifibss->ssid_len,
1349− WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_PRIVACY,
1350− capability);
1330+ IEEE80211_BSS_TYPE_IBSS,
1331+ IEEE80211_PRIVACY(ifibss->privacy));
13511332
13521333 if (cbss) {
13531334 struct ieee80211_bss *bss;
net/wireless/ibss.c+1−1
@@ -30,7 +30,7 @@ void __cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, · 29 unmodified lines
3030 return;
3131
3232 bss = cfg80211_get_bss(wdev->wiphy, channel, bssid, NULL, 0,
33− WLAN_CAPABILITY_IBSS, WLAN_CAPABILITY_IBSS);
33+ IEEE80211_BSS_TYPE_IBSS, IEEE80211_PRIVACY_ANY);
3434
3535 if (WARN_ON(!bss))
3636 return;
net/wireless/mlme.c+4−2
@@ -229,7 +229,8 @@ int cfg80211_mlme_auth(struct cfg80211_registered_device *rdev, · 228 unmodified lines
229229 return -EALREADY;
230230
231231 req.bss = cfg80211_get_bss(&rdev->wiphy, chan, bssid, ssid, ssid_len,
232− WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
232+ IEEE80211_BSS_TYPE_ESS,
233+ IEEE80211_PRIVACY_ANY);
233234 if (!req.bss)
234235 return -ENOENT;
235236
@@ -296,7 +297,8 @@ int cfg80211_mlme_assoc(struct cfg80211_registered_device *rdev, · 60 unmodified lines
296297 rdev->wiphy.vht_capa_mod_mask);
297298
298299 req->bss = cfg80211_get_bss(&rdev->wiphy, chan, bssid, ssid, ssid_len,
299− WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
300+ IEEE80211_BSS_TYPE_ESS,
301+ IEEE80211_PRIVACY_ANY);
300302 if (!req->bss)
301303 return -ENOENT;
302304
net/wireless/scan.c+78−8
@@ -531,24 +531,78 @@ static int cmp_bss(struct cfg80211_bss *a, · 530 unmodified lines
531531 }
532532 }
533533
534+static bool cfg80211_bss_type_match(u16 capability,
535+ enum ieee80211_band band,
536+ enum ieee80211_bss_type bss_type)
537+{
538+ bool ret = true;
539+ u16 mask, val;
540+
541+ if (bss_type == IEEE80211_BSS_TYPE_ANY)
542+ return ret;
543+
544+ if (band == IEEE80211_BAND_60GHZ) {
545+ mask = WLAN_CAPABILITY_DMG_TYPE_MASK;
546+ switch (bss_type) {
547+ case IEEE80211_BSS_TYPE_ESS:
548+ val = WLAN_CAPABILITY_DMG_TYPE_AP;
549+ break;
550+ case IEEE80211_BSS_TYPE_PBSS:
551+ val = WLAN_CAPABILITY_DMG_TYPE_PBSS;
552+ break;
553+ case IEEE80211_BSS_TYPE_IBSS:
554+ val = WLAN_CAPABILITY_DMG_TYPE_IBSS;
555+ break;
556+ default:
557+ return false;
558+ }
559+ } else {
560+ mask = WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS;
561+ switch (bss_type) {
562+ case IEEE80211_BSS_TYPE_ESS:
563+ val = WLAN_CAPABILITY_ESS;
564+ break;
565+ case IEEE80211_BSS_TYPE_IBSS:
566+ val = WLAN_CAPABILITY_IBSS;
567+ break;
568+ case IEEE80211_BSS_TYPE_MBSS:
569+ val = 0;
570+ break;
571+ default:
572+ return false;
573+ }
574+ }
575+
576+ ret = ((capability & mask) == val);
577+ return ret;
578+}
579+
534580 /* Returned bss is reference counted and must be cleaned up appropriately. */
535581 struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
536582 struct ieee80211_channel *channel,
537583 const u8 *bssid,
538584 const u8 *ssid, size_t ssid_len,
539− u16 capa_mask, u16 capa_val)
585+ enum ieee80211_bss_type bss_type,
586+ enum ieee80211_privacy privacy)
540587 {
541588 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
542589 struct cfg80211_internal_bss *bss, *res = NULL;
543590 unsigned long now = jiffies;
591+ int bss_privacy;
544592
545− trace_cfg80211_get_bss(wiphy, channel, bssid, ssid, ssid_len, capa_mask,
546− capa_val);
593+ trace_cfg80211_get_bss(wiphy, channel, bssid, ssid, ssid_len, bss_type,
594+ privacy);
547595
548596 spin_lock_bh(&rdev->bss_lock);
549597
550598 list_for_each_entry(bss, &rdev->bss_list, list) {
551− if ((bss->pub.capability & capa_mask) != capa_val)
599+ if (!cfg80211_bss_type_match(bss->pub.capability,
600+ bss->pub.channel->band, bss_type))
601+ continue;
602+
603+ bss_privacy = (bss->pub.capability & WLAN_CAPABILITY_PRIVACY);
604+ if ((privacy == IEEE80211_PRIVACY_ON && !bss_privacy) ||
605+ (privacy == IEEE80211_PRIVACY_OFF && bss_privacy))
552606 continue;
553607 if (channel && bss->pub.channel != channel)
554608 continue;
@@ -896,6 +950,7 @@ cfg80211_inform_bss_width(struct wiphy *wiphy, · 341 unmodified lines
896950 struct cfg80211_bss_ies *ies;
897951 struct ieee80211_channel *channel;
898952 struct cfg80211_internal_bss tmp = {}, *res;
953+ int bss_type;
899954 bool signal_valid;
900955
901956 if (WARN_ON(!wiphy))
@@ -950,8 +1005,15 @@ cfg80211_inform_bss_width(struct wiphy *wiphy, · 48 unmodified lines
9501005 if (!res)
9511006 return NULL;
9521007
953− if (res->pub.capability & WLAN_CAPABILITY_ESS)
954− regulatory_hint_found_beacon(wiphy, channel, gfp);
1008+ if (channel->band == IEEE80211_BAND_60GHZ) {
1009+ bss_type = res->pub.capability & WLAN_CAPABILITY_DMG_TYPE_MASK;
1010+ if (bss_type == WLAN_CAPABILITY_DMG_TYPE_AP ||
1011+ bss_type == WLAN_CAPABILITY_DMG_TYPE_PBSS)
1012+ regulatory_hint_found_beacon(wiphy, channel, gfp);
1013+ } else {
1014+ if (res->pub.capability & WLAN_CAPABILITY_ESS)
1015+ regulatory_hint_found_beacon(wiphy, channel, gfp);
1016+ }
9551017
9561018 trace_cfg80211_return_bss(&res->pub);
9571019 /* cfg80211_bss_update gives us a referenced result */
@@ -973,6 +1035,7 @@ cfg80211_inform_bss_width_frame(struct wiphy *wiphy, · 15 unmodified lines
9731035 bool signal_valid;
9741036 size_t ielen = len - offsetof(struct ieee80211_mgmt,
9751037 u.probe_resp.variable);
1038+ int bss_type;
9761039
9771040 BUILD_BUG_ON(offsetof(struct ieee80211_mgmt, u.probe_resp.variable) !=
9781041 offsetof(struct ieee80211_mgmt, u.beacon.variable));
@@ -1025,8 +1088,15 @@ cfg80211_inform_bss_width_frame(struct wiphy *wiphy, · 46 unmodified lines
10251088 if (!res)
10261089 return NULL;
10271090
1028− if (res->pub.capability & WLAN_CAPABILITY_ESS)
1029− regulatory_hint_found_beacon(wiphy, channel, gfp);
1091+ if (channel->band == IEEE80211_BAND_60GHZ) {
1092+ bss_type = res->pub.capability & WLAN_CAPABILITY_DMG_TYPE_MASK;
1093+ if (bss_type == WLAN_CAPABILITY_DMG_TYPE_AP ||
1094+ bss_type == WLAN_CAPABILITY_DMG_TYPE_PBSS)
1095+ regulatory_hint_found_beacon(wiphy, channel, gfp);
1096+ } else {
1097+ if (res->pub.capability & WLAN_CAPABILITY_ESS)
1098+ regulatory_hint_found_beacon(wiphy, channel, gfp);
1099+ }
10301100
10311101 trace_cfg80211_return_bss(&res->pub);
10321102 /* cfg80211_bss_update gives us a referenced result */
net/wireless/sme.c+6−10
@@ -257,19 +257,15 @@ static struct cfg80211_bss *cfg80211_get_conn_bss(struct wireless_dev *wdev) · 256 unmodified lines
257257 {
258258 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
259259 struct cfg80211_bss *bss;
260− u16 capa = WLAN_CAPABILITY_ESS;
261260
262261 ASSERT_WDEV_LOCK(wdev);
263262
264− if (wdev->conn->params.privacy)
265− capa |= WLAN_CAPABILITY_PRIVACY;
266−
267263 bss = cfg80211_get_bss(wdev->wiphy, wdev->conn->params.channel,
268264 wdev->conn->params.bssid,
269265 wdev->conn->params.ssid,
270266 wdev->conn->params.ssid_len,
271− WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_PRIVACY,
272− capa);
267+ IEEE80211_BSS_TYPE_ESS,
268+ IEEE80211_PRIVACY(wdev->conn->params.privacy));
273269 if (!bss)
274270 return NULL;
275271
@@ -637,8 +633,8 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid, · 361 unmodified lines
637633 WARN_ON_ONCE(!wiphy_to_rdev(wdev->wiphy)->ops->connect);
638634 bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid,
639635 wdev->ssid, wdev->ssid_len,
640− WLAN_CAPABILITY_ESS,
641− WLAN_CAPABILITY_ESS);
636+ IEEE80211_BSS_TYPE_ESS,
637+ IEEE80211_PRIVACY_ANY);
642638 if (bss)
643639 cfg80211_hold_bss(bss_from_pub(bss));
644640 }
@@ -795,8 +791,8 @@ void cfg80211_roamed(struct net_device *dev, · 150 unmodified lines
795791 struct cfg80211_bss *bss;
796792
797793 bss = cfg80211_get_bss(wdev->wiphy, channel, bssid, wdev->ssid,
798− wdev->ssid_len, WLAN_CAPABILITY_ESS,
799− WLAN_CAPABILITY_ESS);
794+ wdev->ssid_len,
795+ IEEE80211_BSS_TYPE_ESS, IEEE80211_PRIVACY_ANY);
800796 if (WARN_ON(!bss))
801797 return;
802798
net/wireless/trace.h+13−11
@@ -2636,28 +2636,30 @@ DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped, · 2635 unmodified lines
26362636 TRACE_EVENT(cfg80211_get_bss,
26372637 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
26382638 const u8 *bssid, const u8 *ssid, size_t ssid_len,
2639− u16 capa_mask, u16 capa_val),
2640− TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, capa_mask, capa_val),
2639+ enum ieee80211_bss_type bss_type,
2640+ enum ieee80211_privacy privacy),
2641+ TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, bss_type, privacy),
26412642 TP_STRUCT__entry(
26422643 WIPHY_ENTRY
26432644 CHAN_ENTRY
26442645 MAC_ENTRY(bssid)
26452646 __dynamic_array(u8, ssid, ssid_len)
2646− __field(u16, capa_mask)
2647− __field(u16, capa_val)
2647+ __field(enum ieee80211_bss_type, bss_type)
2648+ __field(enum ieee80211_privacy, privacy)
26482649 ),
26492650 TP_fast_assign(
26502651 WIPHY_ASSIGN;
26512652 CHAN_ASSIGN(channel);
26522653 MAC_ASSIGN(bssid, bssid);
26532654 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
2654− __entry->capa_mask = capa_mask;
2655− __entry->capa_val = capa_val;
2656− ),
2657− TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT ", buf: %#.2x, "
2658− "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG, CHAN_PR_ARG,
2659− MAC_PR_ARG(bssid), ((u8 *)__get_dynamic_array(ssid))[0],
2660− __entry->capa_mask, __entry->capa_val)
2655+ __entry->bss_type = bss_type;
2656+ __entry->privacy = privacy;
2657+ ),
2658+ TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT
2659+ ", buf: %#.2x, bss_type: %d, privacy: %d",
2660+ WIPHY_PR_ARG, CHAN_PR_ARG, MAC_PR_ARG(bssid),
2661+ ((u8 *)__get_dynamic_array(ssid))[0], __entry->bss_type,
2662+ __entry->privacy)
26612663 );
26622664
26632665 TRACE_EVENT(cfg80211_inform_bss_width_frame,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t