ath9k: Handle unsupported MAC versions early
There is no point in trying to bring up the chip when the MAC version is not present in the supported list. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
e4ef276303
commit
de82582b9a
1 changed files with 24 additions and 24 deletions
|
@ -474,6 +474,30 @@ static int __ath9k_hw_init(struct ath_hw *ah)
|
||||||
|
|
||||||
ath9k_hw_read_revisions(ah);
|
ath9k_hw_read_revisions(ah);
|
||||||
|
|
||||||
|
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:
|
||||||
|
case AR_SREV_VERSION_9271:
|
||||||
|
case AR_SREV_VERSION_9300:
|
||||||
|
case AR_SREV_VERSION_9330:
|
||||||
|
case AR_SREV_VERSION_9485:
|
||||||
|
case AR_SREV_VERSION_9340:
|
||||||
|
case AR_SREV_VERSION_9462:
|
||||||
|
case AR_SREV_VERSION_9550:
|
||||||
|
case AR_SREV_VERSION_9565:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ath_err(common,
|
||||||
|
"Mac Chip Rev 0x%02x.%x is not supported by this driver\n",
|
||||||
|
ah->hw_version.macVersion, ah->hw_version.macRev);
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read back AR_WA into a permanent copy and set bits 14 and 17.
|
* Read back AR_WA into a permanent copy and set bits 14 and 17.
|
||||||
* We need to do this to avoid RMW of this register. We cannot
|
* We need to do this to avoid RMW of this register. We cannot
|
||||||
|
@ -527,30 +551,6 @@ static int __ath9k_hw_init(struct ath_hw *ah)
|
||||||
else
|
else
|
||||||
ah->config.max_txtrig_level = MAX_TX_FIFO_THRESHOLD;
|
ah->config.max_txtrig_level = MAX_TX_FIFO_THRESHOLD;
|
||||||
|
|
||||||
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:
|
|
||||||
case AR_SREV_VERSION_9271:
|
|
||||||
case AR_SREV_VERSION_9300:
|
|
||||||
case AR_SREV_VERSION_9330:
|
|
||||||
case AR_SREV_VERSION_9485:
|
|
||||||
case AR_SREV_VERSION_9340:
|
|
||||||
case AR_SREV_VERSION_9462:
|
|
||||||
case AR_SREV_VERSION_9550:
|
|
||||||
case AR_SREV_VERSION_9565:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ath_err(common,
|
|
||||||
"Mac Chip Rev 0x%02x.%x is not supported by this driver\n",
|
|
||||||
ah->hw_version.macVersion, ah->hw_version.macRev);
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (AR_SREV_9271(ah) || AR_SREV_9100(ah) || AR_SREV_9340(ah) ||
|
if (AR_SREV_9271(ah) || AR_SREV_9100(ah) || AR_SREV_9340(ah) ||
|
||||||
AR_SREV_9330(ah) || AR_SREV_9550(ah))
|
AR_SREV_9330(ah) || AR_SREV_9550(ah))
|
||||||
ah->is_pciexpress = false;
|
ah->is_pciexpress = false;
|
||||||
|
|
Loading…
Reference in a new issue