linux/drivers/net/wireless/ath/ath5k
Benoit Papillault 8127fbdc41 ath5k: Fix TX/RX padding for all frames
Currently, the padding position is based on
ieee80211_get_hdrlen_from_skb(). This is not correct since the HW does
padding on RX (and expect the same padding to be present on TX) at the
following position :

- management : 24 + 6 if 4-addr format
- control    : 24 + 6 if 4-addr format
- data       : 24 + 6 if 4-addr format + 2 if QoS
- invalid    : 24 + 6 if 4-addr format

whereas ieee80211_get_hdrlen_from_skb() is :

- management : 24
- control    : 16 except for ACK/CTS where it is 10
- data       : 24 + 6 if 4-addr format + 2 if QoS + 2 if QoS & order
- invalid    : 24

So, correct frames are not affected : management frames do not use
4-addr format, control frames have no body and invalid frames are ...
not valid by definition. However, in order to use monitor interface for
debugging purpose, one must be able to send/receive any frames, be it
correct or not. Such frames are affected by incorrect padding.

Moreover, since padding is added on TX, we need to remove it before
calling ieee80211_tx_status. This affect TX packets received by monitor
interfaces.

It has been tested between an ath5k based card (AR5212) and an ar9170usb
based card (netgear WNDA3100) using a frame generator and a monitor
interface for each card.

v2: Added ath5k_add_padding / ath5k_remove_padding

Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-10 17:44:06 -05:00
..
Kconfig wireless: remove WLAN_80211 and WLAN_PRE80211 from Kconfig 2009-10-30 16:50:35 -04:00
Makefile ath5k: minor rfkill cleanup 2009-06-10 13:28:39 -04:00
ath5k.h ath5k: Fix TX/RX padding for all frames 2010-03-10 17:44:06 -05:00
attach.c ath5k: use noise calibration from madwifi hal 2009-10-27 16:48:18 -04:00
base.c ath5k: Fix TX/RX padding for all frames 2010-03-10 17:44:06 -05:00
base.h Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2010-02-14 17:45:59 -08:00
caps.c
debug.c ath5k: remove permissions from debugfs files 2009-07-10 15:02:26 -04:00
debug.h
desc.c ath5k: Fix TX/RX padding for all frames 2010-03-10 17:44:06 -05:00
desc.h
dma.c
eeprom.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2010-01-19 11:43:42 -08:00
eeprom.h ath5k: Fix eeprom checksum check for custom sized eeproms 2010-01-04 16:11:59 -05:00
gpio.c
initvals.c atheros: define shared bssidmask setting 2009-10-07 16:39:28 -04:00
led.c ath5k: adding LED support for AR5BXB63 cards 2010-01-27 15:01:24 -05:00
pcu.c ath5k: remove stale function declarations, make some functions static 2010-03-09 15:02:54 -05:00
phy.c ath5k: move ath5k_hw_register_timeout() into reset.c 2010-03-09 15:02:55 -05:00
qcu.c ath5k: remove stale function declarations, make some functions static 2010-03-09 15:02:54 -05:00
reg.h ath5k: use noise calibration from madwifi hal 2009-10-27 16:48:18 -04:00
reset.c ath5k: move ath5k_hw_register_timeout() into reset.c 2010-03-09 15:02:55 -05:00
rfbuffer.h
rfgain.h
rfkill.c ath5k: minor rfkill cleanup 2009-06-10 13:28:39 -04:00