diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2011-04-19 09:59:18 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-25 14:50:12 -0400 |
commit | ecb1d385ad61001ff85407e5370a40934a1cc50b (patch) | |
tree | b7a85994e40c67851a667d11d6c9f4654a25c472 /drivers/net/wireless/ath | |
parent | 247eee0e4ee3e23fd4f2918cdffa1e20d2261fa8 (diff) |
ath9k_hw: Assign macversion based on devid for built-in wmac
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 39dd90110f32..28076086f633 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -247,6 +247,17 @@ static void ath9k_hw_read_revisions(struct ath_hw *ah) | |||
247 | { | 247 | { |
248 | u32 val; | 248 | u32 val; |
249 | 249 | ||
250 | switch (ah->hw_version.devid) { | ||
251 | case AR5416_AR9100_DEVID: | ||
252 | ah->hw_version.macVersion = AR_SREV_VERSION_9100; | ||
253 | break; | ||
254 | case AR9300_DEVID_AR9340: | ||
255 | ah->hw_version.macVersion = AR_SREV_VERSION_9340; | ||
256 | val = REG_READ(ah, AR_SREV); | ||
257 | ah->hw_version.macRev = MS(val, AR_SREV_REVISION2); | ||
258 | return; | ||
259 | } | ||
260 | |||
250 | val = REG_READ(ah, AR_SREV) & AR_SREV_ID; | 261 | val = REG_READ(ah, AR_SREV) & AR_SREV_ID; |
251 | 262 | ||
252 | if (val == 0xFF) { | 263 | if (val == 0xFF) { |
@@ -484,9 +495,6 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
484 | struct ath_common *common = ath9k_hw_common(ah); | 495 | struct ath_common *common = ath9k_hw_common(ah); |
485 | int r = 0; | 496 | int r = 0; |
486 | 497 | ||
487 | if (ah->hw_version.devid == AR5416_AR9100_DEVID) | ||
488 | ah->hw_version.macVersion = AR_SREV_VERSION_9100; | ||
489 | |||
490 | ath9k_hw_read_revisions(ah); | 498 | ath9k_hw_read_revisions(ah); |
491 | 499 | ||
492 | /* | 500 | /* |