aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-01-27 00:25:54 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-30 13:38:22 -0500
commit1f7d6cbfa2a993ea0d714e8552c784eea75a046b (patch)
treeba10a929c43af87885c7b2cc401cc130dbd40e75 /drivers/net/wireless/ath9k
parent3c4572657656117c1f9cf1df42e681ea71abb2db (diff)
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')
-rw-r--r--drivers/net/wireless/ath9k/main.c35
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,
2253 } 2253 }
2254 } 2254 }
2255 2255
2256 if ((conf->changed & IEEE80211_IFCC_BEACON) && 2256 if ((vif->type == NL80211_IFTYPE_ADHOC) ||
2257 ((vif->type == NL80211_IFTYPE_ADHOC) || 2257 (vif->type == NL80211_IFTYPE_AP)) {
2258 (vif->type == NL80211_IFTYPE_AP))) { 2258 if ((conf->changed & IEEE80211_IFCC_BEACON) ||
2259 /* 2259 (conf->changed & IEEE80211_IFCC_BEACON_ENABLED &&
2260 * Allocate and setup the beacon frame. 2260 conf->enable_beacon)) {
2261 * 2261 /*
2262 * Stop any previous beacon DMA. This may be 2262 * Allocate and setup the beacon frame.
2263 * necessary, for example, when an ibss merge 2263 *
2264 * causes reconfiguration; we may be called 2264 * Stop any previous beacon DMA. This may be
2265 * with beacon transmission active. 2265 * necessary, for example, when an ibss merge
2266 */ 2266 * causes reconfiguration; we may be called
2267 ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); 2267 * with beacon transmission active.
2268 */
2269 ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq);
2268 2270
2269 error = ath_beacon_alloc(sc, 0); 2271 error = ath_beacon_alloc(sc, 0);
2270 if (error != 0) 2272 if (error != 0)
2271 return error; 2273 return error;
2272 2274
2273 ath_beacon_sync(sc, 0); 2275 ath_beacon_sync(sc, 0);
2276 }
2274 } 2277 }
2275 2278
2276 /* Check for WLAN_CAPABILITY_PRIVACY ? */ 2279 /* Check for WLAN_CAPABILITY_PRIVACY ? */