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>
This commit is contained in:
committed by
John W. Linville
parent
9eb4e21e28
commit
9f1661718c
@@ -102,6 +102,15 @@
|
||||
#define GET_DURATION(__size, __rate) (((__size) * 8 * 10) / (__rate))
|
||||
#define GET_DURATION_RES(__size, __rate)(((__size) * 8 * 10) % (__rate))
|
||||
|
||||
/*
|
||||
* Determine the alignment requirement,
|
||||
* to make sure the 802.11 payload is padded to a 4-byte boundrary
|
||||
* we must determine the address of the payload and calculate the
|
||||
* amount of bytes needed to move the data.
|
||||
*/
|
||||
#define ALIGN_SIZE(__skb, __header) \
|
||||
( ((unsigned long)((__skb)->data + (__header))) & 3 )
|
||||
|
||||
/*
|
||||
* Standard timing and size defines.
|
||||
* These values should follow the ieee80211 specifications.
|
||||
@@ -590,6 +599,7 @@ enum rt2x00_flags {
|
||||
DRIVER_REQUIRE_SCHEDULED,
|
||||
DRIVER_REQUIRE_DMA,
|
||||
DRIVER_REQUIRE_COPY_IV,
|
||||
DRIVER_REQUIRE_L2PAD,
|
||||
|
||||
/*
|
||||
* Driver features
|
||||
|
Reference in New Issue
Block a user