ath9k_hw: set is_pciexpress true for AR9480
RFC 1/1 ath9k_hw: set is_pciexpress true for AR9480
From: Mohammed Shafi Shajakhan <[email protected]>
the AR_SREV register does not seems to indicate it properly though the other information like macVersion etc can be obtained properly
--- drivers/net/wireless/ath/ath9k/hw.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/net/wireless/ath/ath9k/hw.c +6 -1
@@ -284,7 +284,12 @@ static void ath9k_hw_read_revisions(struct ath_hw *ah) ah->hw_version.macVersion = (val &AR_SREV_VERSION2 ) >>AR_SREV_TYPE2_S ; ah->hw_version.macRev =MS (val,AR_SREV_REVISION2 ); - ah->is_pciexpress = (val &AR_SREV_TYPE2_HOST_MODE ) ?0 :1 ; + +if (AR_SREV_9480 (ah)) + ah->is_pciexpress = true; +else + ah->is_pciexpress = (val & +AR_SREV_TYPE2_HOST_MODE ) ?0 :1 ; }else {if (!AR_SREV_9100 (ah)) ah->hw_version.macVersion =MS (val,AR_SREV_VERSION );
Signature · 1 line
1.7.0.4
Quoted 4 lines · Mohammed Shafi Shajakhan
From: Mohammed Shafi Shajakhan<[email protected]>
the
AR_SREVregister does not seems to indicate it properly though the other information like macVersion etc can be obtained properly
How about using AR_SREV_9300_20_OR_LATER(ah) instead to make sure that this works properly for future chips as well?
- Felix
Hi Felix,
Quoted 7 lines · Felix Fietkau
Quoted 4 lines · Mohammed Shafi Shajakhan
From: Mohammed Shafi Shajakhan<[email protected]>
the
AR_SREVregister does not seems to indicate it properly though the other information like macVersion etc can be obtained properlyHow about using
AR_SREV_9300_20_OR_LATER(ah)instead to make sure that this works properly for future chips as well?
this seems to be a problem specifically for AR9480 and this problem does not seems to be observed in AR9485. but its needed as if is_pciexpress is false ASPM won't be initialized
Quoted 2 lines
- Felix