diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-01-11 20:53:07 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-01-16 12:53:32 -0500 |
commit | d101f6496d51cbeb285f531dff059ce0ef28ffe3 (patch) | |
tree | e3aea45a519a7606cf4b717ddfe815cd6644248a /drivers/net/wireless/rt2x00/rt2x00pci.c | |
parent | a38db5b6219d88e2b48f07472c436b19b864f93c (diff) | |
download | talos-op-linux-d101f6496d51cbeb285f531dff059ce0ef28ffe3.tar.gz talos-op-linux-d101f6496d51cbeb285f531dff059ce0ef28ffe3.zip |
rt2x00: Fix ieee80211 payload alignment
As Johannes Berg indicated, the NET_IP_ALIGN doesn't
need to be used for ieee80211 frames. This means we
can simplify the alignment calculation to just
use the result of the header size modulus 4 as frame
alignment.
Furthermore we shouldn't use NET_IP_ALIGN in rt2x00usb
because it could be 0 on some architectures and we absolutely
need to have 2 bytes reserved for possible aligning.
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/rt2x00pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 6d5d9aba0b73..04663eb31950 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c @@ -149,7 +149,7 @@ void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev) * The data behind the ieee80211 header must be * aligned on a 4 byte boundary. */ - align = NET_IP_ALIGN + (2 * (header_size % 4 == 0)); + align = header_size % 4; /* * Allocate the sk_buffer, initialize it and copy |