summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-05-19 18:25:58 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-05-20 20:46:34 +0200
commit7e0aae4732067e1bdb546071423a0b3483a79d9a (patch)
treed9c4e4dbc7e8ec0b998e0345628d92590b651b6f
parentmac80211: PS processing for every Beacon with our AID in TIM (diff)
downloadlinux-7e0aae4732067e1bdb546071423a0b3483a79d9a.tar.xz
linux-7e0aae4732067e1bdb546071423a0b3483a79d9a.zip
mac80211: Do not override AID in the duration field
When updating the duration field for TX frames, skip the update for PS-Poll frames that use this field for other purposes (AID). Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/tx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 8f68bf9746d0..a910148b8228 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -872,6 +872,8 @@ ieee80211_tx_h_calculate_duration(struct ieee80211_tx_data *tx)
do {
hdr = (void *) skb->data;
+ if (unlikely(ieee80211_is_pspoll(hdr->frame_control)))
+ break; /* must not overwrite AID */
next_len = skb->next ? skb->next->len : 0;
group_addr = is_multicast_ether_addr(hdr->addr1);