aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tkip.c
diff options
context:
space:
mode:
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 14fe49332c02..7ef491e9d66d 100644
--- a/net/mac80211/tkip.c
+++ b/net/mac80211/tkip.c
@@ -304,14 +304,12 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
304 if (key->local->ops->update_tkip_key && 304 if (key->local->ops->update_tkip_key &&
305 key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE && 305 key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE &&
306 key->u.tkip.rx[queue].state != TKIP_STATE_PHASE1_HW_UPLOADED) { 306 key->u.tkip.rx[queue].state != TKIP_STATE_PHASE1_HW_UPLOADED) {
307 static const u8 bcast[ETH_ALEN] = 307 struct ieee80211_sub_if_data *sdata = key->sdata;
308 {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
309 const u8 *sta_addr = key->sta->sta.addr;
310 308
311 if (is_multicast_ether_addr(ra)) 309 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
312 sta_addr = bcast; 310 sdata = container_of(key->sdata->bss,
313 311 struct ieee80211_sub_if_data, u.ap);
314 drv_update_tkip_key(key->local, &key->conf, sta_addr, 312 drv_update_tkip_key(key->local, sdata, &key->conf, key->sta,
315 iv32, key->u.tkip.rx[queue].p1k); 313 iv32, key->u.tkip.rx[queue].p1k);
316 key->u.tkip.rx[queue].state = TKIP_STATE_PHASE1_HW_UPLOADED; 314 key->u.tkip.rx[queue].state = TKIP_STATE_PHASE1_HW_UPLOADED;
317 } 315 }