Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92c6f76c authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by John W. Linville
Browse files

ath9k: set beacon related ps flags on bss_info change



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: default avatarRajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3782c69d
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -781,12 +781,6 @@ void ath_set_beacon(struct ath_softc *sc)
		break;
		break;
	case NL80211_IFTYPE_STATION:
	case NL80211_IFTYPE_STATION:
		ath_beacon_config_sta(sc, cur_conf);
		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;
		break;
	default:
	default:
		ath_dbg(common, ATH_DBG_CONFIG,
		ath_dbg(common, ATH_DBG_CONFIG,
+6 −0
Original line number Original line Diff line number Diff line
@@ -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 Info ASSOC %d, bssid: %pM\n",
				bss_conf->aid, common->curbssid);
				bss_conf->aid, common->curbssid);
			ath_beacon_config(sc, vif);
			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 */
			/* Reset rssi stats */
			sc->last_rssi = ATH_RSSI_DUMMY_MARKER;
			sc->last_rssi = ATH_RSSI_DUMMY_MARKER;
			sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER;
			sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER;