Fix WPA (802.11i) support.
Approved by: silby (mentor)
This commit is contained in:
parent
0e22d2c550
commit
150bb7c348
@ -90,6 +90,8 @@ 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 *);
|
||||
@ -456,6 +458,7 @@ 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,
|
||||
@ -899,6 +902,15 @@ 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)
|
||||
{
|
||||
|
@ -99,6 +99,8 @@ 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 *);
|
||||
@ -470,6 +472,7 @@ 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,
|
||||
@ -641,6 +644,15 @@ 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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user