2019-07-28 11:52:47 +00:00
|
|
|
From f491645f039420fb7e14283e21b90772571c807c Mon Sep 17 00:00:00 2001
|
2019-07-21 09:23:32 +00:00
|
|
|
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
|
|
|
Date: Thu, 11 Jul 2019 10:45:30 +0200
|
2019-07-28 11:52:47 +00:00
|
|
|
Subject: [PATCH] brcmfmac: add 160MHz in chandef_to_chanspec()
|
2019-07-21 09:23:32 +00:00
|
|
|
|
|
|
|
The function chandef_to_chanspec() was not handling 160MHz bandwidth
|
|
|
|
resulting in wrong encoding of the channel. That resulting in firmware
|
|
|
|
rejecting the provided channel specification.
|
|
|
|
|
|
|
|
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
|
|
|
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
|
|
|
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
|
|
|
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
2019-07-28 11:52:47 +00:00
|
|
|
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
2019-07-21 09:23:32 +00:00
|
|
|
---
|
|
|
|
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 21 ++++++++++++++++++-
|
|
|
|
1 file changed, 20 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
|
|
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
|
|
|
@@ -276,8 +276,26 @@ static u16 chandef_to_chanspec(struct br
|
|
|
|
else
|
|
|
|
ch_inf.sb = BRCMU_CHAN_SB_UU;
|
|
|
|
break;
|
|
|
|
- case NL80211_CHAN_WIDTH_80P80:
|
|
|
|
case NL80211_CHAN_WIDTH_160:
|
|
|
|
+ ch_inf.bw = BRCMU_CHAN_BW_160;
|
|
|
|
+ if (primary_offset == -70)
|
|
|
|
+ ch_inf.sb = BRCMU_CHAN_SB_LLL;
|
|
|
|
+ else if (primary_offset == -50)
|
|
|
|
+ ch_inf.sb = BRCMU_CHAN_SB_LLU;
|
|
|
|
+ else if (primary_offset == -30)
|
|
|
|
+ ch_inf.sb = BRCMU_CHAN_SB_LUL;
|
|
|
|
+ else if (primary_offset == -10)
|
|
|
|
+ ch_inf.sb = BRCMU_CHAN_SB_LUU;
|
|
|
|
+ else if (primary_offset == 10)
|
|
|
|
+ ch_inf.sb = BRCMU_CHAN_SB_ULL;
|
|
|
|
+ else if (primary_offset == 30)
|
|
|
|
+ ch_inf.sb = BRCMU_CHAN_SB_ULU;
|
|
|
|
+ else if (primary_offset == 50)
|
|
|
|
+ ch_inf.sb = BRCMU_CHAN_SB_UUL;
|
|
|
|
+ else
|
|
|
|
+ ch_inf.sb = BRCMU_CHAN_SB_UUU;
|
|
|
|
+ break;
|
|
|
|
+ case NL80211_CHAN_WIDTH_80P80:
|
|
|
|
case NL80211_CHAN_WIDTH_5:
|
|
|
|
case NL80211_CHAN_WIDTH_10:
|
|
|
|
default:
|
|
|
|
@@ -296,6 +314,7 @@ static u16 chandef_to_chanspec(struct br
|
|
|
|
}
|
|
|
|
d11inf->encchspec(&ch_inf);
|
|
|
|
|
|
|
|
+ brcmf_dbg(TRACE, "chanspec: 0x%x\n", ch_inf.chspec);
|
|
|
|
return ch_inf.chspec;
|
|
|
|
}
|
|
|
|
|