aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/scan.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2014-05-22 13:58:36 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-05-22 13:58:36 -0400
commit40a10fd740a4d5a9f3da255cf8dae48c6723d1a6 (patch)
treea65eb4adca8e37ed7335345e94e36918593f7f92 /net/wireless/scan.c
parent99abe65ff18b6bbac2e55524827b571c3eccfa86 (diff)
parent67af9811539be83dbdc0739215d29af23c870405 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r--net/wireless/scan.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index e7329bb6a323..0798c62e6085 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -891,6 +891,7 @@ cfg80211_inform_bss_width(struct wiphy *wiphy,
891 struct cfg80211_bss_ies *ies; 891 struct cfg80211_bss_ies *ies;
892 struct ieee80211_channel *channel; 892 struct ieee80211_channel *channel;
893 struct cfg80211_internal_bss tmp = {}, *res; 893 struct cfg80211_internal_bss tmp = {}, *res;
894 bool signal_valid;
894 895
895 if (WARN_ON(!wiphy)) 896 if (WARN_ON(!wiphy))
896 return NULL; 897 return NULL;
@@ -927,8 +928,9 @@ cfg80211_inform_bss_width(struct wiphy *wiphy,
927 rcu_assign_pointer(tmp.pub.beacon_ies, ies); 928 rcu_assign_pointer(tmp.pub.beacon_ies, ies);
928 rcu_assign_pointer(tmp.pub.ies, ies); 929 rcu_assign_pointer(tmp.pub.ies, ies);
929 930
930 res = cfg80211_bss_update(wiphy_to_rdev(wiphy), &tmp, 931 signal_valid = abs(rx_channel->center_freq - channel->center_freq) <=
931 rx_channel == channel); 932 wiphy->max_adj_channel_rssi_comp;
933 res = cfg80211_bss_update(wiphy_to_rdev(wiphy), &tmp, signal_valid);
932 if (!res) 934 if (!res)
933 return NULL; 935 return NULL;
934 936
@@ -952,6 +954,7 @@ cfg80211_inform_bss_width_frame(struct wiphy *wiphy,
952 struct cfg80211_internal_bss tmp = {}, *res; 954 struct cfg80211_internal_bss tmp = {}, *res;
953 struct cfg80211_bss_ies *ies; 955 struct cfg80211_bss_ies *ies;
954 struct ieee80211_channel *channel; 956 struct ieee80211_channel *channel;
957 bool signal_valid;
955 size_t ielen = len - offsetof(struct ieee80211_mgmt, 958 size_t ielen = len - offsetof(struct ieee80211_mgmt,
956 u.probe_resp.variable); 959 u.probe_resp.variable);
957 960
@@ -999,8 +1002,9 @@ cfg80211_inform_bss_width_frame(struct wiphy *wiphy,
999 tmp.pub.beacon_interval = le16_to_cpu(mgmt->u.probe_resp.beacon_int); 1002 tmp.pub.beacon_interval = le16_to_cpu(mgmt->u.probe_resp.beacon_int);
1000 tmp.pub.capability = le16_to_cpu(mgmt->u.probe_resp.capab_info); 1003 tmp.pub.capability = le16_to_cpu(mgmt->u.probe_resp.capab_info);
1001 1004
1002 res = cfg80211_bss_update(wiphy_to_rdev(wiphy), &tmp, 1005 signal_valid = abs(rx_channel->center_freq - channel->center_freq) <=
1003 rx_channel == channel); 1006 wiphy->max_adj_channel_rssi_comp;
1007 res = cfg80211_bss_update(wiphy_to_rdev(wiphy), &tmp, signal_valid);
1004 if (!res) 1008 if (!res)
1005 return NULL; 1009 return NULL;
1006 1010