linux/drivers/net/wireless/rt2x00
Stanislaw Gruszka cfd9167af1 rt2x00: do not align payload on modern H/W
RT2800 and newer hardware require padding between header and payload if
header length is not multiple of 4.

For historical reasons we also align payload to to 4 bytes boundary, but
such alignment is not needed on modern H/W.

Patch fixes skb_under_panic problems reported from time to time:

https://bugzilla.kernel.org/show_bug.cgi?id=84911
https://bugzilla.kernel.org/show_bug.cgi?id=72471
http://marc.info/?l=linux-wireless&m=139108549530402&w=2
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1087591

Panic happened because we eat 4 bytes of skb headroom on each
(re)transmission when sending frame without the payload and the header
length not being multiple of 4 (i.e. QoS header has 26 bytes). On such
case because paylad_aling=2 is bigger than header_align=0 we increase
header_align by 4 bytes. To prevent that we could change the check to:

	if (payload_length && payload_align > header_align)
		header_align += 4;

but not aligning payload at all is more effective and alignment is not
really needed by H/W (that has been tested on OpenWrt project for few
years now).

Reported-and-tested-by: Antti S. Lankila <alankila@bel.fi>
Debugged-by: Antti S. Lankila <alankila@bel.fi>
Reported-by: Henrik Asp <solenskiner@gmail.com>
Originally-From: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-11 16:12:44 -05:00
..
Kconfig
Makefile
rt2x00.h rt2x00: fix rfkill regression on rt2500pci 2014-06-17 14:11:16 -04:00
rt2x00config.c rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00crypto.c rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00debug.c net: Replace min macro with min_t 2014-03-03 15:35:54 -05:00
rt2x00debug.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00dev.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2014-07-10 17:00:24 -04:00
rt2x00dump.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00firmware.c rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00leds.c rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00leds.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00lib.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00link.c rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00mac.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2014-07-10 17:00:24 -04:00
rt2x00mmio.c rt2x00: Use dma_zalloc_coherent 2014-06-19 15:49:21 -04:00
rt2x00mmio.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00pci.c rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00pci.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00queue.c rt2x00: do not align payload on modern H/W 2014-11-11 16:12:44 -05:00
rt2x00queue.h rt2x00: change beaconing setup on RT2800 2014-06-19 15:49:15 -04:00
rt2x00reg.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00soc.c rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00soc.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2x00usb.c rt2x00: Endless loop on hub port power down 2014-05-22 14:04:36 -04:00
rt2x00usb.h rt2800usb:fix efuse detection 2014-06-17 14:11:15 -04:00
rt61pci.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
rt61pci.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt73usb.c rt2x00: restore original beaconing state 2014-04-22 15:06:31 -04:00
rt73usb.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2400pci.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
rt2400pci.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2500pci.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
rt2500pci.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2500usb.c rt2500: disable PS by default 2014-02-04 15:30:07 -05:00
rt2500usb.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2800.h rt2800: correct BBP1_TX_POWER_CTRL mask 2014-09-26 17:06:53 -04:00
rt2800lib.c rt2x00: support Ralink 5362. 2014-08-28 14:49:39 -04:00
rt2800lib.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2800mmio.c rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2800mmio.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2800pci.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
rt2800pci.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2800soc.c rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00
rt2800usb.c wireless: rt2x00: add new rt2800usb device 2014-10-30 15:00:22 -04:00
rt2800usb.h rt2x00: Fix FSF address in file headers 2013-12-11 10:56:19 -05:00