aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2009-04-26 10:08:50 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-06 15:14:49 -0400
commit9f1661718c7fcf82e25c6aed20b729ee372d9d65 (patch)
tree099a3305c948f306f46e2cf2f0d24a8ef069f011 /drivers/net/wireless/rt2x00/rt2x00.h
parent9eb4e21e289beba9cfe34f24920eee83c144e62f (diff)
rt2x00: Add support for L2 padding during TX/RX
Some hardware require L2 padding between header and payload because both must be aligned to a 4-byte boundary. This hardware also is easier during the RX path since we no longer need to move the entire payload but rather only the header to remove the padding (mac80211 only wants the payload to be 4-byte aligned). Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 0be395528261..7c5cbb192a6c 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -103,6 +103,15 @@
103#define GET_DURATION_RES(__size, __rate)(((__size) * 8 * 10) % (__rate)) 103#define GET_DURATION_RES(__size, __rate)(((__size) * 8 * 10) % (__rate))
104 104
105/* 105/*
106 * Determine the alignment requirement,
107 * to make sure the 802.11 payload is padded to a 4-byte boundrary
108 * we must determine the address of the payload and calculate the
109 * amount of bytes needed to move the data.
110 */
111#define ALIGN_SIZE(__skb, __header) \
112 ( ((unsigned long)((__skb)->data + (__header))) & 3 )
113
114/*
106 * Standard timing and size defines. 115 * Standard timing and size defines.
107 * These values should follow the ieee80211 specifications. 116 * These values should follow the ieee80211 specifications.
108 */ 117 */
@@ -590,6 +599,7 @@ enum rt2x00_flags {
590 DRIVER_REQUIRE_SCHEDULED, 599 DRIVER_REQUIRE_SCHEDULED,
591 DRIVER_REQUIRE_DMA, 600 DRIVER_REQUIRE_DMA,
592 DRIVER_REQUIRE_COPY_IV, 601 DRIVER_REQUIRE_COPY_IV,
602 DRIVER_REQUIRE_L2PAD,
593 603
594 /* 604 /*
595 * Driver features 605 * Driver features