summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_crypto.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-05-28 23:32:00 +0000
committersam <sam@FreeBSD.org>2008-05-28 23:32:00 +0000
commit7aa0974e2beebe0274ddf6e9c4c6663f0153b9fb (patch)
tree11f1e7429f40b4646c19d38f606412f9c2290a86 /sys/net80211/ieee80211_crypto.c
parent6be5c5b31dc02a4f03bf8981291eaf6adfce5882 (diff)
downloadFreeBSD-src-7aa0974e2beebe0274ddf6e9c4c6663f0153b9fb.zip
FreeBSD-src-7aa0974e2beebe0274ddf6e9c4c6663f0153b9fb.tar.gz
Add a mac address to the key definition as otherwise we lose the
address specified in the ioctl and for drivers that need the address to locate a key (e.g. for delete). Note this changes net80211-private api's but not the driver callback; may want to change that in the future. Reviewed by: sephe, thompsa
Diffstat (limited to 'sys/net80211/ieee80211_crypto.c')
-rw-r--r--sys/net80211/ieee80211_crypto.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c
index d644d0c..1329bd4 100644
--- a/sys/net80211/ieee80211_crypto.c
+++ b/sys/net80211/ieee80211_crypto.c
@@ -130,10 +130,9 @@ dev_key_delete(struct ieee80211vap *vap,
}
static __inline int
-dev_key_set(struct ieee80211vap *vap, const struct ieee80211_key *key,
- const uint8_t mac[IEEE80211_ADDR_LEN])
+dev_key_set(struct ieee80211vap *vap, const struct ieee80211_key *key)
{
- return vap->iv_key_set(vap, key, mac);
+ return vap->iv_key_set(vap, key, key->wk_macaddr);
}
/*
@@ -480,8 +479,7 @@ ieee80211_crypto_delglobalkeys(struct ieee80211vap *vap)
* ieee80211_key_update_end(vap);
*/
int
-ieee80211_crypto_setkey(struct ieee80211vap *vap, struct ieee80211_key *key,
- const uint8_t macaddr[IEEE80211_ADDR_LEN])
+ieee80211_crypto_setkey(struct ieee80211vap *vap, struct ieee80211_key *key)
{
const struct ieee80211_cipher *cip = key->wk_cipher;
@@ -490,7 +488,7 @@ ieee80211_crypto_setkey(struct ieee80211vap *vap, struct ieee80211_key *key,
IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO,
"%s: %s keyix %u flags 0x%x mac %s rsc %ju tsc %ju len %u\n",
__func__, cip->ic_name, key->wk_keyix,
- key->wk_flags, ether_sprintf(macaddr),
+ key->wk_flags, ether_sprintf(key->wk_macaddr),
key->wk_keyrsc[IEEE80211_NONQOS_TID], key->wk_keytsc,
key->wk_keylen);
@@ -513,7 +511,7 @@ ieee80211_crypto_setkey(struct ieee80211vap *vap, struct ieee80211_key *key,
vap->iv_stats.is_crypto_setkey_nokey++;
return 0;
}
- return dev_key_set(vap, key, macaddr);
+ return dev_key_set(vap, key);
}
/*
OpenPOWER on IntegriCloud