linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com
Subject: [PATCH 08/13] rt2x00: Remove obsolete rt2x00queue_align_payload
Date: Mon, 28 Mar 2011 13:33:04 +0200	[thread overview]
Message-ID: <201103281333.05671.IvDoorn@gmail.com> (raw)
In-Reply-To: <201103281332.34565.IvDoorn@gmail.com>

From: Helmut Schaa <helmut.schaa@googlemail.com>

Since commit d1c3a37ceeb1a5ea02991a0476355f1a1d3b3e83 ("mac80211:
clarify alignment docs, fix up alignment") removed the requirement
for a 4-byte aligned payload rt2x00queue_align_payload is obsolete
as mac80211 will align the payload when it passes the frame to the
net stack.

As a result we can remove the call to rt2x00queue_align_payload in the
rx path and since that's the last user we can remove
rt2x00queue_align_payload altogether.

One advantage is that we save some alignment operations for frames
that don't need to be aligned (for example beause they are not passed
to the net stack).

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2x00dev.c   |    2 --
 drivers/net/wireless/rt2x00/rt2x00lib.h   |   10 ----------
 drivers/net/wireless/rt2x00/rt2x00queue.c |   13 -------------
 3 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index d63b582..55c1d03 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -512,8 +512,6 @@ void rt2x00lib_rxdone(struct queue_entry *entry)
 		 (rxdesc.size > header_length) &&
 		 (rxdesc.dev_flags & RXDONE_L2PAD))
 		rt2x00queue_remove_l2pad(entry->skb, header_length);
-	else
-		rt2x00queue_align_payload(entry->skb, header_length);
 
 	/* Trim buffer to correct size */
 	skb_trim(entry->skb, rxdesc.size);
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h
index 2d94cba..63c40d4 100644
--- a/drivers/net/wireless/rt2x00/rt2x00lib.h
+++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
@@ -119,16 +119,6 @@ void rt2x00queue_free_skb(struct queue_entry *entry);
 void rt2x00queue_align_frame(struct sk_buff *skb);
 
 /**
- * rt2x00queue_align_payload - Align 802.11 payload to 4-byte boundary
- * @skb: The skb to align
- * @header_length: Length of 802.11 header
- *
- * Align the 802.11 payload to a 4-byte boundary, this could
- * mean the header is not aligned properly though.
- */
-void rt2x00queue_align_payload(struct sk_buff *skb, unsigned int header_length);
-
-/**
  * rt2x00queue_insert_l2pad - Align 802.11 header & payload to 4-byte boundary
  * @skb: The skb to align
  * @header_length: Length of 802.11 header
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 4b3c70e..5d89259 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -148,19 +148,6 @@ void rt2x00queue_align_frame(struct sk_buff *skb)
 	skb_trim(skb, frame_length);
 }
 
-void rt2x00queue_align_payload(struct sk_buff *skb, unsigned int header_length)
-{
-	unsigned int frame_length = skb->len;
-	unsigned int align = ALIGN_SIZE(skb, header_length);
-
-	if (!align)
-		return;
-
-	skb_push(skb, align);
-	memmove(skb->data, skb->data + align, frame_length);
-	skb_trim(skb, frame_length);
-}
-
 void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length)
 {
 	unsigned int payload_length = skb->len - header_length;
-- 
1.7.2.3


  reply	other threads:[~2011-03-28 11:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28 11:29 [PATCH 01/13] rt2x00: Limit rt2x00pci rxdone processing to 16 entries at once Ivo van Doorn
2011-03-28 11:30 ` [PATCH 02/13] rt2x00: Limit rt2800pci txdone " Ivo van Doorn
2011-03-28 11:30   ` [PATCH 03/13] rt2x00: Calculate tx status fifo size instead of hardcoding it Ivo van Doorn
2011-03-28 11:30     ` [PATCH 04/13] rt2x00: Remove DRIVER_SUPPORT_WATCHDOG flag Ivo van Doorn
2011-03-28 11:31       ` [PATCH 05/13] rt2x00: Restructure bw_comp calculationATCHDOG flag Ivo van Doorn
2011-03-28 11:32         ` [PATCH 06/13] rt2x00: Don't recalculate HT40 compensation for each rate Ivo van Doorn
2011-03-28 11:32           ` [PATCH 07/13] rt2x00: Indention cleanup in rt2800lib Ivo van Doorn
2011-03-28 11:33             ` Ivo van Doorn [this message]
2011-03-28 11:33               ` [PATCH 09/13] rt2x00: Implement tx power temperature compensation Ivo van Doorn
2011-03-28 11:34                 ` [PATCH 10/13] rt2x00: Fix STBC transmissions to STAs with Rx STBC > 1 Ivo van Doorn
2011-03-28 11:34                   ` [PATCH 11/13] rt2x00: Add support for the ZyXEL NWD-211AN USB Ivo van Doorn
2011-03-28 11:35                     ` [PATCH 12/13] rt2x00: Fix tx aggregation problems with some clients Ivo van Doorn
2011-03-28 11:35                       ` [PATCH 13/13] rt2x00: Add an error message when trying to send on a full queue Ivo van Doorn
2011-03-29  0:37         ` [PATCH 05/13] rt2x00: Restructure bw_comp calculationATCHDOG flag Julian Calaby
2011-04-02 17:14         ` [PATCH 05/13 v2] rt2x00: Restructure bw_comp calculation Ivo van Doorn

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=201103281333.05671.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=users@rt2x00.serialmonkey.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).