ath9k: set beacon related ps flags on bss_info change
authorRajkumar Manoharan <rmanoharan@atheros.com>
Fri, 22 Apr 2011 09:20:39 +0000 (14:50 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 26 Apr 2011 19:50:28 +0000 (15:50 -0400)
Requesting beacon sync up to configure beacon timers properly
in hw, has be done after doing beacon config with default values.
Setting the flags in beacon config is causing the device to not
enter into network sleep on idle state.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/beacon.c
drivers/net/wireless/ath/ath9k/main.c

index 24f565ba9988a4a0726aec7dbf0f2434479172b0..22cd241a098b31bdfe7dff1950bebf499df6773b 100644 (file)
@@ -781,12 +781,6 @@ void ath_set_beacon(struct ath_softc *sc)
                break;
        case NL80211_IFTYPE_STATION:
                ath_beacon_config_sta(sc, cur_conf);
-               /*
-                * Request a re-configuration of Beacon related timers
-                * on the receipt of the first Beacon frame (i.e.,
-                * after time sync with the AP).
-                */
-               sc->ps_flags |= PS_BEACON_SYNC | PS_WAIT_FOR_BEACON;
                break;
        default:
                ath_dbg(common, ATH_DBG_CONFIG,
index 475009b578de382b78740bf33300efc2c49b49f4..c3dbf2661a3ff826815ac41962020ba6b260898a 100644 (file)
@@ -1969,6 +1969,12 @@ static void ath9k_bss_iter(void *data, u8 *mac, struct ieee80211_vif *vif)
                                "Bss Info ASSOC %d, bssid: %pM\n",
                                bss_conf->aid, common->curbssid);
                        ath_beacon_config(sc, vif);
+                       /*
+                        * Request a re-configuration of Beacon related timers
+                        * on the receipt of the first Beacon frame (i.e.,
+                        * after time sync with the AP).
+                        */
+                       sc->ps_flags |= PS_BEACON_SYNC | PS_WAIT_FOR_BEACON;
                        /* Reset rssi stats */
                        sc->last_rssi = ATH_RSSI_DUMMY_MARKER;
                        sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER;