brcmfmac: Do not complain about country code "00"
authorHans de Goede <hdegoede@redhat.com>
Wed, 8 Mar 2017 13:50:16 +0000 (14:50 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 20 Mar 2017 17:14:17 +0000 (19:14 +0200)
The country code gets set to "00" by default at boot, ignore this
rather then logging an error about it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c

index 944b83cfc51978d06ccc82a9f23ce64472af3fc8..7765ad09d793fb4aeeb89559a82aa529726f76e6 100644 (file)
@@ -6736,6 +6736,10 @@ static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy,
        s32 err;
        int i;
 
+       /* The country code gets set to "00" by default at boot, ignore */
+       if (req->alpha2[0] == '0' && req->alpha2[1] == '0')
+               return;
+
        /* ignore non-ISO3166 country codes */
        for (i = 0; i < sizeof(req->alpha2); i++)
                if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') {