summaryrefslogtreecommitdiffstats
path: root/net/mac80211/tkip.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-01-21 11:40:47 +0100
committerJohn W. Linville <linville@tuxdriver.com>2010-01-22 16:08:55 -0500
commitb3fbdcf49f940d0703c356441e0daf045e64e076 (patch)
treef63416cc9b80a6757ec6fa57190f581b2b3a6d31 /net/mac80211/tkip.c
parente4fca007b06165900d0e44e8d5e251376819bf5d (diff)
downloadop-kernel-dev-b3fbdcf49f940d0703c356441e0daf045e64e076.zip
op-kernel-dev-b3fbdcf49f940d0703c356441e0daf045e64e076.tar.gz
mac80211: pass vif and station to update_tkip_key
When a TKIP key is updated, we should pass the station pointer instead of just the address, since drivers can use that to store their own data. We also need to pass the virtual interface pointer. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tkip.c')
-rw-r--r--net/mac80211/tkip.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c
index 14fe493..7ef491e 100644
--- a/net/mac80211/tkip.c
+++ b/net/mac80211/tkip.c
@@ -304,14 +304,12 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
if (key->local->ops->update_tkip_key &&
key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE &&
key->u.tkip.rx[queue].state != TKIP_STATE_PHASE1_HW_UPLOADED) {
- static const u8 bcast[ETH_ALEN] =
- {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
- const u8 *sta_addr = key->sta->sta.addr;
+ struct ieee80211_sub_if_data *sdata = key->sdata;
- if (is_multicast_ether_addr(ra))
- sta_addr = bcast;
-
- drv_update_tkip_key(key->local, &key->conf, sta_addr,
+ if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
+ sdata = container_of(key->sdata->bss,
+ struct ieee80211_sub_if_data, u.ap);
+ drv_update_tkip_key(key->local, sdata, &key->conf, key->sta,
iv32, key->u.tkip.rx[queue].p1k);
key->u.tkip.rx[queue].state = TKIP_STATE_PHASE1_HW_UPLOADED;
}
OpenPOWER on IntegriCloud