Skip to content

Commit

Permalink
iwlwifi: mvm: enable MAC_FILTER_IN_BEACON when forced_assoc_off is set
Browse files Browse the repository at this point in the history
Set the MAC_FILTER_IN_BEACON flag in iwl_mvm_mac_ctxt_cmd_sata() also
when forced_assoc_off is set, so it's aligned with when we are not
associated.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
  • Loading branch information
Luciano Coelho authored and Emmanuel Grumbach committed May 19, 2014
1 parent 5c90422 commit cad3f08
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,14 +713,6 @@ static int iwl_mvm_mac_ctxt_cmd_sta(struct iwl_mvm *mvm,
IEEE80211_P2P_OPPPS_CTWINDOW_MASK);
ctxt_sta = &cmd.p2p_sta.sta;
} else {
/* Allow beacons to pass through as long as we are not
* associated, or we do not have dtim period information.
*/
if (!vif->bss_conf.assoc || !vif->bss_conf.dtim_period)
cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_BEACON);
else
cmd.filter_flags &= ~cpu_to_le32(MAC_FILTER_IN_BEACON);

ctxt_sta = &cmd.sta;
}

Expand All @@ -729,6 +721,12 @@ static int iwl_mvm_mac_ctxt_cmd_sta(struct iwl_mvm *mvm,
!force_assoc_off) {
u32 dtim_offs;

/* Allow beacons to pass through as long as we are not
* associated, or we do not have dtim period information.
*/
if (!vif->p2p)
cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_BEACON);

/*
* The DTIM count counts down, so when it is N that means N
* more beacon intervals happen until the DTIM TBTT. Therefore
Expand Down

0 comments on commit cad3f08

Please sign in to comment.