b43: don't warn about no 5 GHz support on 2.4 GHz devices
authorRafał Miłecki <zajec5@gmail.com>
Tue, 8 Jul 2014 19:00:19 +0000 (21:00 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 15 Jul 2014 19:51:42 +0000 (15:51 -0400)
This could be a bit confusing to see warning about lacking support for
5 GHz band if your device supports 2.4 GHz only.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/b43/main.c

index ad335307a3d455aaca5e61b2d45567b77e0bd6b2..3dcd3aa38608ff0daf41b084bfa2e6038ab449b2 100644 (file)
@@ -5268,14 +5268,16 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
        b43_supported_bands(dev, &have_2ghz_phy, &have_5ghz_phy);
 
        /* We don't support 5 GHz on some PHYs yet */
-       switch (dev->phy.type) {
-       case B43_PHYTYPE_A:
-       case B43_PHYTYPE_G:
-       case B43_PHYTYPE_N:
-       case B43_PHYTYPE_LP:
-       case B43_PHYTYPE_HT:
-               b43warn(wl, "5 GHz band is unsupported on this PHY\n");
-               have_5ghz_phy = false;
+       if (have_5ghz_phy) {
+               switch (dev->phy.type) {
+               case B43_PHYTYPE_A:
+               case B43_PHYTYPE_G:
+               case B43_PHYTYPE_N:
+               case B43_PHYTYPE_LP:
+               case B43_PHYTYPE_HT:
+                       b43warn(wl, "5 GHz band is unsupported on this PHY\n");
+                       have_5ghz_phy = false;
+               }
        }
 
        if (!have_2ghz_phy && !have_5ghz_phy) {