diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-02-22 01:38:40 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-09 15:03:04 -0500 |
commit | 04e36fc5f1ff4e349ea21de8d15e4e1844d04197 (patch) | |
tree | 8778ddf51094e3339392ea68233ce02c526ad418 /drivers/net/wireless/wl12xx/wl1271_tx.c | |
parent | 5c9417f1656b0f415f4be5a7cd7195ecadd7dd1a (diff) |
wl1271: Clean up TX security sequence number handling
Instead of managing the TX security sequence number as two variables, use
one 64 bit variable. This greatly simplifies the handling of the number.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_tx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_tx.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_tx.c b/drivers/net/wireless/wl12xx/wl1271_tx.c index d3ed63e92cf4..1b11e2caabd6 100644 --- a/drivers/net/wireless/wl12xx/wl1271_tx.c +++ b/drivers/net/wireless/wl12xx/wl1271_tx.c | |||
@@ -303,7 +303,6 @@ static void wl1271_tx_complete_packet(struct wl1271 *wl, | |||
303 | { | 303 | { |
304 | struct ieee80211_tx_info *info; | 304 | struct ieee80211_tx_info *info; |
305 | struct sk_buff *skb; | 305 | struct sk_buff *skb; |
306 | u16 seq; | ||
307 | int id = result->id; | 306 | int id = result->id; |
308 | 307 | ||
309 | /* check for id legality */ | 308 | /* check for id legality */ |
@@ -331,15 +330,10 @@ static void wl1271_tx_complete_packet(struct wl1271 *wl, | |||
331 | wl->stats.retry_count += result->ack_failures; | 330 | wl->stats.retry_count += result->ack_failures; |
332 | 331 | ||
333 | /* update security sequence number */ | 332 | /* update security sequence number */ |
334 | seq = wl->tx_security_seq_16 + | 333 | wl->tx_security_seq += (result->lsb_security_sequence_number - |
335 | (result->lsb_security_sequence_number - | 334 | wl->tx_security_last_seq); |
336 | wl->tx_security_last_seq); | ||
337 | wl->tx_security_last_seq = result->lsb_security_sequence_number; | 335 | wl->tx_security_last_seq = result->lsb_security_sequence_number; |
338 | 336 | ||
339 | if (seq < wl->tx_security_seq_16) | ||
340 | wl->tx_security_seq_32++; | ||
341 | wl->tx_security_seq_16 = seq; | ||
342 | |||
343 | /* remove private header from packet */ | 337 | /* remove private header from packet */ |
344 | skb_pull(skb, sizeof(struct wl1271_tx_hw_descr)); | 338 | skb_pull(skb, sizeof(struct wl1271_tx_hw_descr)); |
345 | 339 | ||