Search Linux Wireless

[PATCH] brcmfmac: firmware: Treat EFI nvram ccode=XT the same as ccode=XV

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In some cases the EFI-var stored nvram contains "ccode=ALL", "ccode=XV"
or "ccode=XT", to specify "worldwide" compatible settings, but these
ccode-s do not work properly. "ccode=ALL" causes channels 12 and 13 to
not be available, "ccode=XV" / "ccode=XT" may cause all 5GHz channels
to not be available.

ccode="ALL" and ccode="XV" where already being replaced with ccode="X2"
with a bit of special handling for nvram settings coming from an EFI
variable. Extend this handling to also deal with nvram settings from
EFI variables which contain "ccode=XT", which has similar issues to
"ccode=XV".

This fixes 5GHz wifi not working on the HP ElitePad 1000 G2.

This was also tested on a Lenovo Thinkpad 8 tablet which also uses
"ccode=XT" and this causes no adverse effects there.

Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
---
 .../wireless/broadcom/brcm80211/brcmfmac/firmware.c    | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
index 0eb13e5df517..f150af8ede21 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
@@ -432,10 +432,10 @@ struct brcmf_fw {
 };
 
 #ifdef CONFIG_EFI
-/* In some cases the EFI-var stored nvram contains "ccode=ALL" or "ccode=XV"
- * to specify "worldwide" compatible settings, but these 2 ccode-s do not work
- * properly. "ccode=ALL" causes channels 12 and 13 to not be available,
- * "ccode=XV" causes all 5GHz channels to not be available. So we replace both
+/* In some cases the EFI-var stored nvram contains "ccode=ALL", "ccode=XV" or "ccode=XT",
+ * to specify "worldwide" compatible settings, but these ccode-s do not work properly.
+ * "ccode=ALL" causes channels 12 and 13 to not be available, "ccode=XV" / "ccode=XT"
+ * may cause all 5GHz channels to not be available. So we replace these
  * with "ccode=X2" which allows channels 12+13 and 5Ghz channels in
  * no-Initiate-Radiation mode. This means that we will never send on these
  * channels without first having received valid wifi traffic on the channel.
@@ -447,6 +447,8 @@ static void brcmf_fw_fix_efi_nvram_ccode(char *data, unsigned long data_len)
 	ccode = strnstr((char *)data, "ccode=ALL", data_len);
 	if (!ccode)
 		ccode = strnstr((char *)data, "ccode=XV\r", data_len);
+	if (!ccode)
+		ccode = strnstr((char *)data, "ccode=XT\r", data_len);
 	if (!ccode)
 		return;
 
-- 
2.31.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux