Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix RX sequence number check
@ 2008-07-10  8:11 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2008-07-10  8:11 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, Tomas Winkler, Jouni Malinen

According to 802.11-2007, we are doing the wrong thing in the
sequence number checks when receiving frames. This fixes it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/mac80211/rx.c |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

--- everything.orig/net/mac80211/rx.c	2008-07-10 10:05:57.000000000 +0200
+++ everything/net/mac80211/rx.c	2008-07-10 10:08:07.000000000 +0200
@@ -334,13 +334,18 @@ static void ieee80211_parse_qos(struct i
 		else
 			rx->flags &= ~IEEE80211_RX_AMSDU;
 	} else {
-		if (unlikely(ieee80211_is_mgmt(hdr->frame_control))) {
-			/* Separate TID for management frames */
-			tid = NUM_RX_DATA_QUEUES - 1;
-		} else {
-			/* no qos control present */
-			tid = 0; /* 802.1d - Best Effort */
-		}
+		/*
+		 * IEEE 802.11-2007, 7.1.3.4.1 ("Sequence Number field"):
+		 *
+		 *	Sequence numbers for management frames, QoS data
+		 *	frames with a broadcast/multicast address in the
+		 *	Address 1 field, and all non-QoS data frames sent
+		 *	by QoS STAs are assigned using an additional single
+		 *	modulo-4096 counter, [...]
+		 *
+		 * We also use that counter for non-QoS STAs.
+		 */
+		tid = NUM_RX_DATA_QUEUES - 1;
 	}
 
 	rx->queue = tid;



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-10  8:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-10  8:11 [PATCH] mac80211: fix RX sequence number check Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox