]> git.baikalelectronics.ru Git - kernel.git/commit
brcmfmac: handle msgbuf packets marked with monitor mode flag
authorRafał Miłecki <rafal@milecki.pl>
Sun, 24 Jun 2018 19:44:37 +0000 (21:44 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 4 Jul 2018 15:05:59 +0000 (18:05 +0300)
commit14e051c0cc98ce06125532ced8cc1a77534d38ee
tree29694fc208e8371645f38f9f2dd2c68a9b308e47
parent2422b4da3155581fae8a376a3845e0117a68f0c4
brcmfmac: handle msgbuf packets marked with monitor mode flag

New Broadcom firmwares mark monitor mode packets using a newly defined
bit in the flags field. Use it to filter them out and pass to the
monitor interface. These defines were found in bcmmsgbuf.h from SDK.

As not every firmware generates radiotap header this commit introduces
BRCMF_FEAT_MONITOR_FMT_RADIOTAP flag. It has to be has based on firmware
capabilities. If not present brcmf_netif_mon_rx() will assume packet is
a raw 802.11 frame and will prepend it with an empty radiotap header.

This new code is limited to the msgbuf protocol at this point. Adding
support for SDIO/USB devices will require some extra work (possibly a
new firmware release).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c