]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ath9k: Reconfigure beacons on getting a notification from mac80211
authorSujith <Sujith.Manoharan@atheros.com>
Tue, 27 Jan 2009 05:25:54 +0000 (10:55 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 30 Jan 2009 18:38:22 +0000 (13:38 -0500)
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath9k/main.c

index 04a6051037191ea5c4b9300da001086cb3f3a71e..e9b0684ea70ecaaebc36a7d8b3516529f3c86ee6 100644 (file)
@@ -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 ? */