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>
Sun, 8 Oct 2017 01:00:22 +0000 (01:00 +0000)
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 3ac3056ab1d2074e4a60961455f0c355c5a18afd..11e73bff0f479b6dc1157fe39120b33796acb894 100644 (file)
@@ -6811,6 +6811,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 4051780f64f44a5ce522babe6c371a1beb79a824..b081673abcb4aa72d70d8e0834b608f65fea16e8 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;