summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/ath_hal/ah.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2009-02-23 23:41:12 +0000
committersam <sam@FreeBSD.org>2009-02-23 23:41:12 +0000
commitd673ad903bb677bd512d22efa4a4062d4517232b (patch)
tree6e6bf2b9731dd46ec0213de1a4b2402d7a29bbc1 /sys/dev/ath/ath_hal/ah.c
parenta0f4221805deef405c46cbfa7475bde3983ea96c (diff)
downloadFreeBSD-src-d673ad903bb677bd512d22efa4a4062d4517232b.zip
FreeBSD-src-d673ad903bb677bd512d22efa4a4062d4517232b.tar.gz
print mac+rf part names; drop the printing 2ghz rf stuff (might come back)
Diffstat (limited to 'sys/dev/ath/ath_hal/ah.c')
-rw-r--r--sys/dev/ath/ath_hal/ah.c82
1 files changed, 82 insertions, 0 deletions
diff --git a/sys/dev/ath/ath_hal/ah.c b/sys/dev/ath/ath_hal/ah.c
index 1ffab43..0462999 100644
--- a/sys/dev/ath/ath_hal/ah.c
+++ b/sys/dev/ath/ath_hal/ah.c
@@ -22,6 +22,8 @@
#include "ah_internal.h"
#include "ah_devid.h"
+#include "ar5416/ar5416reg.h" /* NB: includes ar5212reg.h */
+
/* linker set of registered chips */
OS_SET_DECLARE(ah_chips, struct ath_hal_chip);
@@ -78,6 +80,44 @@ ath_hal_attach(uint16_t devid, HAL_SOFTC sc,
return AH_NULL;
}
+const char *
+ath_hal_mac_name(struct ath_hal *ah)
+{
+ switch (ah->ah_macVersion) {
+ case AR_SREV_VERSION_CRETE:
+ case AR_SREV_VERSION_MAUI_1:
+ return "5210";
+ case AR_SREV_VERSION_MAUI_2:
+ case AR_SREV_VERSION_OAHU:
+ return "5211";
+ case AR_SREV_VERSION_VENICE:
+ return "5212";
+ case AR_SREV_VERSION_GRIFFIN:
+ return "2413";
+ case AR_SREV_VERSION_CONDOR:
+ return "5424";
+ case AR_SREV_VERSION_EAGLE:
+ return "5413";
+ case AR_SREV_VERSION_COBRA:
+ return "2415";
+ case AR_SREV_2425:
+ return "2425";
+ case AR_SREV_2417:
+ return "2417";
+ case AR_XSREV_VERSION_OWL_PCI:
+ return "5416";
+ case AR_XSREV_VERSION_OWL_PCIE:
+ return "5418";
+ case AR_XSREV_VERSION_SOWL:
+ return "9160";
+ case AR_XSREV_VERSION_MERLIN:
+ return "9280";
+ case AR_XSREV_VERSION_KITE:
+ return "9285";
+ }
+ return "????";
+}
+
/*
* Return the mask of available modes based on the hardware capabilities.
*/
@@ -108,6 +148,48 @@ ath_hal_rfprobe(struct ath_hal *ah, HAL_STATUS *ecode)
return AH_NULL;
}
+const char *
+ath_hal_rf_name(struct ath_hal *ah)
+{
+ switch (ah->ah_analog5GhzRev & AR_RADIO_SREV_MAJOR) {
+ case 0: /* 5210 */
+ return "5110"; /* NB: made up */
+ case AR_RAD5111_SREV_MAJOR:
+ case AR_RAD5111_SREV_PROD:
+ return "5111";
+ case AR_RAD2111_SREV_MAJOR:
+ return "2111";
+ case AR_RAD5112_SREV_MAJOR:
+ case AR_RAD5112_SREV_2_0:
+ case AR_RAD5112_SREV_2_1:
+ return "5112";
+ case AR_RAD2112_SREV_MAJOR:
+ case AR_RAD2112_SREV_2_0:
+ case AR_RAD2112_SREV_2_1:
+ return "2112";
+ case AR_RAD2413_SREV_MAJOR:
+ return "2413";
+ case AR_RAD5413_SREV_MAJOR:
+ return "5413";
+ case AR_RAD2316_SREV_MAJOR:
+ return "2316";
+ case AR_RAD2317_SREV_MAJOR:
+ return "2317";
+ case AR_RAD5424_SREV_MAJOR:
+ return "5424";
+
+ case AR_RAD5133_SREV_MAJOR:
+ return "5133";
+ case AR_RAD2133_SREV_MAJOR:
+ return "2133";
+ case AR_RAD5122_SREV_MAJOR:
+ return "5122";
+ case AR_RAD2122_SREV_MAJOR:
+ return "2122";
+ }
+ return "????";
+}
+
/*
* Poll the register looking for a specific value.
*/
OpenPOWER on IntegriCloud