From: Jouni Malinen <jouni.malinen@atheros.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org
Subject: [PATCH v2 7/7] mac80211: Do not override AID in the duration field
Date: Tue, 19 May 2009 19:25:58 +0300 [thread overview]
Message-ID: <20090519162558.GA7702@jm.kir.nu> (raw)
In-Reply-To: <1242744770.4797.26.camel@johannes.local>
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>
---
net/mac80211/tx.c | 2 ++
1 file changed, 2 insertions(+)
v2: add unlikely() and change continue to break to avoid unnecessary
check for a fragment of PS-Poll frame
--- wireless-testing.orig/net/mac80211/tx.c 2009-05-14 21:03:49.000000000 +0300
+++ wireless-testing/net/mac80211/tx.c 2009-05-19 19:20:57.000000000 +0300
@@ -872,6 +872,8 @@ ieee80211_tx_h_calculate_duration(struct
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);
--
Jouni Malinen PGP id EFC895FA
prev parent reply other threads:[~2009-05-19 16:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-19 14:01 [PATCH 0/7] ath9k/mac80211: Power save fixes Jouni Malinen
2009-05-19 14:01 ` [PATCH 1/7] ath9k: Wake up for TX in mac80211 timeout=0 sleep mode Jouni Malinen
2009-05-19 14:01 ` [PATCH 2/7] ath9k: Do not try to calibrate radio when in " Jouni Malinen
2009-05-19 14:01 ` [PATCH 3/7] ath9k: Use TSFOOR interrupt to trigger TSF sync with next Beacon Jouni Malinen
2009-05-19 14:01 ` [PATCH 4/7] ath9k: Wake up for RX filter changes Jouni Malinen
2009-05-19 14:01 ` [PATCH 5/7] ath9k: Set PM field in frame control when in PS mode Jouni Malinen
2009-05-19 14:01 ` [PATCH 6/7] mac80211: PS processing for every Beacon with our AID in TIM Jouni Malinen
2009-05-19 14:51 ` Johannes Berg
2009-05-19 14:01 ` [PATCH 7/7] mac80211: Do not override AID in the duration field Jouni Malinen
2009-05-19 14:52 ` Johannes Berg
2009-05-19 16:25 ` Jouni Malinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090519162558.GA7702@jm.kir.nu \
--to=jouni.malinen@atheros.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).