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.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index ae8c186b50d6..ad1e4068ce06 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -651,6 +651,8 @@ static bool cfg80211_combine_bsses(struct cfg80211_registered_device *dev,
651 continue; 651 continue;
652 if (bss->pub.channel != new->pub.channel) 652 if (bss->pub.channel != new->pub.channel)
653 continue; 653 continue;
654 if (bss->pub.scan_width != new->pub.scan_width)
655 continue;
654 if (rcu_access_pointer(bss->pub.beacon_ies)) 656 if (rcu_access_pointer(bss->pub.beacon_ies))
655 continue; 657 continue;
656 ies = rcu_access_pointer(bss->pub.ies); 658 ies = rcu_access_pointer(bss->pub.ies);
@@ -870,11 +872,12 @@ cfg80211_get_bss_channel(struct wiphy *wiphy, const u8 *ie, size_t ielen,
870 872
871/* Returned bss is reference counted and must be cleaned up appropriately. */ 873/* Returned bss is reference counted and must be cleaned up appropriately. */
872struct cfg80211_bss* 874struct cfg80211_bss*
873cfg80211_inform_bss(struct wiphy *wiphy, 875cfg80211_inform_bss_width(struct wiphy *wiphy,
874 struct ieee80211_channel *channel, 876 struct ieee80211_channel *channel,
875 const u8 *bssid, u64 tsf, u16 capability, 877 enum nl80211_bss_scan_width scan_width,
876 u16 beacon_interval, const u8 *ie, size_t ielen, 878 const u8 *bssid, u64 tsf, u16 capability,
877 s32 signal, gfp_t gfp) 879 u16 beacon_interval, const u8 *ie, size_t ielen,
880 s32 signal, gfp_t gfp)
878{ 881{
879 struct cfg80211_bss_ies *ies; 882 struct cfg80211_bss_ies *ies;
880 struct cfg80211_internal_bss tmp = {}, *res; 883 struct cfg80211_internal_bss tmp = {}, *res;
@@ -892,6 +895,7 @@ cfg80211_inform_bss(struct wiphy *wiphy,
892 895
893 memcpy(tmp.pub.bssid, bssid, ETH_ALEN); 896 memcpy(tmp.pub.bssid, bssid, ETH_ALEN);
894 tmp.pub.channel = channel; 897 tmp.pub.channel = channel;
898 tmp.pub.scan_width = scan_width;
895 tmp.pub.signal = signal; 899 tmp.pub.signal = signal;
896 tmp.pub.beacon_interval = beacon_interval; 900 tmp.pub.beacon_interval = beacon_interval;
897 tmp.pub.capability = capability; 901 tmp.pub.capability = capability;
@@ -924,14 +928,15 @@ cfg80211_inform_bss(struct wiphy *wiphy,
924 /* cfg80211_bss_update gives us a referenced result */ 928 /* cfg80211_bss_update gives us a referenced result */
925 return &res->pub; 929 return &res->pub;
926} 930}
927EXPORT_SYMBOL(cfg80211_inform_bss); 931EXPORT_SYMBOL(cfg80211_inform_bss_width);
928 932
929/* Returned bss is reference counted and must be cleaned up appropriately. */ 933/* Returned bss is reference counted and must be cleaned up appropriately. */
930struct cfg80211_bss * 934struct cfg80211_bss *
931cfg80211_inform_bss_frame(struct wiphy *wiphy, 935cfg80211_inform_bss_width_frame(struct wiphy *wiphy,
932 struct ieee80211_channel *channel, 936 struct ieee80211_channel *channel,
933 struct ieee80211_mgmt *mgmt, size_t len, 937 enum nl80211_bss_scan_width scan_width,
934 s32 signal, gfp_t gfp) 938 struct ieee80211_mgmt *mgmt, size_t len,
939 s32 signal, gfp_t gfp)
935{ 940{
936 struct cfg80211_internal_bss tmp = {}, *res; 941 struct cfg80211_internal_bss tmp = {}, *res;
937 struct cfg80211_bss_ies *ies; 942 struct cfg80211_bss_ies *ies;
@@ -941,7 +946,8 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
941 BUILD_BUG_ON(offsetof(struct ieee80211_mgmt, u.probe_resp.variable) != 946 BUILD_BUG_ON(offsetof(struct ieee80211_mgmt, u.probe_resp.variable) !=
942 offsetof(struct ieee80211_mgmt, u.beacon.variable)); 947 offsetof(struct ieee80211_mgmt, u.beacon.variable));
943 948
944 trace_cfg80211_inform_bss_frame(wiphy, channel, mgmt, len, signal); 949 trace_cfg80211_inform_bss_width_frame(wiphy, channel, scan_width, mgmt,
950 len, signal);
945 951
946 if (WARN_ON(!mgmt)) 952 if (WARN_ON(!mgmt))
947 return NULL; 953 return NULL;
@@ -976,6 +982,7 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
976 982
977 memcpy(tmp.pub.bssid, mgmt->bssid, ETH_ALEN); 983 memcpy(tmp.pub.bssid, mgmt->bssid, ETH_ALEN);
978 tmp.pub.channel = channel; 984 tmp.pub.channel = channel;
985 tmp.pub.scan_width = scan_width;
979 tmp.pub.signal = signal; 986 tmp.pub.signal = signal;
980 tmp.pub.beacon_interval = le16_to_cpu(mgmt->u.probe_resp.beacon_int); 987 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); 988 tmp.pub.capability = le16_to_cpu(mgmt->u.probe_resp.capab_info);
@@ -991,7 +998,7 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
991 /* cfg80211_bss_update gives us a referenced result */ 998 /* cfg80211_bss_update gives us a referenced result */
992 return &res->pub; 999 return &res->pub;
993} 1000}
994EXPORT_SYMBOL(cfg80211_inform_bss_frame); 1001EXPORT_SYMBOL(cfg80211_inform_bss_width_frame);
995 1002
996void cfg80211_ref_bss(struct wiphy *wiphy, struct cfg80211_bss *pub) 1003void cfg80211_ref_bss(struct wiphy *wiphy, struct cfg80211_bss *pub)
997{ 1004{