This is a note to let you know that I've just added the patch titled

    rt2x00: Properly request tx headroom for alignment operations.

to the 2.6.32-longterm tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.32.git;a=summary

The filename of the patch is:
     rt2x00-properly-request-tx-headroom-for-alignment-op.patch
and it can be found in the queue-2.6.32 subdirectory.

If you, or anyone else, feels it should not be added to the 2.6.32 longterm 
tree,
please let <[email protected]> know about it.


>From 48459fe42e9f935cba5575a07b881954a4b664d0 Mon Sep 17 00:00:00 2001
From: Gertjan van Wingerde <[email protected]>
Date: Wed, 30 Dec 2009 11:36:30 +0100
Subject: rt2x00: Properly request tx headroom for alignment operations.

From: Gertjan van Wingerde <[email protected]>

commit 7a4a77b7771164d61ce702a588067d1e1d66db7c upstream.

Current rt2x00 drivers may result in a "ieee80211_tx_status: headroom too
small" error message when a frame needs to be properly aligned before
transmitting it.
This is because the space needed to ensure proper alignment isn't
requested from mac80211.
Fix this by adding sufficient amount of alignment space to the amount
of headroom requested for TX frames.

Reported-by: David Ellingsworth <[email protected]>
Signed-off-by: Gertjan van Wingerde <[email protected]>
Acked-by: Ivo van Doorn <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/net/wireless/rt2x00/rt2x00.h    |    6 ++++++
 drivers/net/wireless/rt2x00/rt2x00dev.c |   12 +++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -112,6 +112,12 @@
        (  ((unsigned long)((__skb)->data + (__header))) & 3 )
 
 /*
+ * Constants for extra TX headroom for alignment purposes.
+ */
+#define RT2X00_ALIGN_SIZE      4 /* Only whole frame needs alignment */
+#define RT2X00_L2PAD_SIZE      8 /* Both header & payload need alignment */
+
+/*
  * Standard timing and size defines.
  * These values should follow the ieee80211 specifications.
  */
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -686,7 +686,17 @@ static int rt2x00lib_probe_hw(struct rt2
        /*
         * Initialize extra TX headroom required.
         */
-       rt2x00dev->hw->extra_tx_headroom = rt2x00dev->ops->extra_tx_headroom;
+       rt2x00dev->hw->extra_tx_headroom =
+               max_t(unsigned int, IEEE80211_TX_STATUS_HEADROOM,
+                     rt2x00dev->ops->extra_tx_headroom);
+
+       /*
+        * Take TX headroom required for alignment into account.
+        */
+       if (test_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags))
+               rt2x00dev->hw->extra_tx_headroom += RT2X00_L2PAD_SIZE;
+       else if (test_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags))
+               rt2x00dev->hw->extra_tx_headroom += RT2X00_ALIGN_SIZE;
 
        /*
         * Register HW.


Patches currently in longterm-queue-2.6.32 which might be from 
[email protected] are

/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/rt2x00-use-correct-headroom-for-transmission.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/mac80211-add-define-for-tx-headroom-reserved-by-mac8.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/rt2x00-properly-request-tx-headroom-for-alignment-op.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/rt2x00-centralize-setting-of-extra-tx-headroom-reque.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to