aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2013-02-14 07:25:24 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-03-06 10:47:01 -0500
commit1dcd15eed073d5c7b37b43eff645e6c1dae342d9 (patch)
treeb71cc32508dc789fe8a48133d57b689d5d37cb49 /drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
parentcc7ee2bab3d90b0a09651dcfa2d0c9ec1a115bc8 (diff)
iwlwifi: mvm: Update MAC context filter flags
1. For P2P Device filter in only probe requests. 2. For station mode filter in all group cast frames, and in addition beacons as long as we are not associated. 3. For AP/GO filter in all group cast and in addition probe requests. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
index 3a136c1d3a5d..a993f6c7dac0 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
@@ -651,6 +651,13 @@ static int iwl_mvm_mac_ctxt_cmd_station(struct iwl_mvm *mvm,
651 /* Fill the common data for all mac context types */ 651 /* Fill the common data for all mac context types */
652 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action); 652 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action);
653 653
654 /* Allow beacons to pass through as long as we are not associated,or we
655 * do not have dtim period information */
656 if (!vif->bss_conf.assoc || !vif->bss_conf.dtim_period)
657 cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_BEACON);
658 else
659 cmd.filter_flags &= ~cpu_to_le32(MAC_FILTER_IN_BEACON);
660
654 /* Fill the data specific for station mode */ 661 /* Fill the data specific for station mode */
655 iwl_mvm_mac_ctxt_cmd_fill_sta(mvm, vif, &cmd.sta); 662 iwl_mvm_mac_ctxt_cmd_fill_sta(mvm, vif, &cmd.sta);
656 663
@@ -714,7 +721,9 @@ static int iwl_mvm_mac_ctxt_cmd_p2p_device(struct iwl_mvm *mvm,
714 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action); 721 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action);
715 722
716 cmd.protection_flags |= cpu_to_le32(MAC_PROT_FLG_TGG_PROTECT); 723 cmd.protection_flags |= cpu_to_le32(MAC_PROT_FLG_TGG_PROTECT);
717 cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_PROMISC); 724
725 /* Override the filter flags to accept only probe requests */
726 cmd.filter_flags = cpu_to_le32(MAC_FILTER_IN_PROBE_REQUEST);
718 727
719 /* 728 /*
720 * This flag should be set to true when the P2P Device is 729 * This flag should be set to true when the P2P Device is
@@ -881,6 +890,9 @@ static int iwl_mvm_mac_ctxt_cmd_ap(struct iwl_mvm *mvm,
881 /* Fill the common data for all mac context types */ 890 /* Fill the common data for all mac context types */
882 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action); 891 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action);
883 892
893 /* Also enable probe requests to pass */
894 cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_PROBE_REQUEST);
895
884 /* Fill the data specific for ap mode */ 896 /* Fill the data specific for ap mode */
885 iwl_mvm_mac_ctxt_cmd_fill_ap(mvm, vif, &cmd.ap); 897 iwl_mvm_mac_ctxt_cmd_fill_ap(mvm, vif, &cmd.ap);
886 898