On 6/19/2018 5:48 PM, Rafał Miłecki wrote:
From: Rafał Miłecki <rafal@xxxxxxxxxx> 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).
Acked-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx> --- V2: Use cpu_to_le16 when setting it_len V3: Update TODO comments Rename flag (after adding MONITOR) Update commit message --- .../wireless/broadcom/brcm80211/brcmfmac/core.c | 25 ++++++++++++++++++++++ .../wireless/broadcom/brcm80211/brcmfmac/core.h | 2 ++ .../wireless/broadcom/brcm80211/brcmfmac/feature.h | 4 +++- .../wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 17 +++++++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-)