mwl8k: fix addr4 zeroing and payload overwrite on DMA header creation
authorLennert Buytenhek <buytenh@wantstofly.org>
Mon, 30 Nov 2009 17:12:20 +0000 (18:12 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Dec 2009 21:51:20 +0000 (16:51 -0500)
commitca00930153c14b323c31b97623ac5c4f7855ed6a
treea1004a5d46a70e90c1ea08aba17190619e2fa176
parent20f09c3df7a8a623c290f62596c1a6b0da088030
mwl8k: fix addr4 zeroing and payload overwrite on DMA header creation

When inserting a DMA header into a packet for transmission,
mwl8k_add_dma_header() would blindly zero the addr4 field, which
is not a good idea if the packet being transmitted is actually a
4-address packet.

Also, if the transmitted packet was a 4-address with QoS packet,
the memmove() to do the needed header reshuffling would inadvertently
overwrite the first two bytes of the packet payload with the QoS field.

This fixes both of these issues.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwl8k.c