aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_tx.c
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2009-10-08 21:56:19 +0300
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:47:48 -0400
commitac4e4ce54eb9cb4963a1d3d91fc65536d882ffb2 (patch)
tree7ce830794c7029ab65ecb00562e48d00acc98d87 /drivers/net/wireless/wl12xx/wl1271_tx.c
parent3b4be9e08abd8c390d13001f5dd55f64afa5ab93 (diff)
downloadkernel_samsung_smdk4412-ac4e4ce54eb9cb4963a1d3d91fc65536d882ffb2.zip
kernel_samsung_smdk4412-ac4e4ce54eb9cb4963a1d3d91fc65536d882ffb2.tar.gz
kernel_samsung_smdk4412-ac4e4ce54eb9cb4963a1d3d91fc65536d882ffb2.tar.bz2
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>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_tx.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_tx.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_tx.c b/drivers/net/wireless/wl12xx/wl1271_tx.c
index 0c19688..162f026 100644
--- a/drivers/net/wireless/wl12xx/wl1271_tx.c
+++ b/drivers/net/wireless/wl12xx/wl1271_tx.c
@@ -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)