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>
This commit is contained in:
Luis R. Rodriguez 2009-08-03 12:24:34 -07:00 committed by John W. Linville
parent ed459c1851
commit fbf54660d1
1 changed files with 10 additions and 7 deletions

View 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", DPRINTF(sc, ATH_DBG_RESET, "serialize_regmode is %d\n",
ah->config.serialize_regmode); ah->config.serialize_regmode);
if ((ah->hw_version.macVersion != AR_SREV_VERSION_5416_PCI) && switch (ah->hw_version.macVersion) {
(ah->hw_version.macVersion != AR_SREV_VERSION_5416_PCIE) && case AR_SREV_VERSION_5416_PCI:
(ah->hw_version.macVersion != AR_SREV_VERSION_9160) && case AR_SREV_VERSION_5416_PCIE:
(ah->hw_version.macVersion != AR_SREV_VERSION_9100) && case AR_SREV_VERSION_9160:
(ah->hw_version.macVersion != AR_SREV_VERSION_9280) && case AR_SREV_VERSION_9100:
(ah->hw_version.macVersion != AR_SREV_VERSION_9285) && case AR_SREV_VERSION_9280:
(ah->hw_version.macVersion != AR_SREV_VERSION_9287)) { case AR_SREV_VERSION_9285:
case AR_SREV_VERSION_9287:
break;
default:
DPRINTF(sc, ATH_DBG_FATAL, DPRINTF(sc, ATH_DBG_FATAL,
"Mac Chip Rev 0x%02x.%x is not supported by " "Mac Chip Rev 0x%02x.%x is not supported by "
"this driver\n", ah->hw_version.macVersion, "this driver\n", ah->hw_version.macVersion,