diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2007-08-25 23:59:12 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2007-08-25 23:59:12 +0000 |
commit | 6bb4b324034c3e3b5cecd1118d160617d498de6e (patch) | |
tree | ce0e14ad2c2fc9db70de1943387c1b341064e4dd | |
parent | f24e24c9846a58c5f4846244c34a98a952207776 (diff) |
Remove FW command for WEP, it doesn't work with this FW version
(not supported). We always did software WEP.
Spotted by Mikore dot Li at sun dot com.
OK claudio@
-rw-r--r-- | sys/dev/ic/malo.c | 74 |
1 files changed, 1 insertions, 73 deletions
diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c index ef057f1142b..78a6b417101 100644 --- a/sys/dev/ic/malo.c +++ b/sys/dev/ic/malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malo.c,v 1.74 2007/08/25 20:57:12 mglocker Exp $ */ +/* $OpenBSD: malo.c,v 1.75 2007/08/25 23:59:11 mglocker Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -115,7 +115,6 @@ struct malo_tx_desc { * Firmware commands */ #define MALO_CMD_GET_HW_SPEC 0x0003 -#define MALO_CMD_SET_WEPKEY 0x0013 #define MALO_CMD_SET_RADIO 0x001c #define MALO_CMD_SET_AID 0x010d #define MALO_CMD_SET_TXPOWER 0x001e @@ -160,18 +159,6 @@ struct malo_hw_spec { uint32_t WcbBase3; } __packed; -struct malo_cmd_wepkey { - uint16_t action; - uint8_t len; - uint8_t flags; - uint16_t index; - uint8_t value[IEEE80211_KEYBUF_SIZE]; - uint8_t txmickey[IEEE80211_WEP_MICLEN]; - uint8_t rxmickey[IEEE80211_WEP_MICLEN]; - uint64_t rxseqctr; - uint64_t txseqctr; -} __packed; - struct malo_cmd_radio { uint16_t action; uint16_t preamble_mode; @@ -284,7 +271,6 @@ void malo_rx_intr(struct malo_softc *sc); int malo_load_bootimg(struct malo_softc *sc); int malo_load_firmware(struct malo_softc *sc); -int malo_set_wepkey(struct malo_softc *sc); int malo_set_slot(struct malo_softc *sc); void malo_update_slot(struct ieee80211com *ic); #ifdef MALO_DEBUG @@ -295,8 +281,6 @@ static char * static char * malo_cmd_string_result(uint16_t result); int malo_cmd_get_spec(struct malo_softc *sc); -int malo_cmd_set_wepkey(struct malo_softc *sc, struct ieee80211_key *k, - uint16_t k_index); int malo_cmd_set_prescan(struct malo_softc *sc); int malo_cmd_set_postscan(struct malo_softc *sc, uint8_t *macaddr, uint8_t ibsson); @@ -937,16 +921,6 @@ malo_init(struct ifnet *ifp) goto fail; } - /* WEP */ - if (sc->sc_ic.ic_flags & IEEE80211_F_WEPON) { - /* set key */ - if (malo_set_wepkey(sc)) { - printf("%s: setting WEP key failed!\n", - sc->sc_dev.dv_xname); - goto fail; - } - } - ifp->if_flags |= IFF_RUNNING; if (ic->ic_opmode != IEEE80211_M_MONITOR) @@ -1940,25 +1914,6 @@ malo_load_firmware(struct malo_softc *sc) } int -malo_set_wepkey(struct malo_softc *sc) -{ - struct ieee80211com *ic = &sc->sc_ic; - int i; - - for (i = 0; i < IEEE80211_WEP_NKID; i++) { - struct ieee80211_key *k = &ic->ic_nw_keys[i]; - - if (k->k_len == 0) - continue; - - if (malo_cmd_set_wepkey(sc, k, i)) - return (ENXIO); - } - - return (0); -} - -int malo_set_slot(struct malo_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; @@ -2038,7 +1993,6 @@ malo_cmd_string(uint16_t cmd) char *cmd_string; } cmds[] = { { MALO_CMD_GET_HW_SPEC, "GetHwSpecifications" }, - { MALO_CMD_SET_WEPKEY, "SetWep" }, { MALO_CMD_SET_RADIO, "SetRadio" }, { MALO_CMD_SET_AID, "SetAid" }, { MALO_CMD_SET_TXPOWER, "SetTxPower" }, @@ -2127,32 +2081,6 @@ malo_cmd_get_spec(struct malo_softc *sc) } int -malo_cmd_set_wepkey(struct malo_softc *sc, struct ieee80211_key *k, - uint16_t k_index) -{ - struct malo_cmdheader *hdr = sc->sc_cmd_mem; - struct malo_cmd_wepkey *body; - - hdr->cmd = htole16(MALO_CMD_SET_WEPKEY); - hdr->size = htole16(sizeof(*hdr) + sizeof(*body)); - hdr->seqnum = 1; - hdr->result = 0; - body = (struct malo_cmd_wepkey *)(hdr + 1); - - bzero(body, sizeof(*body)); - body->action = htole16(1); - body->flags = 0; - body->index = k_index; - body->len = k->k_len; - memcpy(body->value, k->k_key, k->k_len); - - bus_dmamap_sync(sc->sc_dmat, sc->sc_cmd_dmam, 0, PAGE_SIZE, - BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); - - return (malo_send_cmd_dma(sc, sc->sc_cmd_dmaaddr)); -} - -int malo_cmd_set_prescan(struct malo_softc *sc) { struct malo_cmdheader *hdr = sc->sc_cmd_mem; |