319-v4.12-0003-brcmfmac-Do-not-complain-about-country-code-00.patch 1.1 KB

12345678910111213141516171819202122232425262728
  1. From 26e537884a8ef451f5c60f6949b1615069931ffa Mon Sep 17 00:00:00 2001
  2. From: Hans de Goede <hdegoede@redhat.com>
  3. Date: Wed, 8 Mar 2017 14:50:16 +0100
  4. Subject: [PATCH] brcmfmac: Do not complain about country code "00"
  5. The country code gets set to "00" by default at boot, ignore this
  6. rather then logging an error about it.
  7. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  8. Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
  9. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  10. ---
  11. drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 ++++
  12. 1 file changed, 4 insertions(+)
  13. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  14. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  15. @@ -6736,6 +6736,10 @@ static void brcmf_cfg80211_reg_notifier(
  16. s32 err;
  17. int i;
  18. + /* The country code gets set to "00" by default at boot, ignore */
  19. + if (req->alpha2[0] == '0' && req->alpha2[1] == '0')
  20. + return;
  21. +
  22. /* ignore non-ISO3166 country codes */
  23. for (i = 0; i < sizeof(req->alpha2); i++)
  24. if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') {