From: Jouni Malinen Date: Tue, 19 May 2009 16:25:58 +0000 (+0300) Subject: mac80211: Do not override AID in the duration field X-Git-Tag: v2.6.31-rc1~14^2~390^2~39 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=7e0aae4732067e1bdb546071423a0b3483a79d9a;p=linux-block.git 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 Signed-off-by: John W. Linville --- 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);