summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2010-11-06 12:27:44 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2010-11-06 12:27:44 +0000
commitd6a57b2f6aa13a636e5e3ff28bb366f436bce2f1 (patch)
tree6ca02f300faed82f8bf334318416209f8ff23422 /sys/dev
parenta6a2c73da75eef5221e4ad75f5d59166593ef1fe (diff)
print the MAC address on the second line like with the other USB
802.11 drivers.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/if_urtwn.c19
-rw-r--r--sys/dev/usb/if_urtwnreg.h8
2 files changed, 14 insertions, 13 deletions
diff --git a/sys/dev/usb/if_urtwn.c b/sys/dev/usb/if_urtwn.c
index 6b269f445c3..9218ffb307b 100644
--- a/sys/dev/usb/if_urtwn.c
+++ b/sys/dev/usb/if_urtwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtwn.c,v 1.3 2010/11/05 17:57:10 damien Exp $ */
+/* $OpenBSD: if_urtwn.c,v 1.4 2010/11/06 12:27:43 damien Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -242,20 +242,22 @@ urtwn_attach(struct device *parent, struct device *self, void *aux)
timeout_set(&sc->calib_to, urtwn_calib_to, sc);
if (usbd_set_config_no(sc->sc_udev, 1, 0) != 0) {
- printf(": could not set configuration no\n");
+ printf("%s: could not set configuration no\n",
+ sc->sc_dev.dv_xname);
return;
}
/* Get the first interface handle. */
error = usbd_device2interface_handle(sc->sc_udev, 0, &sc->sc_iface);
if (error != 0) {
- printf(": could not get interface handle\n");
+ printf("%s: could not get interface handle\n",
+ sc->sc_dev.dv_xname);
return;
}
error = urtwn_read_chipid(sc);
if (error != 0) {
- printf(": unsupported test chip\n");
+ printf("%s: unsupported test chip\n", sc->sc_dev.dv_xname);
return;
}
@@ -269,10 +271,9 @@ urtwn_attach(struct device *parent, struct device *self, void *aux)
}
urtwn_read_rom(sc);
- printf(", %s\n", ether_sprintf(ic->ic_myaddr));
- printf("%s: board type 0x%x, ROM ver %d, RF 6052 %dT%dR\n",
- sc->sc_dev.dv_xname, sc->board_type, sc->rom.version,
- sc->ntxchains, sc->nrxchains);
+ printf("%s: board type 0x%x, RF 6052 %dT%dR, address %s\n",
+ sc->sc_dev.dv_xname, sc->board_type, sc->ntxchains,
+ sc->nrxchains, ether_sprintf(ic->ic_myaddr));
if (urtwn_open_pipes(sc) != 0)
return;
@@ -727,7 +728,7 @@ urtwn_rf_write(struct urtwn_softc *sc, int chain, uint8_t addr, uint32_t val)
uint32_t
urtwn_rf_read(struct urtwn_softc *sc, int chain, uint8_t addr)
{
- uint32_t reg[2], val;
+ uint32_t reg[R92C_MAX_CHAINS], val;
reg[0] = urtwn_bb_read(sc, R92C_HSSI_PARAM2(0));
if (chain != 0)
diff --git a/sys/dev/usb/if_urtwnreg.h b/sys/dev/usb/if_urtwnreg.h
index 9f05b1499a5..560bfd007b3 100644
--- a/sys/dev/usb/if_urtwnreg.h
+++ b/sys/dev/usb/if_urtwnreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtwnreg.h,v 1.1 2010/11/05 16:58:12 damien Exp $ */
+/* $OpenBSD: if_urtwnreg.h,v 1.2 2010/11/06 12:27:43 damien Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -857,15 +857,15 @@ struct r92c_rom {
uint8_t macaddr[6];
uint8_t string[61]; /* "Realtek" */
uint8_t subcustomer_id;
- uint8_t cck_tx_pwr[2][3];
- uint8_t ht40_1s_tx_pwr[2][3];
+ uint8_t cck_tx_pwr[R92C_MAX_CHAINS][3];
+ uint8_t ht40_1s_tx_pwr[R92C_MAX_CHAINS][3];
uint8_t ht40_2s_tx_pwr_diff[3];
uint8_t ht20_tx_pwr_diff[3];
uint8_t ofdm_tx_pwr_diff[3];
uint8_t ht40_max_pwr[3];
uint8_t ht20_max_pwr[3];
uint8_t xtal_calib;
- uint8_t tssi[2];
+ uint8_t tssi[R92C_MAX_CHAINS];
uint8_t thermal_meter;
uint8_t rf_opt1;
#define R92C_ROM_RF1_REGULATORY_M 0x07