On Sun, May 18, 2014 at 11:21:40AM +0300, Emmanuel Grumbach wrote: > From: Alexander Bondar <alexander.bondar@xxxxxxxxx> > > commit c63722cfd441bd3a99c65fa4c40bc65d7776e772 upstream > > 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: Alexander Bondar <alexander.bondar@xxxxxxxxx> > Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx> > --- > drivers/net/wireless/iwlwifi/mvm/mac80211.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c > index 9a856e5..b56d5f2 100644 > --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c > +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c > @@ -971,6 +971,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_mode(mvm, vif); > @@ -1304,7 +1305,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)); > + 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) { This breaks the build on 3.14, so despite sending out the email that said I applied it, I had to revert it. Please test-build your patches before sending them... thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html