Skip to contentSkip to conversation

brcmutil: really fix decoding channel info for 160 MHz bandwidth

PATCH In review Rafał Miłecki 2 participants 3 messages Oct 26, 2018 – Nov 6, 2018 Broadcom BRCM80211 IEEE802.11 wireless drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 brcmutil: really fix decoding channel info for 160 MHz bandwidth

From: Rafał Miłecki <[email protected]>

Previous commit /adding/ support for 160 MHz chanspecs was incomplete. It didn't set bandwidth info and didn't extract control channel info. As the result it was also using uninitialized "sb" var.

This change has been tested for two chanspecs found to be reported by some devices/firmwares:
1) 60/160 (0xee32)
Before: chnum:50 control_ch_num:36

    After: chnum:50 control_ch_num:60
2) 120/160 (0xed72)
   Before: chnum:114 control_ch_num:100
    After: chnum:114 control_ch_num:120
Fixes 330994e8e8ec ("brcmfmac: fix for proper support of 160MHz bandwidth")
---
 drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c +3 -0
index e7584b842dce..eb5db94f5745 100644
@@ -193,6 +193,9 @@ static void brcmu_d11ac_decchspec(struct brcmu_chan *ch)
 		}
 		break;
 	case BRCMU_CHSPEC_D11AC_BW_160:
+		ch->bw = BRCMU_CHAN_BW_160;
+		ch->sb = brcmu_maskget16(ch->chspec, BRCMU_CHSPEC_D11AC_SB_MASK,
+					 BRCMU_CHSPEC_D11AC_SB_SHIFT);
 		switch (ch->sb) {
 		case BRCMU_CHAN_SB_LLL:
 			ch->control_ch_num -= CH_70MHZ_APART;
Signature · 1 line
2.13.7
#1 lore raw
Quoted 10 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

Previous commit /adding/ support for 160 MHz chanspecs was incomplete. It didn't set bandwidth info and didn't extract control channel info. As the result it was also using uninitialized "sb" var.

This change has been tested for two chanspecs found to be reported by some devices/firmwares:
1) 60/160 (0xee32)
Before: chnum:50 control_ch_num:36

Quoted 7 lines
    After: chnum:50 control_ch_num:60
2) 120/160 (0xed72)
   Before: chnum:114 control_ch_num:100
    After: chnum:114 control_ch_num:120
Fixes 330994e8e8ec ("brcmfmac: fix for proper support of 160MHz bandwidth")

I'll queue this for 4.20.

Signature · 1 line
Kalle Valo
#2 lore raw
In reply to Rafał Miłecki
Quoted 10 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

Previous commit /adding/ support for 160 MHz chanspecs was incomplete. It didn't set bandwidth info and didn't extract control channel info. As the result it was also using uninitialized "sb" var.

This change has been tested for two chanspecs found to be reported by some devices/firmwares:
1) 60/160 (0xee32)
Before: chnum:50 control_ch_num:36

Quoted 7 lines
    After: chnum:50 control_ch_num:60
2) 120/160 (0xed72)
   Before: chnum:114 control_ch_num:100
    After: chnum:114 control_ch_num:120
Fixes 330994e8e8ec ("brcmfmac: fix for proper support of 160MHz bandwidth")

Patch applied to wireless-drivers.git, thanks.

3401d42c7ea2 brcmutil: really fix decoding channel info for 160 MHz bandwidth

Signature · 3 lines
https://patchwork.kernel.org/patch/10657205/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches