summaryrefslogtreecommitdiff
path: root/net/mac80211/scan.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2012-12-10 18:19:13 +0400
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 16:01:33 +0400
commitd45c41722a3eca639ced2c4c93665ced229b1da9 (patch)
treee1fed264ee3b9f03e12ed012f76a8de97a4a3eef /net/mac80211/scan.c
parentcc3983d8ab174ca43d5817f16c489b3cce3a795a (diff)
downloadlinux-d45c41722a3eca639ced2c4c93665ced229b1da9.tar.xz
mac82011: use frame control to differentiate probe resp/beacon
The probe response/beacon management frame RX code passes a bool parameter to differentiate beacons and probe responses. This is useless since we have the frame and can thus use its frame control field. Moreover it is buggy since there is one call to ieee80211_rx_bss_info with a beacon frame that is indicated as a probe response, which is also fixed by using the frame control field, so do that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r--net/mac80211/scan.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index d59fc6818b1c..06cbe26892a8 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -65,12 +65,11 @@ static bool is_uapsd_supported(struct ieee802_11_elems *elems)
struct ieee80211_bss *
ieee80211_bss_info_update(struct ieee80211_local *local,
struct ieee80211_rx_status *rx_status,
- struct ieee80211_mgmt *mgmt,
- size_t len,
+ struct ieee80211_mgmt *mgmt, size_t len,
struct ieee802_11_elems *elems,
- struct ieee80211_channel *channel,
- bool beacon)
+ struct ieee80211_channel *channel)
{
+ bool beacon = ieee80211_is_beacon(mgmt->frame_control);
struct cfg80211_bss *cbss;
struct ieee80211_bss *bss;
int clen, srlen;
@@ -203,7 +202,7 @@ void ieee80211_scan_rx(struct ieee80211_local *local, struct sk_buff *skb)
bss = ieee80211_bss_info_update(local, rx_status,
mgmt, skb->len, &elems,
- channel, beacon);
+ channel);
if (bss)
ieee80211_rx_bss_put(local, bss);
}