diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/tkip.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c index de570b38460..cc79e697cdb 100644 --- a/net/mac80211/tkip.c +++ b/net/mac80211/tkip.c | |||
@@ -170,15 +170,12 @@ static void ieee80211_compute_tkip_p1k(struct ieee80211_key *key, u32 iv32) | |||
170 | tkip_mixing_phase1(tk, ctx, sdata->vif.addr, iv32); | 170 | tkip_mixing_phase1(tk, ctx, sdata->vif.addr, iv32); |
171 | } | 171 | } |
172 | 172 | ||
173 | void ieee80211_get_tkip_p1k(struct ieee80211_key_conf *keyconf, | 173 | void ieee80211_get_tkip_p1k_iv(struct ieee80211_key_conf *keyconf, |
174 | struct sk_buff *skb, u16 *p1k) | 174 | u32 iv32, u16 *p1k) |
175 | { | 175 | { |
176 | struct ieee80211_key *key = (struct ieee80211_key *) | 176 | struct ieee80211_key *key = (struct ieee80211_key *) |
177 | container_of(keyconf, struct ieee80211_key, conf); | 177 | container_of(keyconf, struct ieee80211_key, conf); |
178 | struct tkip_ctx *ctx = &key->u.tkip.tx; | 178 | struct tkip_ctx *ctx = &key->u.tkip.tx; |
179 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | ||
180 | const u8 *data = (u8 *)hdr + ieee80211_hdrlen(hdr->frame_control); | ||
181 | u32 iv32 = get_unaligned_le32(&data[4]); | ||
182 | unsigned long flags; | 179 | unsigned long flags; |
183 | 180 | ||
184 | spin_lock_irqsave(&key->u.tkip.txlock, flags); | 181 | spin_lock_irqsave(&key->u.tkip.txlock, flags); |
@@ -186,7 +183,7 @@ void ieee80211_get_tkip_p1k(struct ieee80211_key_conf *keyconf, | |||
186 | memcpy(p1k, ctx->p1k, sizeof(ctx->p1k)); | 183 | memcpy(p1k, ctx->p1k, sizeof(ctx->p1k)); |
187 | spin_unlock_irqrestore(&key->u.tkip.txlock, flags); | 184 | spin_unlock_irqrestore(&key->u.tkip.txlock, flags); |
188 | } | 185 | } |
189 | EXPORT_SYMBOL(ieee80211_get_tkip_p1k); | 186 | EXPORT_SYMBOL(ieee80211_get_tkip_p1k_iv); |
190 | 187 | ||
191 | void ieee80211_get_tkip_p2k(struct ieee80211_key_conf *keyconf, | 188 | void ieee80211_get_tkip_p2k(struct ieee80211_key_conf *keyconf, |
192 | struct sk_buff *skb, u8 *p2k) | 189 | struct sk_buff *skb, u8 *p2k) |