diff mbox

[6/9] brcmfmac: Add RSDB support.

Message ID 1446147199-21671-7-git-send-email-arend@broadcom.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Arend van Spriel Oct. 29, 2015, 7:33 p.m. UTC
From: Hante Meuleman <meuleman@broadcom.com>

RSDB works almost autonomously in firmware except for AP config.
When device supports RSDB then the interface should not be
brought down when configuring it, otherwise the link (if
configured) on the other interface will be lost.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 4 +++-
 drivers/net/wireless/brcm80211/brcmfmac/feature.c  | 1 +
 drivers/net/wireless/brcm80211/brcmfmac/feature.h  | 5 ++++-
 3 files changed, 8 insertions(+), 2 deletions(-)

Comments

Kalle Valo Nov. 12, 2015, 7:49 p.m. UTC | #1
Arend van Spriel <arend@broadcom.com> writes:

> From: Hante Meuleman <meuleman@broadcom.com>
>
> RSDB works almost autonomously in firmware except for AP config.
> When device supports RSDB then the interface should not be
> brought down when configuring it, otherwise the link (if
> configured) on the other interface will be lost.
>
> Reviewed-by: Arend Van Spriel <arend@broadcom.com>
> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
> Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
> Signed-off-by: Arend van Spriel <arend@broadcom.com>

I have never heard of acronym RSDB before and after some googling I
think it might mean Real Simultaneous Dual Band. But please try to avoid
using acronyms and clearly spell it out in the commit log what the
feature is about.

If you send me suggestions what to add I can edit the commit log before
I apply this patch.
Arend van Spriel Nov. 13, 2015, 9:11 a.m. UTC | #2
On 11/12/2015 08:49 PM, Kalle Valo wrote:
> Arend van Spriel <arend@broadcom.com> writes:
>
>> From: Hante Meuleman <meuleman@broadcom.com>
>>
>> RSDB works almost autonomously in firmware except for AP config.
>> When device supports RSDB then the interface should not be
>> brought down when configuring it, otherwise the link (if
>> configured) on the other interface will be lost.
>>
>> Reviewed-by: Arend Van Spriel <arend@broadcom.com>
>> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
>> Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
>> Signed-off-by: Arend van Spriel <arend@broadcom.com>
>
> I have never heard of acronym RSDB before and after some googling I
> think it might mean Real Simultaneous Dual Band. But please try to avoid
> using acronyms and clearly spell it out in the commit log what the
> feature is about.

Google is correct and the acronym is cooked up by Broadcom ;-) In the 
cover letter I mentioned:

* support bcm4359 which can operate in two bands concurrently.

which is a device with two 802.11 cores and hence supports RSDB.

> If you send me suggestions what to add I can edit the commit log before
> I apply this patch.

If needed I can resubmit the patch. This would be the proposed commit log:

Broadcom devices with a single 802.11 core can work on two band
concurrently using VSDB feature, ie. Virtual Simultaneous Dual-Band.
For devices that are fitted with two 802.11 cores and RF paths the
driver should support a firmware feature called RSDB, which stands
for Real Simultaneous Dual-Band. RSDB works almost autonomously in 
firmware except for AP config. When the device supports RSDB then
the interface should not be brought down when configuring it,
otherwise the link (if configured) on the other interface will be
lost.

Hope this helps and let me know if other actions are required from us.

Regards,
Arend
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kalle Valo Nov. 13, 2015, 9:29 a.m. UTC | #3
Arend van Spriel <arend@broadcom.com> writes:

> On 11/12/2015 08:49 PM, Kalle Valo wrote:
>> Arend van Spriel <arend@broadcom.com> writes:
>>
>>> From: Hante Meuleman <meuleman@broadcom.com>
>>>
>>> RSDB works almost autonomously in firmware except for AP config.
>>> When device supports RSDB then the interface should not be
>>> brought down when configuring it, otherwise the link (if
>>> configured) on the other interface will be lost.
>>>
>>> Reviewed-by: Arend Van Spriel <arend@broadcom.com>
>>> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
>>> Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
>>> Signed-off-by: Arend van Spriel <arend@broadcom.com>
>>
>> I have never heard of acronym RSDB before and after some googling I
>> think it might mean Real Simultaneous Dual Band. But please try to avoid
>> using acronyms and clearly spell it out in the commit log what the
>> feature is about.
>
> Google is correct and the acronym is cooked up by Broadcom ;-) In the
> cover letter I mentioned:
>
> * support bcm4359 which can operate in two bands concurrently.
>
> which is a device with two 802.11 cores and hence supports RSDB.

Yeah, but the problem is that the cover letter contents are not stored
to git. Johannes once suggested that maybe I should do the same as Dave
does, he adds an extra merge with the cover letter (see below). Hmm..

commit e18f6ac30d31433d8cd9ccf693d3cdd5d2e66ef9
Merge: e407f39afdc0 c02b05011fad
Author: David S. Miller <davem@davemloft.net>
Date:   Tue Oct 27 20:27:45 2015 -0700

    Merge branch 'mlx4-fixes'
    
    Or Gerlitz says:
    
    ====================
    Mellanox mlx4 driver fixes for 4.3-rc7
    
    Jack's fix is for a regression introduced in 4.3-rc1
    
    Carol's fix addresses an issue which exists for while and
    turns to beat us hard on PPC, please queue for -stable.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>

>> If you send me suggestions what to add I can edit the commit log before
>> I apply this patch.
>
> If needed I can resubmit the patch. This would be the proposed commit log:
>
> Broadcom devices with a single 802.11 core can work on two band
> concurrently using VSDB feature, ie. Virtual Simultaneous Dual-Band.
> For devices that are fitted with two 802.11 cores and RF paths the
> driver should support a firmware feature called RSDB, which stands
> for Real Simultaneous Dual-Band. RSDB works almost autonomously in
> firmware except for AP config. When the device supports RSDB then
> the interface should not be brought down when configuring it,
> otherwise the link (if configured) on the other interface will be
> lost.
>
> Hope this helps and let me know if other actions are required from us.

Thanks, this is perfect. I'll update the commit log once I open
wireless-drivers-next and apply this patch.
diff mbox

Patch

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
index deb5f78..8a3c9fa 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
@@ -4183,7 +4183,9 @@  brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
 			}
 		}
 
-		if (dev_role == NL80211_IFTYPE_AP) {
+		if ((dev_role == NL80211_IFTYPE_AP) &&
+		    ((ifp->ifidx == 0) ||
+		     !brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB))) {
 			err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1);
 			if (err < 0) {
 				brcmf_err("BRCMF_C_DOWN error %d\n", err);
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/brcm80211/brcmfmac/feature.c
index 44bb306..ba52494 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/feature.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/feature.c
@@ -137,6 +137,7 @@  void brcmf_feat_attach(struct brcmf_pub *drvr)
 	if (drvr->bus_if->chip != BRCM_CC_43362_CHIP_ID)
 		brcmf_feat_iovar_int_set(ifp, BRCMF_FEAT_MBSS, "mbss", 0);
 	brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_P2P, "p2p");
+	brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_RSDB, "rsdb_mode");
 
 	if (brcmf_feature_disable) {
 		brcmf_dbg(INFO, "Features: 0x%02x, disable: 0x%02x\n",
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/feature.h b/drivers/net/wireless/brcm80211/brcmfmac/feature.h
index 6b381f7..5381758 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/feature.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/feature.h
@@ -24,13 +24,16 @@ 
  * PNO: preferred network offload.
  * WOWL: Wake-On-WLAN.
  * P2P: peer-to-peer
+ * RSDB: Real Simultaneous Dual Band
  */
 #define BRCMF_FEAT_LIST \
 	BRCMF_FEAT_DEF(MBSS) \
 	BRCMF_FEAT_DEF(MCHAN) \
 	BRCMF_FEAT_DEF(PNO) \
 	BRCMF_FEAT_DEF(WOWL) \
-	BRCMF_FEAT_DEF(P2P)
+	BRCMF_FEAT_DEF(P2P) \
+	BRCMF_FEAT_DEF(RSDB)
+
 /*
  * Quirks:
  *