ath5k: rework beacon configuration
authorBob Copeland <me@bobcopeland.com>
Sat, 4 Jul 2009 16:59:52 +0000 (12:59 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 10 Jul 2009 19:02:29 +0000 (15:02 -0400)
commit21800491cc5c48e9f1084a6f524a0da7c2525cc6
tree5453e16a1c423f8541b819947d90760000f08a00
parentcec8db23011d2a0a5ec101a0263d79678adf21ba
ath5k: rework beacon configuration

Using the enable_beacon flag allows some simplifications and fixes
some corner cases in beacon handling.  This change adds a state
variable for beaconing in ath5k_beacon_config and handles both
enabling and disabling, thus eliminating the need for
ath5k_beacon_disable.  We also now configure the beacon when any
of the beacon parameters change, so ath5k_beacon_reconfig is no
longer needed (its mmiowb gets moved to ath5k_beacon_config).
Finally, by locking around the whole config function, we don't
need to worry about clearing the interrupt mask register before
installing the new mask.

The upshot is this correctly disables beaconing when the interfaces
are taken down, it fixes a potential restarting of beaconing
when ath5k_reset() is called, and ensures that updates to the
beacon interval take effect immediately.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath5k/base.h