mwl8k: prevent corruption of QoS field on receive
Packets exchanged between the mwl8k driver and the firmware always
have a 4-address header without QoS field. For QoS packets, the QoS
field is passed to/from the firmware via the tx/rx descriptors.
We were handling this correctly on transmit, but not on receive -- if
a QoS packet was received, we would leave garbage in the QoS field in
the packet passed up to the stack, which is Bad(tm).
Also, if the packet received on the air was a 4-address without QoS
packet, we would forget to skb_pull the 2-byte DMA length prefix off.
This patch adds an argument to the ->rxd_process() receive descriptor
operation to retrieve the QoS field from the receive descriptor, and
extends mwl8k_remove_dma_header() to insert this field back into the
packet if the packet received is a QoS packet. It also fixes
mwl8k_remove_dma_header() to strip off the length prefix in all cases.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>