linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: sequence number micro-optimisation
@ 2009-08-10 14:02 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2009-08-10 14:02 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

There's no need to mask the variable with 0xFFF0
since we ever only use it as a u16 and the lowest
four bits can't ever be non-zero. The compiler
cannot infer the latter, and therefore has to emit
code to do the masking.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/mac80211/tx.c |    1 -
 1 file changed, 1 deletion(-)

--- wireless-testing.orig/net/mac80211/tx.c	2009-08-10 13:34:45.000000000 +0200
+++ wireless-testing/net/mac80211/tx.c	2009-08-10 13:34:58.000000000 +0200
@@ -700,7 +700,6 @@ ieee80211_tx_h_sequence(struct ieee80211
 		/* for pure STA mode without beacons, we can do it */
 		hdr->seq_ctrl = cpu_to_le16(tx->sdata->sequence_number);
 		tx->sdata->sequence_number += 0x10;
-		tx->sdata->sequence_number &= IEEE80211_SCTL_SEQ;
 		return TX_CONTINUE;
 	}
 



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

only message in thread, other threads:[~2009-08-10 14:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-10 14:02 [PATCH] mac80211: sequence number micro-optimisation Johannes Berg

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).