aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/hw.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-10-27 12:59:34 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-30 16:49:18 -0400
commitf934c4d9de85571ff792360aa72dd26e00e1afc7 (patch)
tree38b212bcd0ca4f2511cc7c9513df3096049185c7 /drivers/net/wireless/ath/ath9k/hw.c
parent2da4f01a0938b688f92f9ee380013cfb8653510f (diff)
ath9k_hw: distinguish single-chip solutions on initial probe print
Devices with external radios have revisions which we can count on. On single chip solutions these EEPROM values for these radio revision also exist but are not meaningful as the radios are embedded onto the same chip. Each single-chip device evolves together as one device. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c31
1 files changed, 27 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index bba923135b0e..5d7a5b177a39 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -4381,7 +4381,7 @@ static struct {
4381/* 4381/*
4382 * Return the MAC/BB name. "????" is returned if the MAC/BB is unknown. 4382 * Return the MAC/BB name. "????" is returned if the MAC/BB is unknown.
4383 */ 4383 */
4384const char *ath9k_hw_mac_bb_name(u32 mac_bb_version) 4384static const char *ath9k_hw_mac_bb_name(u32 mac_bb_version)
4385{ 4385{
4386 int i; 4386 int i;
4387 4387
@@ -4393,13 +4393,12 @@ const char *ath9k_hw_mac_bb_name(u32 mac_bb_version)
4393 4393
4394 return "????"; 4394 return "????";
4395} 4395}
4396EXPORT_SYMBOL(ath9k_hw_mac_bb_name);
4397 4396
4398/* 4397/*
4399 * Return the RF name. "????" is returned if the RF is unknown. 4398 * Return the RF name. "????" is returned if the RF is unknown.
4400 * Used for devices with external radios. 4399 * Used for devices with external radios.
4401 */ 4400 */
4402const char *ath9k_hw_rf_name(u16 rf_version) 4401static const char *ath9k_hw_rf_name(u16 rf_version)
4403{ 4402{
4404 int i; 4403 int i;
4405 4404
@@ -4411,4 +4410,28 @@ const char *ath9k_hw_rf_name(u16 rf_version)
4411 4410
4412 return "????"; 4411 return "????";
4413} 4412}
4414EXPORT_SYMBOL(ath9k_hw_rf_name); 4413
4414void ath9k_hw_name(struct ath_hw *ah, char *hw_name, size_t len)
4415{
4416 int used;
4417
4418 /* chipsets >= AR9280 are single-chip */
4419 if (AR_SREV_9280_10_OR_LATER(ah)) {
4420 used = snprintf(hw_name, len,
4421 "Atheros AR%s Rev:%x",
4422 ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
4423 ah->hw_version.macRev);
4424 }
4425 else {
4426 used = snprintf(hw_name, len,
4427 "Atheros AR%s MAC/BB Rev:%x AR%s RF Rev:%x",
4428 ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
4429 ah->hw_version.macRev,
4430 ath9k_hw_rf_name((ah->hw_version.analog5GhzRev &
4431 AR_RADIO_SREV_MAJOR)),
4432 ah->hw_version.phyRev);
4433 }
4434
4435 hw_name[used] = '\0';
4436}
4437EXPORT_SYMBOL(ath9k_hw_name);