diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-08-08 05:03:52 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-08-08 05:03:52 +0000 |
commit | bc2f26c5c80417e6c7ed0074c78fdd719acf14c9 (patch) | |
tree | 54776ff1a8ef56e21fd4ffe0e1960bca8d3ac42d /sys/dev | |
parent | 946cedd83859ab71dfe210c140365d4062baaec8 (diff) |
Print a string for radio type.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/acx.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c index 5920abed289..26ecf8d7a32 100644 --- a/sys/dev/ic/acx.c +++ b/sys/dev/ic/acx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acx.c,v 1.32 2006/08/07 21:17:39 mglocker Exp $ */ +/* $OpenBSD: acx.c,v 1.33 2006/08/08 05:03:51 jsg Exp $ */ /* * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> @@ -197,6 +197,7 @@ int acx_set_beacon_tmplt(struct acx_softc *, const char *, int, int); int acx_read_eeprom(struct acx_softc *, uint32_t, uint8_t *); int acx_read_phyreg(struct acx_softc *, uint32_t, uint8_t *); +const char * acx_get_rf(int rev); int acx_load_firmware(struct acx_softc *, uint32_t, const uint8_t *, int); @@ -278,7 +279,8 @@ acx_attach(struct acx_softc *sc) return (ENXIO); #undef EEINFO_RETRY_MAX - printf(", radio 0x%02x", sc->sc_radio_type); + printf(", radio %s (0x%02x)", acx_get_rf(sc->sc_radio_type), + sc->sc_radio_type); #ifdef DUMP_EEPROM for (i = 0; i < 0x40; ++i) { @@ -2705,3 +2707,15 @@ back: return (ret); } + +const char * +acx_get_rf(int rev) +{ + switch (rev) { + case ACX_RADIO_TYPE_MAXIM: return "MAX2820"; + case ACX_RADIO_TYPE_RFMD: return "RFMD"; + case ACX_RADIO_TYPE_RALINK: return "Ralink"; + case ACX_RADIO_TYPE_RADIA: return "Radia"; + default: return "unknown"; + } +} |