All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wright Feng <wright.feng@cypress.com>
To: arend.vanspriel@broadcom.com, franky.lin@broadcom.com,
	hante.meuleman@broadcom.com, kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org,
	brcm80211-dev-list.pdl@broadcom.com, wright.feng@cypress.com
Subject: [PATCH 3/3] brcmfmac: fix wrong num_different_channels when mchan feature enabled
Date: Tue,  1 Aug 2017 16:48:07 +0800	[thread overview]
Message-ID: <1501577287-28904-3-git-send-email-wright.feng@cypress.com> (raw)
In-Reply-To: <1501577287-28904-1-git-send-email-wright.feng@cypress.com>

The num_different_channels in wiphy info is not correct when firmware
supports mchan. When mchan is on, num_different_channels is always
overridden to 1 in brcmf_setup_ifmodes. Correct the logic by moving
num_different_channels setting forward.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 54588d2..3dcb139 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -6318,6 +6318,8 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp)
 	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);
@@ -6327,10 +6329,10 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp)
 		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;
-- 
1.9.1

  parent reply	other threads:[~2017-08-01  9:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01  8:48 [PATCH 1/3] brcmfmac: set wpa_auth to WPA_AUTH_DISABLED in AP/opensecurity mode Wright Feng
2017-08-01  8:48 ` [PATCH 2/3] brcmfmac: Add support for CYW4373 SDIO/USB chipset Wright Feng
2017-08-01 12:43   ` Arend van Spriel
2017-08-01 15:10     ` Chi-Hsien Lin
2017-08-01 21:03       ` Arend van Spriel
2017-08-02  8:15         ` Kalle Valo
2017-08-01  8:48 ` Wright Feng [this message]
2017-08-01 12:44   ` [PATCH 3/3] brcmfmac: fix wrong num_different_channels when mchan feature enabled Arend van Spriel
2017-08-02  9:32   ` Kalle Valo
2017-08-02 10:17     ` Arend van Spriel
2017-08-02 13:40       ` Kalle Valo
2017-08-03  1:57         ` Wright Feng
2017-08-01 12:41 ` [PATCH 1/3] brcmfmac: set wpa_auth to WPA_AUTH_DISABLED in AP/opensecurity mode Arend van Spriel
2017-08-02  2:56   ` Wright Feng
2017-08-02  9:30 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1501577287-28904-3-git-send-email-wright.feng@cypress.com \
    --to=wright.feng@cypress.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.