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

Commit c63722cf authored by Alexander Bondar's avatar Alexander Bondar Committed by Emmanuel Grumbach
Browse files

iwlwifi: mvm: Change beacon filter enablement condition



Enable beacon filter only if at least one beacon from candidate
AP is received before or after association. Check this condition before
enabling BF upon secured association completion. Add BF enablement to
mac80211 event that indicates beacon is received after association.
Too early beacon filtering enablement can lead to disconnection due to
missing AP's beacon after association.

Signed-off-by: default avatarAlexander Bondar <alexander.bondar@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 1f00c721
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1237,6 +1237,7 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
		 */
		iwl_mvm_remove_time_event(mvm, mvmvif,
					  &mvmvif->time_event_data);
		WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, CMD_SYNC));
	} else if (changes & (BSS_CHANGED_PS | BSS_CHANGED_P2P_PS |
			      BSS_CHANGED_QOS)) {
		ret = iwl_mvm_power_update_mac(mvm, vif);
@@ -1611,7 +1612,9 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,
	} else if (old_state == IEEE80211_STA_ASSOC &&
		   new_state == IEEE80211_STA_AUTHORIZED) {
		/* enable beacon filtering */
		WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, CMD_SYNC));
		if (vif->bss_conf.dtim_period)
			WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif,
							     CMD_SYNC));
		ret = 0;
	} else if (old_state == IEEE80211_STA_AUTHORIZED &&
		   new_state == IEEE80211_STA_ASSOC) {