e733468bc3aa0bc037c70e5061fa6027d33e7417
[openwrt/staging/neocturne.git] /
1 From e63410ac65e0ead2040bbd3927c116889edf87e4 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Sun, 24 Jun 2018 21:44:36 +0200
4 Subject: [PATCH] brcmfmac: detect firmware support for radiotap monitor frames
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Depending on used build-time options some firmwares may already include
10 radiotap header in passed monitor frames. Add a new feature flag to
11 store info about it. It's needed for proper handling of received frames
12 before passing them up.
13
14 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
15 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
16 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
17 ---
18 drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 1 +
19 drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h | 4 +++-
20 2 files changed, 4 insertions(+), 1 deletion(-)
21
22 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
23 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
24 @@ -49,6 +49,7 @@ static const struct brcmf_feat_fwcap brc
25 { BRCMF_FEAT_MCHAN, "mchan" },
26 { BRCMF_FEAT_P2P, "p2p" },
27 { BRCMF_FEAT_MONITOR, "monitor" },
28 + { BRCMF_FEAT_MONITOR_FMT_RADIOTAP, "rtap" },
29 };
30
31 #ifdef DEBUG
32 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
33 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
34 @@ -34,6 +34,7 @@
35 * GSCAN: enhanced scan offload feature.
36 * FWSUP: Firmware supplicant.
37 * MONITOR: firmware can pass monitor packets to host.
38 + * MONITOR_FMT_RADIOTAP: firmware provides monitor packets with radiotap header
39 */
40 #define BRCMF_FEAT_LIST \
41 BRCMF_FEAT_DEF(MBSS) \
42 @@ -50,7 +51,8 @@
43 BRCMF_FEAT_DEF(MFP) \
44 BRCMF_FEAT_DEF(GSCAN) \
45 BRCMF_FEAT_DEF(FWSUP) \
46 - BRCMF_FEAT_DEF(MONITOR)
47 + BRCMF_FEAT_DEF(MONITOR) \
48 + BRCMF_FEAT_DEF(MONITOR_FMT_RADIOTAP)
49
50 /*
51 * Quirks: