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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 18:56:08 +0000 (10:56 -0800)
commitdea4a8294ab66e105ed689e9ea3f2b2c0e0d4101
treeec581d67f22873f4f4e317f5748865d7b0d8b096
parentaaa3a8c7685d7ce2b779e89f25109e27e0c7c2a7
rtlwifi: Fix endian error in extracting packet type

commit 0c5d63f0ab6728f05ddefa25aff55e31297f95e6 upstream.

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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/rtlwifi/base.c
drivers/net/wireless/rtlwifi/wifi.h