net80211 + drivers: convert to ieee80211_crypto_get_key_wepidx().
Proposed by: adrian
This commit is contained in:
parent
b594081bdf
commit
4a19d71238
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=309686
@ -449,7 +449,8 @@ ath_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k,
|
||||
* have no way to check if they've already
|
||||
* been allocated.
|
||||
*/
|
||||
*keyix = *rxkeyix = k - vap->iv_nw_keys;
|
||||
*keyix = *rxkeyix =
|
||||
ieee80211_crypto_get_key_wepidx(vap, k);
|
||||
return 1;
|
||||
}
|
||||
/*
|
||||
|
@ -1529,7 +1529,7 @@ mwl_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k,
|
||||
return 0;
|
||||
}
|
||||
/* give the caller what they requested */
|
||||
*keyix = *rxkeyix = k - vap->iv_nw_keys;
|
||||
*keyix = *rxkeyix = ieee80211_crypto_get_key_wepidx(vap, k);
|
||||
} else {
|
||||
/*
|
||||
* Firmware handles key allocation.
|
||||
|
@ -118,7 +118,11 @@ rtwn_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k,
|
||||
|
||||
if (&vap->iv_nw_keys[0] <= k &&
|
||||
k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) {
|
||||
#if __FreeBSD_version > 1200018
|
||||
*keyix = ieee80211_crypto_get_key_wepidx(vap, k);
|
||||
#else
|
||||
*keyix = k - vap->iv_nw_keys;
|
||||
#endif
|
||||
if (sc->sc_hwcrypto != RTWN_CRYPTO_FULL)
|
||||
k->wk_flags |= IEEE80211_KEY_SWCRYPT;
|
||||
else {
|
||||
|
@ -1428,7 +1428,7 @@ rsu_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k,
|
||||
|
||||
if (&vap->iv_nw_keys[0] <= k &&
|
||||
k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) {
|
||||
*keyix = k - vap->iv_nw_keys;
|
||||
*keyix = ieee80211_crypto_get_key_wepidx(vap, k);
|
||||
} else {
|
||||
if (vap->iv_opmode != IEEE80211_M_STA) {
|
||||
*keyix = 0;
|
||||
|
@ -3046,7 +3046,7 @@ rum_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k,
|
||||
} else
|
||||
*keyix = 0;
|
||||
} else {
|
||||
*keyix = k - vap->iv_nw_keys;
|
||||
*keyix = ieee80211_crypto_get_key_wepidx(vap, k);
|
||||
}
|
||||
*rxkeyix = *keyix;
|
||||
return 1;
|
||||
|
@ -78,7 +78,7 @@ null_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k,
|
||||
return 0;
|
||||
*keyix = 0; /* NB: use key index 0 for ucast key */
|
||||
} else {
|
||||
*keyix = k - vap->iv_nw_keys;
|
||||
*keyix = ieee80211_crypto_get_key_wepidx(vap, k);
|
||||
}
|
||||
*rxkeyix = IEEE80211_KEYIX_NONE; /* XXX maybe *keyix? */
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user