diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-02-25 10:15:35 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2019-02-25 10:21:32 +0100 |
commit | d32bbd747733de5daeb63a8f2c1307f612422f87 (patch) | |
tree | 020863b77627c72b06651c22ace486e0766d0d16 /package/kernel/mac80211/patches/381-v5.1-0006-brcmfmac-improve-code-handling-bandwidth-of-firmware.patch | |
parent | ce3a53c4f62b7ff4e356e1f1889c22e70d768656 (diff) | |
download | upstream-d32bbd747733de5daeb63a8f2c1307f612422f87.tar.gz upstream-d32bbd747733de5daeb63a8f2c1307f612422f87.tar.bz2 upstream-d32bbd747733de5daeb63a8f2c1307f612422f87.zip |
mac80211: brcmfmac: backport 5.0 & 5.1 important changes/fixes
This backports the most important brcmfmac commits that:
1) Fix some bugs
2) Help debugging bugs
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'package/kernel/mac80211/patches/381-v5.1-0006-brcmfmac-improve-code-handling-bandwidth-of-firmware.patch')
-rw-r--r-- | package/kernel/mac80211/patches/381-v5.1-0006-brcmfmac-improve-code-handling-bandwidth-of-firmware.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/381-v5.1-0006-brcmfmac-improve-code-handling-bandwidth-of-firmware.patch b/package/kernel/mac80211/patches/381-v5.1-0006-brcmfmac-improve-code-handling-bandwidth-of-firmware.patch new file mode 100644 index 0000000000..dd4fa742be --- /dev/null +++ b/package/kernel/mac80211/patches/381-v5.1-0006-brcmfmac-improve-code-handling-bandwidth-of-firmware.patch @@ -0,0 +1,42 @@ +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 +@@ -6036,11 +6036,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. |