mac80211: brcmfmac: backport remaining patches from the Linux 5.0
[openwrt/staging/wigyori.git] / package / kernel / mac80211 / patches / brcm / 332-v5.0-0001-brcmfmac-Fix-access-point-mode.patch
1 From 861cb5eb467f5e38dce1aabe4e8db379255bd89b Mon Sep 17 00:00:00 2001
2 From: Stefan Wahren <stefan.wahren@i2se.com>
3 Date: Wed, 12 Dec 2018 20:20:06 +0100
4 Subject: [PATCH] brcmfmac: Fix access point mode
5
6 Since commit 1204aa17f3b4 ("brcmfmac: set WIPHY_FLAG_HAVE_AP_SME flag")
7 the Raspberry Pi 3 A+ (BCM43455) isn't able to operate in AP mode with
8 hostapd (device_ap_sme=1 use_monitor=0):
9
10 brcmfmac: brcmf_cfg80211_stop_ap: setting AP mode failed -52
11
12 So add the missing mgmt_stypes for AP mode to fix this.
13
14 Fixes: 1204aa17f3b4 ("brcmfmac: set WIPHY_FLAG_HAVE_AP_SME flag")
15 Suggested-by: Arend van Spriel <arend.vanspriel@broadcom.com>
16 Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
17 Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
18 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
19 ---
20 .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 10 ++++++++++
21 1 file changed, 10 insertions(+)
22
23 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
24 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
25 @@ -6308,6 +6308,16 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] =
26 .tx = 0xffff,
27 .rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
28 BIT(IEEE80211_STYPE_PROBE_REQ >> 4)
29 + },
30 + [NL80211_IFTYPE_AP] = {
31 + .tx = 0xffff,
32 + .rx = BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) |
33 + BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) |
34 + BIT(IEEE80211_STYPE_PROBE_REQ >> 4) |
35 + BIT(IEEE80211_STYPE_DISASSOC >> 4) |
36 + BIT(IEEE80211_STYPE_AUTH >> 4) |
37 + BIT(IEEE80211_STYPE_DEAUTH >> 4) |
38 + BIT(IEEE80211_STYPE_ACTION >> 4)
39 }
40 };
41