2009-01-20 08:01:47

by Sujith

[permalink] [raw]
Subject: [PATCH] ath9k: Reconfigure beacons only when enable_beacon is set

Signed-off-by: Sujith <[email protected]>
---
drivers/net/wireless/ath9k/main.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 8ad927a..0f931c2 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -2194,13 +2194,16 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
* causes reconfiguration; we may be called
* with beacon transmission active.
*/
- ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq);

- error = ath_beacon_alloc(sc, 0);
- if (error != 0)
- return error;
+ if (conf->enable_beacon) {
+ ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq);
+
+ error = ath_beacon_alloc(sc, 0);
+ if (error != 0)
+ return error;

- ath_beacon_sync(sc, 0);
+ ath_beacon_sync(sc, 0);
+ }
}

/* Check for WLAN_CAPABILITY_PRIVACY ? */
--
1.6.1