]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit25c514ac962f0e69b57114812ed6d09dbfa35fa8
tree4560331e21591dba952bdbdb249a6cd72ff30de4
parenta08520b59b9ccdc480029f26697eb4c985dceddb
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