From 0cf4212697b43b0db220a1214814a995e8b35821 Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 10 Jul 2005 00:17:05 +0000 Subject: [PATCH] remove driver-private key allocators; use the default one instead so wpa keys are handled properly Reviewed by: avatar Approved by: re (scottl) --- sys/dev/iwi/if_iwi.c | 12 ------------ sys/dev/ral/if_ral.c | 12 ------------ sys/dev/usb/if_ural.c | 12 ------------ 3 files changed, 36 deletions(-) diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c index 24e3eb9cdec0..8d4312d484a8 100644 --- a/sys/dev/iwi/if_iwi.c +++ b/sys/dev/iwi/if_iwi.c @@ -116,8 +116,6 @@ static int iwi_alloc_rx_ring(struct iwi_softc *, struct iwi_rx_ring *, int); static void iwi_reset_rx_ring(struct iwi_softc *, struct iwi_rx_ring *); static void iwi_free_rx_ring(struct iwi_softc *, struct iwi_rx_ring *); -static int iwi_key_alloc(struct ieee80211com *, - const struct ieee80211_key *); static int iwi_media_change(struct ifnet *); static void iwi_media_status(struct ifnet *, struct ifmediareq *); static int iwi_newstate(struct ieee80211com *, enum ieee80211_state, int); @@ -365,7 +363,6 @@ iwi_attach(device_t dev) /* override state transition machine */ sc->sc_newstate = ic->ic_newstate; ic->ic_newstate = iwi_newstate; - ic->ic_crypto.cs_key_alloc = iwi_key_alloc; ieee80211_media_init(ic, iwi_media_change, iwi_media_status); bpfattach2(ifp, DLT_IEEE802_11_RADIO, @@ -798,15 +795,6 @@ iwi_resume(device_t dev) return 0; } -static int -iwi_key_alloc(struct ieee80211com *ic, const struct ieee80211_key *k) -{ - if (k >= ic->ic_nw_keys && k < &ic->ic_nw_keys[IEEE80211_WEP_NKID]) - return k - ic->ic_nw_keys; - - return IEEE80211_KEYIX_NONE; -} - static int iwi_media_change(struct ifnet *ifp) { diff --git a/sys/dev/ral/if_ral.c b/sys/dev/ral/if_ral.c index 9b56ee7b4252..4a26c6c03aa6 100644 --- a/sys/dev/ral/if_ral.c +++ b/sys/dev/ral/if_ral.c @@ -91,8 +91,6 @@ static void ral_free_rx_ring(struct ral_softc *, struct ral_rx_ring *); static struct ieee80211_node *ral_node_alloc( struct ieee80211_node_table *); -static int ral_key_alloc(struct ieee80211com *, - const struct ieee80211_key *); static int ral_media_change(struct ifnet *); static void ral_next_scan(void *); static void ral_iter_func(void *, struct ieee80211_node *); @@ -463,7 +461,6 @@ ral_attach(device_t dev) /* override state transition machine */ sc->sc_newstate = ic->ic_newstate; ic->ic_newstate = ral_newstate; - ic->ic_crypto.cs_key_alloc = ral_key_alloc; ieee80211_media_init(ic, ral_media_change, ieee80211_media_status); bpfattach2(ifp, DLT_IEEE802_11_RADIO, @@ -909,15 +906,6 @@ ral_node_alloc(struct ieee80211_node_table *nt) return (rn != NULL) ? &rn->ni : NULL; } -static int -ral_key_alloc(struct ieee80211com *ic, const struct ieee80211_key *k) -{ - if (k >= ic->ic_nw_keys && k < &ic->ic_nw_keys[IEEE80211_WEP_NKID]) - return k - ic->ic_nw_keys; - - return IEEE80211_KEYIX_NONE; -} - static int ral_media_change(struct ifnet *ifp) { diff --git a/sys/dev/usb/if_ural.c b/sys/dev/usb/if_ural.c index ee2348c36dc3..b09cb4a8745e 100644 --- a/sys/dev/usb/if_ural.c +++ b/sys/dev/usb/if_ural.c @@ -109,8 +109,6 @@ Static int ural_alloc_tx_list(struct ural_softc *); Static void ural_free_tx_list(struct ural_softc *); Static int ural_alloc_rx_list(struct ural_softc *); Static void ural_free_rx_list(struct ural_softc *); -Static int ural_key_alloc(struct ieee80211com *, - const struct ieee80211_key *); Static int ural_media_change(struct ifnet *); Static void ural_next_scan(void *); Static void ural_task(void *); @@ -493,7 +491,6 @@ USB_ATTACH(ural) /* override state transition machine */ sc->sc_newstate = ic->ic_newstate; ic->ic_newstate = ural_newstate; - ic->ic_crypto.cs_key_alloc = ural_key_alloc; ieee80211_media_init(ic, ural_media_change, ieee80211_media_status); bpfattach2(ifp, DLT_IEEE802_11_RADIO, @@ -666,15 +663,6 @@ ural_free_rx_list(struct ural_softc *sc) } } -Static int -ural_key_alloc(struct ieee80211com *ic, const struct ieee80211_key *k) -{ - if (k >= ic->ic_nw_keys && k < &ic->ic_nw_keys[IEEE80211_WEP_NKID]) - return k - ic->ic_nw_keys; - - return IEEE80211_KEYIX_NONE; -} - Static int ural_media_change(struct ifnet *ifp) {