337-v4.20-brcmfmac-fix-reporting-support-for-160-MHz-channels.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. From 8eefb59de817125eeedde2a2cc1e4ac3660062f9 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
  3. Date: Thu, 8 Nov 2018 16:08:29 +0100
  4. Subject: [PATCH] brcmfmac: fix reporting support for 160 MHz channels
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Driver can report IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ so it's
  9. important to provide valid & complete info about supported bands for
  10. each channel. By default no support for 160 MHz should be assumed unless
  11. firmware reports it for a given channel later.
  12. This fixes info passed to the userspace. Without that change userspace
  13. could try to use invalid channel and fail to start an interface.
  14. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
  15. Cc: stable@vger.kernel.org
  16. ---
  17. drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 ++-
  18. 1 file changed, 2 insertions(+), 1 deletion(-)
  19. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  20. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  21. @@ -5960,7 +5960,8 @@ static int brcmf_construct_chaninfo(stru
  22. * for subsequent chanspecs.
  23. */
  24. channel->flags = IEEE80211_CHAN_NO_HT40 |
  25. - IEEE80211_CHAN_NO_80MHZ;
  26. + IEEE80211_CHAN_NO_80MHZ |
  27. + IEEE80211_CHAN_NO_160MHZ;
  28. ch.bw = BRCMU_CHAN_BW_20;
  29. cfg->d11inf.encchspec(&ch);
  30. chaninfo = ch.chspec;