9c211a68d0613f3f594ac14706bd3ec353d6b9a0
[openwrt/staging/blocktrron.git] /
1 From 2635853ce4ab7654a77ab7080fb56de83408606b Mon Sep 17 00:00:00 2001
2 From: Wright Feng <wright.feng@cypress.com>
3 Date: Thu, 12 Dec 2019 00:52:51 +0100
4 Subject: [PATCH 7/7] brcmfmac: not set mbss in vif if firmware does not
5 support MBSS
6
7 With RSDB mode, FMAC and firmware are able to create 2 or more AP,
8 so we should not set mbss in vif structure if firmware does not
9 support MBSS feature.
10
11 Signed-off-by: Wright Feng <wright.feng@cypress.com>
12 Signed-off-by: Soeren Moch <smoch@web.de>
13 Reviewed-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
14 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
15 ---
16 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +++-
17 1 file changed, 3 insertions(+), 1 deletion(-)
18
19 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
20 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
21 @@ -5301,6 +5301,7 @@ struct brcmf_cfg80211_vif *brcmf_alloc_v
22 struct brcmf_cfg80211_vif *vif_walk;
23 struct brcmf_cfg80211_vif *vif;
24 bool mbss;
25 + struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0);
26
27 brcmf_dbg(TRACE, "allocating virtual interface (size=%zu)\n",
28 sizeof(*vif));
29 @@ -5313,7 +5314,8 @@ struct brcmf_cfg80211_vif *brcmf_alloc_v
30
31 brcmf_init_prof(&vif->profile);
32
33 - if (type == NL80211_IFTYPE_AP) {
34 + if (type == NL80211_IFTYPE_AP &&
35 + brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) {
36 mbss = false;
37 list_for_each_entry(vif_walk, &cfg->vif_list, list) {
38 if (vif_walk->wdev.iftype == NL80211_IFTYPE_AP) {