diff options
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 66d22de93c8d..fe1704c4e8fb 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -339,8 +339,9 @@ static int ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev, | |||
339 | 339 | ||
340 | switch (key->conf.cipher) { | 340 | switch (key->conf.cipher) { |
341 | case WLAN_CIPHER_SUITE_TKIP: | 341 | case WLAN_CIPHER_SUITE_TKIP: |
342 | iv32 = key->u.tkip.tx.iv32; | 342 | pn64 = atomic64_read(&key->conf.tx_pn); |
343 | iv16 = key->u.tkip.tx.iv16; | 343 | iv32 = TKIP_PN_TO_IV32(pn64); |
344 | iv16 = TKIP_PN_TO_IV16(pn64); | ||
344 | 345 | ||
345 | if (key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE && | 346 | if (key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE && |
346 | !(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)) { | 347 | !(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)) { |