brcmfmac: support firmware reporting 160 MHz channels 00/229000/1
authorRafał Miłecki <rafal@milecki.pl>
Mon, 11 Feb 2019 22:04:54 +0000 (23:04 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 27 Mar 2020 04:12:27 +0000 (13:12 +0900)
So far 160 MHz channels were treated as 20 MHz ones which was breaking
support for 40/80 MHz due to the brcmf_construct_chaninfo() logic and
its assumptions.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
[sw0312.kim: backport mainline commit 30519cbe339a to show more 5G channels properly]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I62ca12dfd97d0cd3233840d5b569e768dc4a1672

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c

index 82ec8f9..1dd7a1f 100644 (file)
@@ -6002,7 +6002,9 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,
                /* assuming the chanspecs order is HT20,
                 * HT40 upper, HT40 lower, and VHT80.
                 */
-               if (ch.bw == BRCMU_CHAN_BW_80) {
+               if (ch.bw == BRCMU_CHAN_BW_160)
+                       channel->flags &= ~IEEE80211_CHAN_NO_160MHZ;
+               else if (ch.bw == BRCMU_CHAN_BW_80) {
                        channel->flags &= ~IEEE80211_CHAN_NO_80MHZ;
                } else if (ch.bw == BRCMU_CHAN_BW_40) {
                        brcmf_update_bw40_channel_flag(channel, &ch);