brcmfmac: Mute expected startup 'errors'
authorPhil Elwell <phil@raspberrypi.org>
Fri, 17 Feb 2017 15:26:13 +0000 (15:26 +0000)
committerRaspbian kernel package updater <root@raspbian.org>
Sat, 31 Mar 2018 14:45:37 +0000 (15:45 +0100)
The brcmfmac WiFi driver always complains about the '00' country code
and the firmware version is reported as an error. Modify the driver to
ignore '00' silently and display firmware version at INFO level.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c

index f507d821aba85d2df46b72d2e576c1b2c9223e07..a928114db907131620805989b7a53772a0d6a548 100644 (file)
@@ -6791,6 +6791,8 @@ static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy,
        /* ignore non-ISO3166 country codes */
        for (i = 0; i < sizeof(req->alpha2); i++)
                if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') {
+                       if (req->alpha2[0] == '0' && req->alpha2[1] == '0')
+                               return;
                        brcmf_err("not a ISO3166 code (0x%02x 0x%02x)\n",
                                  req->alpha2[0], req->alpha2[1]);
                        return;
index 3e15d64c64813513bc22202dd9e468588699abb0..74350c5a963aa6a4d06a8be3f068e759a3e8553a 100644 (file)
@@ -161,7 +161,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
        strsep(&ptr, "\n");
 
        /* Print fw version info */
-       brcmf_err("Firmware version = %s\n", buf);
+       pr_info("Firmware version = %s\n", buf);
 
        /* locate firmware version number for ethtool */
        ptr = strrchr(buf, ' ') + 1;