diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-11-04 11:18:18 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-09 16:13:52 -0500 |
commit | ee971924543fe82f279d3e97f6f6d02320b381b7 (patch) | |
tree | 8388d05cedbdf969fe05de3c752c0bf24f67efb3 /net/mac80211/rx.c | |
parent | 5e760230e42cf759bd923457ca2753aacf2e656e (diff) |
mac80211: report OBSS beacons
If there's an interface in AP mode, OBSS beacons
are needed by hostapd/wpa_s to implement logic to
enable/disable protection etc. Report the frames
and set the capability flag.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index e832e0dcab3..2ed882f8a9f 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2188,6 +2188,18 @@ ieee80211_rx_h_mgmt_check(struct ieee80211_rx_data *rx) if (!ieee80211_is_mgmt(mgmt->frame_control)) return RX_DROP_MONITOR; + if (rx->sdata->vif.type == NL80211_IFTYPE_AP && + ieee80211_is_beacon(mgmt->frame_control) && + !(rx->flags & IEEE80211_RX_BEACON_REPORTED)) { + struct ieee80211_rx_status *status; + + status = IEEE80211_SKB_RXCB(rx->skb); + cfg80211_report_obss_beacon(rx->local->hw.wiphy, + rx->skb->data, rx->skb->len, + status->freq, GFP_ATOMIC); + rx->flags |= IEEE80211_RX_BEACON_REPORTED; + } + if (!(status->rx_flags & IEEE80211_RX_RA_MATCH)) return RX_DROP_MONITOR; |