From patchwork Mon Aug 10 14:02:40 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 40416 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7AE43D8027037 for ; Mon, 10 Aug 2009 14:04:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754871AbZHJODc (ORCPT ); Mon, 10 Aug 2009 10:03:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754867AbZHJODc (ORCPT ); Mon, 10 Aug 2009 10:03:32 -0400 Received: from xc.sipsolutions.net ([83.246.72.84]:51073 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754857AbZHJODc (ORCPT ); Mon, 10 Aug 2009 10:03:32 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MaVTI-0006Fa-KR; Mon, 10 Aug 2009 16:03:32 +0200 Subject: [PATCH] mac80211: sequence number micro-optimisation From: Johannes Berg To: John Linville Cc: linux-wireless Date: Mon, 10 Aug 2009 16:02:40 +0200 Message-Id: <1249912960.32614.5.camel@johannes.local> Mime-Version: 1.0 X-Mailer: Evolution 2.27.5 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- net/mac80211/tx.c | 1 - 1 file changed, 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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; }