diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-01-27 10:55:54 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-30 13:38:22 -0500 |
commit | 1f7d6cbfa2a993ea0d714e8552c784eea75a046b (patch) | |
tree | ba10a929c43af87885c7b2cc401cc130dbd40e75 /drivers/net/wireless/ath9k/main.c | |
parent | 3c4572657656117c1f9cf1df42e681ea71abb2db (diff) | |
download | lwn-1f7d6cbfa2a993ea0d714e8552c784eea75a046b.tar.gz lwn-1f7d6cbfa2a993ea0d714e8552c784eea75a046b.zip |
ath9k: Reconfigure beacons on getting a notification from mac80211
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 04a605103719..e9b0684ea70e 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c @@ -2253,24 +2253,27 @@ static int ath9k_config_interface(struct ieee80211_hw *hw, } } - if ((conf->changed & IEEE80211_IFCC_BEACON) && - ((vif->type == NL80211_IFTYPE_ADHOC) || - (vif->type == NL80211_IFTYPE_AP))) { - /* - * Allocate and setup the beacon frame. - * - * Stop any previous beacon DMA. This may be - * necessary, for example, when an ibss merge - * causes reconfiguration; we may be called - * with beacon transmission active. - */ - ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); + if ((vif->type == NL80211_IFTYPE_ADHOC) || + (vif->type == NL80211_IFTYPE_AP)) { + if ((conf->changed & IEEE80211_IFCC_BEACON) || + (conf->changed & IEEE80211_IFCC_BEACON_ENABLED && + conf->enable_beacon)) { + /* + * Allocate and setup the beacon frame. + * + * Stop any previous beacon DMA. This may be + * necessary, for example, when an ibss merge + * 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; + 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 ? */ |