rtlwifi: Fix endian error in extracting packet type
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sat, 2 Nov 2013 19:28:35 +0000 (14:28 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Nov 2013 19:42:43 +0000 (14:42 -0500)
commit0c5d63f0ab6728f05ddefa25aff55e31297f95e6
tree6c602bfa8217bed9fe7dd80919615b546ff92fbf
parent4be6718c669bce10e9f709e2be68db2c5e22c4f0
rtlwifi: Fix endian error in extracting packet type

All of the rtlwifi drivers have an error in the routine that tests if
the data is "special". If it is, the subsequant transmission will be
at the lowest rate to enhance reliability. The 16-bit quantity is
big-endian, but was being extracted in native CPU mode. One of the
effects of this bug is to inhibit association under some conditions
as the TX rate is too high.

Based on suggestions by Joe Perches, the entire routine is rewritten.

One of the local headers contained duplicates of some of the ETH_P_XXX
definitions. These are deleted.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Stable <stable@vger.kernel.org> [2.6.38+]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/base.c
drivers/net/wireless/rtlwifi/wifi.h