summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorGrzegorz Bajorski <grzegorz.bajorski@tieto.com>2015-12-11 14:39:46 +0100
committerJohannes Berg <johannes.berg@intel.com>2016-02-24 09:04:19 +0100
commit178830481eee5eea147a1c8fab67a96e09d80345 (patch)
treee0f517fae9298780398500ce2fe6a9892334e752 /net
parentmac80211: support hw managing reorder logic (diff)
downloadlinux-178830481eee5eea147a1c8fab67a96e09d80345.tar.xz
linux-178830481eee5eea147a1c8fab67a96e09d80345.zip
mac80211: allow drivers to report (non-)monitor frames
Some drivers offload some frames internally (e.g. AddBa). Reporting such frames to mac80211 would only confuse MLME. However it would be useful to be able to pass such frames to monitor interfaces for sniffing purposes, e.g. when running AP + monitor. To do that allow drivers to tell mac80211 whether a given frame should be: - processed but not delivered to any monitor vif - not processed but delievered to monitor vifs only Signed-off-by: Grzegorz Bajorski <grzegorz.bajorski@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/rx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index fe675d76f29c..ae993edfdecf 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -122,7 +122,8 @@ static inline bool should_drop_frame(struct sk_buff *skb, int present_fcs_len,
hdr = (void *)(skb->data + rtap_vendor_space);
if (status->flag & (RX_FLAG_FAILED_FCS_CRC |
- RX_FLAG_FAILED_PLCP_CRC))
+ RX_FLAG_FAILED_PLCP_CRC |
+ RX_FLAG_ONLY_MONITOR))
return true;
if (unlikely(skb->len < 16 + present_fcs_len + rtap_vendor_space))
@@ -507,7 +508,7 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb,
return NULL;
}
- if (!local->monitors) {
+ if (!local->monitors || (status->flag & RX_FLAG_SKIP_MONITOR)) {
if (should_drop_frame(origskb, present_fcs_len,
rtap_vendor_space)) {
dev_kfree_skb(origskb);