rt2x00: Reorganize L2 padding inserting function.
authorGertjan van Wingerde <gwingerde@gmail.com>
Fri, 4 Dec 2009 22:47:03 +0000 (23:47 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 21 Dec 2009 23:56:34 +0000 (18:56 -0500)
commit2e331462fcb3d897921d8a0af4fca1b08c1b7269
tree4560331e21591dba952bdbdb249a6cd72ff30de4
parent354e39dbb19f29ef28a9c2db9e55ff2a7435b35a
rt2x00: Reorganize L2 padding inserting function.

Simplify the rt2x00queue_insert_l2pad function by handling the alignment
operations one by one. Do not special case special circumstances.
Basically first perform header alignment, and then perform payload alignment
(if any payload does exist). This results in a properly aligned skb.

The end result is better readable code, with better results, as now L2 padding
is inserted only when a payload is actually present in the frame.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00queue.c