All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.20 FIX] brcmutil: really fix decoding channel info for 160 MHz bandwidth
@ 2018-10-26 10:50 Rafał Miłecki
  2018-10-26 11:10 ` Kalle Valo
  2018-11-06 16:46 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Rafał Miłecki @ 2018-10-26 10:50 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
	Wright Feng, Pieter-Paul Giesberts, Chung-Hsien Hsu,
	linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
	Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

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")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c b/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
index e7584b842dce..eb5db94f5745 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
@@ -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;
-- 
2.13.7


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 4.20 FIX] brcmutil: really fix decoding channel info for 160 MHz bandwidth
  2018-10-26 10:50 [PATCH 4.20 FIX] brcmutil: really fix decoding channel info for 160 MHz bandwidth Rafał Miłecki
@ 2018-10-26 11:10 ` Kalle Valo
  2018-11-06 16:46 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-10-26 11:10 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
	Wright Feng, Pieter-Paul Giesberts, Chung-Hsien Hsu,
	linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
	Rafał Miłecki

Rafał Miłecki <zajec5@gmail.com> writes:

> From: Rafał Miłecki <rafal@milecki.pl>
>
> 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")
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

I'll queue this for 4.20.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 4.20 FIX] brcmutil: really fix decoding channel info for 160 MHz bandwidth
  2018-10-26 10:50 [PATCH 4.20 FIX] brcmutil: really fix decoding channel info for 160 MHz bandwidth Rafał Miłecki
  2018-10-26 11:10 ` Kalle Valo
@ 2018-11-06 16:46 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-11-06 16:46 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
	Wright Feng, Pieter-Paul Giesberts, Chung-Hsien Hsu,
	linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
	Rafał Miłecki

Rafał Miłecki wrote:

> From: Rafał Miłecki <rafal@milecki.pl>
> 
> 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")
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

Patch applied to wireless-drivers.git, thanks.

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

-- 
https://patchwork.kernel.org/patch/10657205/

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-06 16:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-26 10:50 [PATCH 4.20 FIX] brcmutil: really fix decoding channel info for 160 MHz bandwidth Rafał Miłecki
2018-10-26 11:10 ` Kalle Valo
2018-11-06 16:46 ` Kalle Valo

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.