Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277787
b: refs/heads/master
c: ee97192
h: refs/heads/master
i:
  277785: 8ae4bde
  277783: 62fd9cf
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Nov 9, 2011
1 parent ece41d0 commit 69659a4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e760230e42cf759bd923457ca2753aacf2e656e
refs/heads/master: ee971924543fe82f279d3e97f6f6d02320b381b7
3 changes: 3 additions & 0 deletions trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,15 @@ enum ieee80211_packet_rx_flags {
* enum ieee80211_rx_flags - RX data flags
*
* @IEEE80211_RX_CMNTR: received on cooked monitor already
* @IEEE80211_RX_BEACON_REPORTED: This frame was already reported
* to cfg80211_report_obss_beacon().
*
* These flags are used across handling multiple interfaces
* for a single frame.
*/
enum ieee80211_rx_flags {
IEEE80211_RX_CMNTR = BIT(0),
IEEE80211_RX_BEACON_REPORTED = BIT(1),
};

struct ieee80211_rx_data {
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,8 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,

wiphy->flags |= WIPHY_FLAG_NETNS_OK |
WIPHY_FLAG_4ADDR_AP |
WIPHY_FLAG_4ADDR_STATION;
WIPHY_FLAG_4ADDR_STATION |
WIPHY_FLAG_REPORTS_OBSS;

if (!ops->set_key)
wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
Expand Down
12 changes: 12 additions & 0 deletions trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 69659a4

Please sign in to comment.