summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2006-06-30 12:27:22 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2006-06-30 12:27:22 +0000
commitabaf94e46d61c71009a879f681bb85465335c857 (patch)
tree44774a3ea188b07b5aeac6028b9978db172288f2 /sys
parent5386bc85c8e7b26ee9d7ad450c0ce0f66a32ac34 (diff)
Shrink dmesg output, use ether_sprintf() to print MAC address.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/if_zyd.c24
-rw-r--r--sys/dev/usb/if_zydreg.h4
2 files changed, 11 insertions, 17 deletions
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c
index 63a21a1a4a3..1d1a8dd3046 100644
--- a/sys/dev/usb/if_zyd.c
+++ b/sys/dev/usb/if_zyd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_zyd.c,v 1.10 2006/06/29 12:13:43 jsg Exp $ */
+/* $OpenBSD: if_zyd.c,v 1.11 2006/06/30 12:27:21 jsg Exp $ */
/*
* Copyright (c) 2006 by Florian Stoehr <ich@florian-stoehr.de>
@@ -1699,9 +1699,6 @@ zyd_read_rf_pa_types(struct zyd_softc *sc, uint8_t *rf_type,
if (!rv) {
rf = value & 0x0f;
pa = (value >> 16) & 0x0f;
-
- printf("%s: Radio %s (%#01x), PA %#01x\n",
- USBDEVNAME(sc->zyd_dev), zyd_rf_name(rf), rf, pa);
}
*rf_type = rf;
@@ -1870,8 +1867,7 @@ zyd_hw_init(struct zyd_softc *sc, struct ieee80211com *ic)
{
usbd_status rv;
int stage = 0;
- uint8_t rf, pa;
- uint16_t theversion;
+ uint8_t rf;
rv = zyd_singleregwrite32(sc, ZYD_MAC_AFTER_PNP, 1);
@@ -1886,16 +1882,13 @@ zyd_hw_init(struct zyd_softc *sc, struct ieee80211com *ic)
DPRINTF(("zyd_hw_init: firmware_base = 0x%04X\n", sc->firmware_base));
/* Print the firmware version */
- rv = zyd_singleregread16(sc, ZYD_FW_FIRMWARE_VER, &theversion);
+ rv = zyd_singleregread16(sc, ZYD_FW_FIRMWARE_VER, &sc->fw_ver);
if (rv)
goto leave;
stage++;
- printf("%s: Firmware version is 0x%04X\n",
- USBDEVNAME(sc->zyd_dev), theversion);
-
rv = zyd_singleregwrite32(sc, ZYD_CR_GPI_EN, 0);
if (rv)
@@ -1935,7 +1928,7 @@ zyd_hw_init(struct zyd_softc *sc, struct ieee80211com *ic)
stage++;
/* RF/PA types */
- rv = zyd_read_rf_pa_types(sc, &rf, &pa);
+ rv = zyd_read_rf_pa_types(sc, &rf, &sc->pa_ver);
if (rv)
goto leave;
@@ -1989,11 +1982,6 @@ zyd_get_e2p_mac_addr(struct zyd_softc *sc, struct zyd_macaddr *mac_addr)
mac_addr->addr[4] = mac[1];
mac_addr->addr[5] = mac[1] >> 8;
- printf("%s: E2P MAC address is %02X:%02X:%02X:%02X:%02X:%02X\n",
- USBDEVNAME(sc->zyd_dev), mac_addr->addr[0], mac_addr->addr[1],
- mac_addr->addr[2], mac_addr->addr[3], mac_addr->addr[4],
- mac_addr->addr[5]);
-
leave:
return rv;
}
@@ -2396,6 +2384,10 @@ zyd_complete_attach(struct zyd_softc *sc)
rv = zyd_get_e2p_mac_addr(sc, &mac);
memcpy(&sc->sc_ic.ic_myaddr, &mac, IEEE80211_ADDR_LEN);
+ printf("%s: Firmware 0x%04X, Radio %s, PA %#01x, address %s\n",
+ USBDEVNAME(sc->zyd_dev), sc->fw_ver, zyd_rf_name(sc->rf.type),
+ sc->pa_ver, ether_sprintf(ic->ic_myaddr));
+
if (rv)
goto leave;
diff --git a/sys/dev/usb/if_zydreg.h b/sys/dev/usb/if_zydreg.h
index 1b02d12a3e7..bd29514ffcf 100644
--- a/sys/dev/usb/if_zydreg.h
+++ b/sys/dev/usb/if_zydreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_zydreg.h,v 1.6 2006/06/29 12:13:43 jsg Exp $ */
+/* $OpenBSD: if_zydreg.h,v 1.7 2006/06/30 12:27:21 jsg Exp $ */
/*
* Copyright (c) 2006 by Florian Stoehr <ich@florian-stoehr.de>
@@ -1228,6 +1228,8 @@ struct zyd_softc {
uint8_t regdomain;
uint8_t channel;
uint8_t mac_flags;
+ uint8_t pa_ver;
+ uint16_t fw_ver;
/* Calibration tables */
uint8_t pwr_cal_values[ZYD_E2P_CHANNEL_COUNT];