diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2006-07-18 20:29:17 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2006-07-18 20:29:17 +0000 |
commit | f8ebfcf92258fbe7830b0554bfd264cf6bf0d75c (patch) | |
tree | b46813d12e670b9d193bb2ec5acaef7a0e2a4119 /sys | |
parent | 1c26fb6426e14051902164b6fbf7e61c8bae7101 (diff) |
SEC_CSR registers have a different meaning in RT2501USB.
leave them to zero for now since we don't support h/w crypto yet.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/if_rum.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c index 81873114b91..d721e57c6f2 100644 --- a/sys/dev/usb/if_rum.c +++ b/sys/dev/usb/if_rum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rum.c,v 1.9 2006/07/18 20:23:14 damien Exp $ */ +/* $OpenBSD: if_rum.c,v 1.10 2006/07/18 20:29:16 damien Exp $ */ /*- * Copyright (c) 2005, 2006 Damien Bergamini <damien.bergamini@free.fr> * Copyright (c) 2006 Niall O'Higgins <niallo@openbsd.org> @@ -1879,17 +1879,13 @@ rum_init(struct ifnet *ifp) #define N(a) (sizeof (a) / sizeof ((a)[0])) struct rum_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; - struct ieee80211_wepkey *wk; struct rum_rx_data *data; usbd_status error; - int i; uint32_t tmp; + int i; rum_stop(ifp, 0); - - tmp = rum_read(sc, RT2573_MAC_CSR0); - /* initialize MAC registers to default values */ for (i = 0; i < N(rum_def_mac); i++) rum_write(sc, rum_def_mac[i].reg, rum_def_mac[i].val); @@ -1898,9 +1894,7 @@ rum_init(struct ifnet *ifp) rum_write(sc, RT2573_MAC_CSR1, 0x3); rum_write(sc, RT2573_MAC_CSR1, 0x0); - - error = rum_bbp_init(sc); - if (error != 0) + if ((error = rum_bbp_init(sc)) != 0) goto fail; /* set host ready */ rum_write(sc, RT2573_MAC_CSR1, 0x4); @@ -1917,15 +1911,6 @@ rum_init(struct ifnet *ifp) rum_set_macaddr(sc, ic->ic_myaddr); /* - * Copy WEP keys into adapter's memory (SEC_CSR0 to SEC_CSR31). - */ - for (i = 0; i < IEEE80211_WEP_NKID; i++) { - wk = &ic->ic_nw_keys[i]; - rum_write_multi(sc, RT2573_SEC_CSR0 + i * IEEE80211_KEYBUF_SIZE, - wk->wk_key, IEEE80211_KEYBUF_SIZE); - } - - /* * Open Tx and Rx USB bulk pipes. */ error = usbd_open_pipe(sc->sc_iface, sc->sc_tx_no, USBD_EXCLUSIVE_USE, @@ -1996,7 +1981,6 @@ rum_init(struct ifnet *ifp) 5); rum_write(sc, RT2573_MAC_CSR14, RT2573_LED_ON); - return 0; fail: rum_stop(ifp, 1); |