aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r--net/wireless/scan.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index ae8c186b50d6..eeb71480f1af 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -465,10 +465,6 @@ static int cmp_bss(struct cfg80211_bss *a,
465 } 465 }
466 } 466 }
467 467
468 /*
469 * we can't use compare_ether_addr here since we need a < > operator.
470 * The binary return value of compare_ether_addr isn't enough
471 */
472 r = memcmp(a->bssid, b->bssid, sizeof(a->bssid)); 468 r = memcmp(a->bssid, b->bssid, sizeof(a->bssid));
473 if (r) 469 if (r)
474 return r; 470 return r;
@@ -651,6 +647,8 @@ static bool cfg80211_combine_bsses(struct cfg80211_registered_device *dev,
651 continue; 647 continue;
652 if (bss->pub.channel != new->pub.channel) 648 if (bss->pub.channel != new->pub.channel)
653 continue; 649 continue;
650 if (bss->pub.scan_width != new->pub.scan_width)
651 continue;
654 if (rcu_access_pointer(bss->pub.beacon_ies)) 652 if (rcu_access_pointer(bss->pub.beacon_ies))
655 continue; 653 continue;
656 ies = rcu_access_pointer(bss->pub.ies); 654 ies = rcu_access_pointer(bss->pub.ies);
@@ -870,11 +868,12 @@ cfg80211_get_bss_channel(struct wiphy *wiphy, const u8 *ie, size_t ielen,
870 868
871/* Returned bss is reference counted and must be cleaned up appropriately. */ 869/* Returned bss is reference counted and must be cleaned up appropriately. */
872struct cfg80211_bss* 870struct cfg80211_bss*
873cfg80211_inform_bss(struct wiphy *wiphy, 871cfg80211_inform_bss_width(struct wiphy *wiphy,
874 struct ieee80211_channel *channel, 872 struct ieee80211_channel *channel,
875 const u8 *bssid, u64 tsf, u16 capability, 873 enum nl80211_bss_scan_width scan_width,
876 u16 beacon_interval, const u8 *ie, size_t ielen, 874 const u8 *bssid, u64 tsf, u16 capability,
877 s32 signal, gfp_t gfp) 875 u16 beacon_interval, const u8 *ie, size_t ielen,
876 s32 signal, gfp_t gfp)
878{ 877{
879 struct cfg80211_bss_ies *ies; 878 struct cfg80211_bss_ies *ies;
880 struct cfg80211_internal_bss tmp = {}, *res; 879 struct cfg80211_internal_bss tmp = {}, *res;
@@ -892,6 +891,7 @@ cfg80211_inform_bss(struct wiphy *wiphy,
892 891
893 memcpy(tmp.pub.bssid, bssid, ETH_ALEN); 892 memcpy(tmp.pub.bssid, bssid, ETH_ALEN);
894 tmp.pub.channel = channel; 893 tmp.pub.channel = channel;
894 tmp.pub.scan_width = scan_width;
895 tmp.pub.signal = signal; 895 tmp.pub.signal = signal;
896 tmp.pub.beacon_interval = beacon_interval; 896 tmp.pub.beacon_interval = beacon_interval;
897 tmp.pub.capability = capability; 897 tmp.pub.capability = capability;
@@ -924,14 +924,15 @@ cfg80211_inform_bss(struct wiphy *wiphy,
924 /* cfg80211_bss_update gives us a referenced result */ 924 /* cfg80211_bss_update gives us a referenced result */
925 return &res->pub; 925 return &res->pub;
926} 926}
927EXPORT_SYMBOL(cfg80211_inform_bss); 927EXPORT_SYMBOL(cfg80211_inform_bss_width);
928 928
929/* Returned bss is reference counted and must be cleaned up appropriately. */ 929/* Returned bss is reference counted and must be cleaned up appropriately. */
930struct cfg80211_bss * 930struct cfg80211_bss *
931cfg80211_inform_bss_frame(struct wiphy *wiphy, 931cfg80211_inform_bss_width_frame(struct wiphy *wiphy,
932 struct ieee80211_channel *channel, 932 struct ieee80211_channel *channel,
933 struct ieee80211_mgmt *mgmt, size_t len, 933 enum nl80211_bss_scan_width scan_width,
934 s32 signal, gfp_t gfp) 934 struct ieee80211_mgmt *mgmt, size_t len,
935 s32 signal, gfp_t gfp)
935{ 936{
936 struct cfg80211_internal_bss tmp = {}, *res; 937 struct cfg80211_internal_bss tmp = {}, *res;
937 struct cfg80211_bss_ies *ies; 938 struct cfg80211_bss_ies *ies;
@@ -941,7 +942,8 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
941 BUILD_BUG_ON(offsetof(struct ieee80211_mgmt, u.probe_resp.variable) != 942 BUILD_BUG_ON(offsetof(struct ieee80211_mgmt, u.probe_resp.variable) !=
942 offsetof(struct ieee80211_mgmt, u.beacon.variable)); 943 offsetof(struct ieee80211_mgmt, u.beacon.variable));
943 944
944 trace_cfg80211_inform_bss_frame(wiphy, channel, mgmt, len, signal); 945 trace_cfg80211_inform_bss_width_frame(wiphy, channel, scan_width, mgmt,
946 len, signal);
945 947
946 if (WARN_ON(!mgmt)) 948 if (WARN_ON(!mgmt))
947 return NULL; 949 return NULL;
@@ -976,6 +978,7 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
976 978
977 memcpy(tmp.pub.bssid, mgmt->bssid, ETH_ALEN); 979 memcpy(tmp.pub.bssid, mgmt->bssid, ETH_ALEN);
978 tmp.pub.channel = channel; 980 tmp.pub.channel = channel;
981 tmp.pub.scan_width = scan_width;
979 tmp.pub.signal = signal; 982 tmp.pub.signal = signal;
980 tmp.pub.beacon_interval = le16_to_cpu(mgmt->u.probe_resp.beacon_int); 983 tmp.pub.beacon_interval = le16_to_cpu(mgmt->u.probe_resp.beacon_int);
981 tmp.pub.capability = le16_to_cpu(mgmt->u.probe_resp.capab_info); 984 tmp.pub.capability = le16_to_cpu(mgmt->u.probe_resp.capab_info);
@@ -991,7 +994,7 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
991 /* cfg80211_bss_update gives us a referenced result */ 994 /* cfg80211_bss_update gives us a referenced result */
992 return &res->pub; 995 return &res->pub;
993} 996}
994EXPORT_SYMBOL(cfg80211_inform_bss_frame); 997EXPORT_SYMBOL(cfg80211_inform_bss_width_frame);
995 998
996void cfg80211_ref_bss(struct wiphy *wiphy, struct cfg80211_bss *pub) 999void cfg80211_ref_bss(struct wiphy *wiphy, struct cfg80211_bss *pub)
997{ 1000{