mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
This commit is contained in:
parent
412a6d800c
commit
178830481e
2 changed files with 14 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue