1 From 011a56a3336a5de9c3152c169cd52ff79b8c3f89 Mon Sep 17 00:00:00 2001
2 From: Arend van Spriel <arend.vanspriel@broadcom.com>
3 Date: Thu, 11 Jul 2019 10:45:31 +0200
4 Subject: [PATCH] brcmfmac: enable DFS_OFFLOAD extended feature if supported
6 If the firmware supports 802.11h and the device can operate in 5GHz
7 band we can enable DFS_OFFLOAD extended feature.
9 Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
10 Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
11 Reviewed-by: Franky Lin <franky.lin@broadcom.com>
12 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
13 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
15 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 +++++
16 drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 1 +
17 drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h | 4 +++-
18 3 files changed, 9 insertions(+), 1 deletion(-)
20 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
21 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
22 @@ -6728,6 +6728,11 @@ static int brcmf_setup_wiphy(struct wiph
26 + if (wiphy->bands[NL80211_BAND_5GHZ] &&
27 + brcmf_feat_is_enabled(ifp, BRCMF_FEAT_DOT11H))
28 + wiphy_ext_feature_set(wiphy,
29 + NL80211_EXT_FEATURE_DFS_OFFLOAD);
31 wiphy_read_of_freq_limits(wiphy);
34 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
35 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
36 @@ -39,6 +39,7 @@ static const struct brcmf_feat_fwcap brc
37 { BRCMF_FEAT_P2P, "p2p" },
38 { BRCMF_FEAT_MONITOR, "monitor" },
39 { BRCMF_FEAT_MONITOR_FMT_RADIOTAP, "rtap" },
40 + { BRCMF_FEAT_DOT11H, "802.11h" }
44 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
45 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
47 * MONITOR: firmware can pass monitor packets to host.
48 * MONITOR_FMT_RADIOTAP: firmware provides monitor packets with radiotap header
49 * MONITOR_FMT_HW_RX_HDR: firmware provides monitor packets with hw/ucode header
50 + * DOT11H: firmware supports 802.11h
52 #define BRCMF_FEAT_LIST \
53 BRCMF_FEAT_DEF(MBSS) \
55 BRCMF_FEAT_DEF(FWSUP) \
56 BRCMF_FEAT_DEF(MONITOR) \
57 BRCMF_FEAT_DEF(MONITOR_FMT_RADIOTAP) \
58 - BRCMF_FEAT_DEF(MONITOR_FMT_HW_RX_HDR)
59 + BRCMF_FEAT_DEF(MONITOR_FMT_HW_RX_HDR) \
60 + BRCMF_FEAT_DEF(DOT11H)