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>
This commit is contained in:
parent
cc3983d8ab
commit
d45c41722a
4 changed files with 27 additions and 48 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue