mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 17:01:14 +00:00
ac7ccf739a
This updates to backports-4.19.57-1 which contains the wireless subsystem and driver from kernel 4.19.57. The removed patches are applied upstream. Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
From f4e183293b871c96c0220dcc549d5ca4c72628ad Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
|
Date: Mon, 11 Feb 2019 23:04:53 +0100
|
|
Subject: [PATCH] brcmfmac: improve code handling bandwidth of firmware
|
|
reported channels
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
1) Use switch to simplify/improve the code & avoid some duplication
|
|
2) Add warning for unsupported values
|
|
|
|
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
---
|
|
.../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 13 ++++++++++---
|
|
1 file changed, 10 insertions(+), 3 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
|
@@ -6047,11 +6047,18 @@ static int brcmf_construct_chaninfo(stru
|
|
/* assuming the chanspecs order is HT20,
|
|
* HT40 upper, HT40 lower, and VHT80.
|
|
*/
|
|
- if (ch.bw == BRCMU_CHAN_BW_80) {
|
|
+ switch (ch.bw) {
|
|
+ case BRCMU_CHAN_BW_80:
|
|
channel->flags &= ~IEEE80211_CHAN_NO_80MHZ;
|
|
- } else if (ch.bw == BRCMU_CHAN_BW_40) {
|
|
+ break;
|
|
+ case BRCMU_CHAN_BW_40:
|
|
brcmf_update_bw40_channel_flag(channel, &ch);
|
|
- } else {
|
|
+ break;
|
|
+ default:
|
|
+ wiphy_warn(wiphy, "Firmware reported unsupported bandwidth %d\n",
|
|
+ ch.bw);
|
|
+ /* fall through */
|
|
+ case BRCMU_CHAN_BW_20:
|
|
/* enable the channel and disable other bandwidths
|
|
* for now as mentioned order assure they are enabled
|
|
* for subsequent chanspecs.
|