PERFORCE change 118653 for review
Sepherosa Ziehau
sephe at FreeBSD.org
Mon Apr 23 12:18:55 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=118653
Change 118653 by sephe at sephe_zealot:sam_wifi on 2007/04/23 12:18:18
Nuke unnecessary setting of ural(4)'s security registers. ural(4)
only supports software encrypt/decrypt.
The nuked code itself is quite problematic, as pointed out by sam@
-- wk->wk_keyix should be replaced by the loop count.
Tested with WEP/TKIP/CCMP/no-protection.
Noticed-by: Hans Petter Selasky <hselasky at c2i.net>
Affected files ...
.. //depot/projects/wifi/sys/dev/usb/if_ural.c#20 edit
Differences ...
==== //depot/projects/wifi/sys/dev/usb/if_ural.c#20 (text+ko) ====
@@ -147,7 +147,7 @@
int);
static void ural_write(struct ural_softc *, uint16_t, uint16_t);
static void ural_write_multi(struct ural_softc *, uint16_t, void *,
- int);
+ int) __unused;
static void ural_bbp_write(struct ural_softc *, uint8_t, uint8_t);
static uint8_t ural_bbp_read(struct ural_softc *, uint8_t);
static void ural_rf_write(struct ural_softc *, uint8_t, uint32_t);
@@ -2205,7 +2205,6 @@
struct ural_softc *sc = priv;
struct ieee80211com *ic = &sc->sc_ic;
struct ifnet *ifp = ic->ic_ifp;
- struct ieee80211_key *wk;
struct ural_rx_data *data;
uint16_t tmp;
usbd_status error;
@@ -2255,15 +2254,6 @@
ural_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_crypto.cs_nw_keys[i];
- ural_write_multi(sc, wk->wk_keyix * IEEE80211_KEYBUF_SIZE +
- RAL_SEC_CSR0, wk->wk_key, IEEE80211_KEYBUF_SIZE);
- }
-
- /*
* Allocate xfer for AMRR statistics requests.
*/
sc->amrr_xfer = usbd_alloc_xfer(sc->sc_udev);
More information about the p4-projects
mailing list