From 6805e44004b7e310743a638ce826010744ad9ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 16 Aug 2018 10:29:56 +0200 Subject: mac80211: brcmfmac: backport important changes from the 4.14 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki --- ...x-wrong-num_different_channels-when-mchan.patch | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 package/kernel/mac80211/patches/326-v4.14-0002-brcmfmac-fix-wrong-num_different_channels-when-mchan.patch (limited to 'package/kernel/mac80211/patches/326-v4.14-0002-brcmfmac-fix-wrong-num_different_channels-when-mchan.patch') diff --git a/package/kernel/mac80211/patches/326-v4.14-0002-brcmfmac-fix-wrong-num_different_channels-when-mchan.patch b/package/kernel/mac80211/patches/326-v4.14-0002-brcmfmac-fix-wrong-num_different_channels-when-mchan.patch new file mode 100644 index 0000000000..1887e8914c --- /dev/null +++ b/package/kernel/mac80211/patches/326-v4.14-0002-brcmfmac-fix-wrong-num_different_channels-when-mchan.patch @@ -0,0 +1,47 @@ +From 99976fc084129e07df3a066dc15651853386da19 Mon Sep 17 00:00:00 2001 +From: Wright Feng +Date: Thu, 3 Aug 2017 17:37:59 +0800 +Subject: [PATCH] brcmfmac: fix wrong num_different_channels when mchan feature + enabled + +When the device/firmware supports multi-channel, it can have P2P +connection and regular connection with AP simultaneous. In this case, +the num_different_channels in wiphy info was not correct when firmware +supports multi-channel (The iw wiphy# info showed "#channels <= 1" in +interface combinations). It caused association failed and error message +"CTRL-EVENT-FREQ-CONFLICT error" in wpa_supplicant when P2P GO interface +was running at the same time. +The root cause is that the num_different_channels was always overridden +to 1 in brcmf_setup_ifmodes even multi-channel was enabled. +We correct the logic by moving num_different_channels setting forward. + +Signed-off-by: Wright Feng +Acked-by: Arend van Spriel +Signed-off-by: Kalle Valo +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -6311,6 +6311,8 @@ static int brcmf_setup_ifmodes(struct wi + if (p2p) { + if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MCHAN)) + combo[c].num_different_channels = 2; ++ else ++ combo[c].num_different_channels = 1; + wiphy->interface_modes |= BIT(NL80211_IFTYPE_P2P_CLIENT) | + BIT(NL80211_IFTYPE_P2P_GO) | + BIT(NL80211_IFTYPE_P2P_DEVICE); +@@ -6320,10 +6322,10 @@ static int brcmf_setup_ifmodes(struct wi + c0_limits[i++].types = BIT(NL80211_IFTYPE_P2P_CLIENT) | + BIT(NL80211_IFTYPE_P2P_GO); + } else { ++ combo[c].num_different_channels = 1; + c0_limits[i].max = 1; + c0_limits[i++].types = BIT(NL80211_IFTYPE_AP); + } +- combo[c].num_different_channels = 1; + combo[c].max_interfaces = i; + combo[c].n_limits = i; + combo[c].limits = c0_limits; -- cgit v1.2.3