aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-08-03 15:24:34 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-04 16:44:27 -0400
commitfbf54660d1b48fba8527aae5c628ba72feee8f83 (patch)
treec100c3a697d05ad99179cb2110aed463b6ea3160
parented459c18517881890193b3414a25dbfe83d2ae7f (diff)
ath9k: use a switch for revising supported hw mac revisions
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>
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index e0bc4c580446..8228f41c9c33 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -662,13 +662,16 @@ static struct ath_hw *ath9k_hw_do_attach(u16 devid, struct ath_softc *sc,
662 DPRINTF(sc, ATH_DBG_RESET, "serialize_regmode is %d\n", 662 DPRINTF(sc, ATH_DBG_RESET, "serialize_regmode is %d\n",
663 ah->config.serialize_regmode); 663 ah->config.serialize_regmode);
664 664
665 if ((ah->hw_version.macVersion != AR_SREV_VERSION_5416_PCI) && 665 switch (ah->hw_version.macVersion) {
666 (ah->hw_version.macVersion != AR_SREV_VERSION_5416_PCIE) && 666 case AR_SREV_VERSION_5416_PCI:
667 (ah->hw_version.macVersion != AR_SREV_VERSION_9160) && 667 case AR_SREV_VERSION_5416_PCIE:
668 (ah->hw_version.macVersion != AR_SREV_VERSION_9100) && 668 case AR_SREV_VERSION_9160:
669 (ah->hw_version.macVersion != AR_SREV_VERSION_9280) && 669 case AR_SREV_VERSION_9100:
670 (ah->hw_version.macVersion != AR_SREV_VERSION_9285) && 670 case AR_SREV_VERSION_9280:
671 (ah->hw_version.macVersion != AR_SREV_VERSION_9287)) { 671 case AR_SREV_VERSION_9285:
672 case AR_SREV_VERSION_9287:
673 break;
674 default:
672 DPRINTF(sc, ATH_DBG_FATAL, 675 DPRINTF(sc, ATH_DBG_FATAL,
673 "Mac Chip Rev 0x%02x.%x is not supported by " 676 "Mac Chip Rev 0x%02x.%x is not supported by "
674 "this driver\n", ah->hw_version.macVersion, 677 "this driver\n", ah->hw_version.macVersion,