linux/drivers/net/wireless/rt2x00
Helmut Schaa 69cf36a452 rt2x00: Refactor beacon code to make use of start- and stop_queue
This patch allows to dynamically remove beaconing interfaces without
shutting beaconing down on all interfaces.

The only place to start and stop beaconing are now the start- and
stop_queue callbacks. Hence, we can remove some register writes during
interface bring up (config_intf) and only write the correct sync mode
to the register there.

When multiple beaconing interfaces are present we should enable
beaconing as soon as mac80211 enables beaconing on at least one of
them. The beacon queue gets stopped when the last beaconing
interface was stopped by mac80211. Therefore, introduce another
interface counter to keep track ot the number of enabled beaconing
interfaces and start or stop the beacon queue accordingly.

To allow single interfaces to stop beaconing, add a new driver
callback clear_beacon to clear a single interface's beacon without
affecting the other interfaces. Don't overload the clear_entry callback
for clearing beacons as that would introduce additional overhead
(check for each TX queue) into the clear_entry callback which is used
on the drivers TX/RX hotpaths.

Furthermore, the write beacon callback doesn't need to enable beaconing
anymore but since beaconing should be disabled while a new beacon is
written or cleared we still disable beacon generation and enable it
afterwards again in the driver specific callbacks. However, beacon
related interrupts should not be disabled/enabled here, that's solely
done from the start- and stop queue callbacks. It would be nice to stop
the beacon queue just before the beacon update and enable it afterwards
in rt2x00queue itself instead of the current implementation that relies
on the driver doing the right thing. However, since start- and
stop_queue are mutex protected we cannot use them for atomic beacon
updates.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-31 15:06:22 -05:00
..
Kconfig Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2010-11-24 16:49:20 -05:00
Makefile
rt2x00.h rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt2x00config.c rt2x00: Fix pointer errors. 2011-01-04 14:35:14 -05:00
rt2x00crypto.c mac80211: use cipher suite selectors 2010-08-16 16:45:11 -04:00
rt2x00debug.c rt2x00: Protect queue control with mutex 2010-12-13 15:23:35 -05:00
rt2x00debug.h
rt2x00dev.c rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt2x00dump.h rt2x00: correct sparse warning in rt2x00debug.c 2010-07-20 16:49:41 -04:00
rt2x00firmware.c rt2x00: Don't leak mem in error path of rt2x00lib_request_firmware() 2011-01-13 15:46:45 -05:00
rt2x00ht.c rt2x00: Remove superfluous assignment of mpdu_density 2011-01-04 14:35:14 -05:00
rt2x00leds.c
rt2x00leds.h
rt2x00lib.h rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt2x00link.c rt2x00: checkpatch.pl error fixes for rt2x00link.c 2010-11-15 13:26:28 -05:00
rt2x00mac.c rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt2x00pci.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2011-01-14 09:29:05 -08:00
rt2x00pci.h rt2x00: Fix firmware loading regression on x86_64. 2010-12-13 15:23:37 -05:00
rt2x00queue.c rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt2x00queue.h rt2x00: Fix WMM Queue naming 2010-12-13 15:23:36 -05:00
rt2x00reg.h rt2x00: Reorganize queue callback functions 2010-12-13 15:23:35 -05:00
rt2x00soc.c rt2x00: Use ioremap for SoC devices instead of KSEG1ADDR. 2010-11-17 16:18:54 -05:00
rt2x00soc.h
rt2x00usb.c rt2x00: Fix WMM Queue naming 2010-12-13 15:23:36 -05:00
rt2x00usb.h rt2x00: Add "flush" queue command 2010-12-13 15:23:35 -05:00
rt61pci.c rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt61pci.h rt2x00: Fix WMM Queue naming 2010-12-13 15:23:36 -05:00
rt73usb.c rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt73usb.h rt2x00: Fix WMM Queue naming 2010-12-13 15:23:36 -05:00
rt2400pci.c rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt2400pci.h rt2x00: checkpatch.pl error fixes for rt2400pci.h 2010-11-15 13:26:13 -05:00
rt2500pci.c rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt2500pci.h rt2x00: checkpatch.pl error fixes for rt2500pci.h 2010-11-15 13:26:15 -05:00
rt2500usb.c rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt2500usb.h
rt2800.h rt2x00: Fix and fine-tune rf registers for RT3070/RT3071/RT3090 2011-01-19 11:36:07 -05:00
rt2800lib.c rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt2800lib.h rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt2800pci.c rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt2800pci.h rt2x00: checkpatch.pl error fixes for rt2800pci.h 2010-11-15 13:26:20 -05:00
rt2800usb.c rt2x00: Refactor beacon code to make use of start- and stop_queue 2011-01-31 15:06:22 -05:00
rt2800usb.h rt2x00: checkpatch.pl error fixes for rt2800usb.h 2010-11-15 13:26:23 -05:00