wl1271: Security sequence number handling for TX (for WPA)

Add security sequence number handling to the driver TX data path needed
by WPA.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Juuso Oikarinen
2009-10-08 21:56:19 +03:00
committed by John W. Linville
parent 3b4be9e08a
commit ac4e4ce54e
5 changed files with 38 additions and 5 deletions

View File

@@ -258,6 +258,7 @@ static void wl1271_tx_complete_packet(struct wl1271 *wl,
struct ieee80211_tx_info *info;
struct sk_buff *skb;
u32 header_len;
u16 seq;
int id = result->id;
/* check for id legality */
@@ -284,6 +285,16 @@ static void wl1271_tx_complete_packet(struct wl1271 *wl,
/* info->status.retry_count = result->ack_failures; */
wl->stats.retry_count += result->ack_failures;
/* update security sequence number */
seq = wl->tx_security_seq_16 +
(result->lsb_security_sequence_number -
wl->tx_security_last_seq);
wl->tx_security_last_seq = result->lsb_security_sequence_number;
if (seq < wl->tx_security_seq_16)
wl->tx_security_seq_32++;
wl->tx_security_seq_16 = seq;
/* get header len */
if (info->control.hw_key &&
info->control.hw_key->alg == ALG_TKIP)