ath9k: use a switch for revising supported hw mac revisions
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 3 Aug 2009 19:24:34 +0000 (12:24 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 4 Aug 2009 20:44:27 +0000 (16:44 -0400)
This makes adding new hw revisions a one line change here.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.c

index e0bc4c580446a75ee2415fa65aebe852cdb46478..8228f41c9c33bf710bcf6ded7f5318e431dec883 100644 (file)
@@ -662,13 +662,16 @@ static struct ath_hw *ath9k_hw_do_attach(u16 devid, struct ath_softc *sc,
        DPRINTF(sc, ATH_DBG_RESET, "serialize_regmode is %d\n",
                ah->config.serialize_regmode);
 
-       if ((ah->hw_version.macVersion != AR_SREV_VERSION_5416_PCI) &&
-           (ah->hw_version.macVersion != AR_SREV_VERSION_5416_PCIE) &&
-           (ah->hw_version.macVersion != AR_SREV_VERSION_9160) &&
-           (ah->hw_version.macVersion != AR_SREV_VERSION_9100) &&
-           (ah->hw_version.macVersion != AR_SREV_VERSION_9280) &&
-           (ah->hw_version.macVersion != AR_SREV_VERSION_9285) &&
-           (ah->hw_version.macVersion != AR_SREV_VERSION_9287)) {
+       switch (ah->hw_version.macVersion) {
+       case AR_SREV_VERSION_5416_PCI:
+       case AR_SREV_VERSION_5416_PCIE:
+       case AR_SREV_VERSION_9160:
+       case AR_SREV_VERSION_9100:
+       case AR_SREV_VERSION_9280:
+       case AR_SREV_VERSION_9285:
+       case AR_SREV_VERSION_9287:
+               break;
+       default:
                DPRINTF(sc, ATH_DBG_FATAL,
                        "Mac Chip Rev 0x%02x.%x is not supported by "
                        "this driver\n", ah->hw_version.macVersion,