aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-05-26 13:47:53 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-06-04 07:16:02 -0400
commit86a91ec757338edbce51de5dabd7afb0366f485c (patch)
treeab1024bca1e878eab54a199ec968f08fdb04b649
parent497b49d2f690cdfaae5292e30ea5cd9bb469090c (diff)
iwlwifi: mvm: correctly configure MCAST in AP mode
The AP mode needs to use the MCAST fifo for the MCAST frames sent after the DTIM. This fifo needs to be configured with the same parameters as the VOICE FIFO. A separate SCD queue is mapped to this fifo - the cab_queue (cab stands for Content After Beacon). This queue isn't connected to any station, but rather to the MAC context. This queue should (and is already) be set as the MCAST queue - this is part of the of MAC context command. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/fw-api-mac.h8
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c6
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mvm.h1
3 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-mac.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-mac.h
index d68640ea41d4..98b1feb43d38 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api-mac.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-mac.h
@@ -71,7 +71,13 @@
71#define MAC_INDEX_MIN_DRIVER 0 71#define MAC_INDEX_MIN_DRIVER 0
72#define NUM_MAC_INDEX_DRIVER MAC_INDEX_AUX 72#define NUM_MAC_INDEX_DRIVER MAC_INDEX_AUX
73 73
74#define AC_NUM 4 /* Number of access categories */ 74enum iwl_ac {
75 AC_BK,
76 AC_BE,
77 AC_VI,
78 AC_VO,
79 AC_NUM,
80};
75 81
76/** 82/**
77 * enum iwl_mac_protection_flags - MAC context flags 83 * enum iwl_mac_protection_flags - MAC context flags
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
index b4e8e597d2b7..46c7c0507c25 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
@@ -365,7 +365,7 @@ int iwl_mvm_mac_ctxt_init(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
365 break; 365 break;
366 case NL80211_IFTYPE_AP: 366 case NL80211_IFTYPE_AP:
367 iwl_trans_ac_txq_enable(mvm->trans, vif->cab_queue, 367 iwl_trans_ac_txq_enable(mvm->trans, vif->cab_queue,
368 IWL_MVM_TX_FIFO_VO); 368 IWL_MVM_TX_FIFO_MCAST);
369 /* fall through */ 369 /* fall through */
370 default: 370 default:
371 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) 371 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++)
@@ -553,6 +553,10 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
553 cmd->ac[i].fifos_mask = BIT(iwl_mvm_ac_to_tx_fifo[i]); 553 cmd->ac[i].fifos_mask = BIT(iwl_mvm_ac_to_tx_fifo[i]);
554 } 554 }
555 555
556 /* in AP mode, the MCAST FIFO takes the EDCA params from VO */
557 if (vif->type == NL80211_IFTYPE_AP)
558 cmd->ac[AC_VO].fifos_mask |= BIT(IWL_MVM_TX_FIFO_MCAST);
559
556 if (vif->bss_conf.qos) 560 if (vif->bss_conf.qos)
557 cmd->qos_flags |= cpu_to_le32(MAC_QOS_FLG_UPDATE_EDCA); 561 cmd->qos_flags |= cpu_to_le32(MAC_QOS_FLG_UPDATE_EDCA);
558 562
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h
index 384259baf525..4e10aae71038 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -88,6 +88,7 @@ enum iwl_mvm_tx_fifo {
88 IWL_MVM_TX_FIFO_BE, 88 IWL_MVM_TX_FIFO_BE,
89 IWL_MVM_TX_FIFO_VI, 89 IWL_MVM_TX_FIFO_VI,
90 IWL_MVM_TX_FIFO_VO, 90 IWL_MVM_TX_FIFO_VO,
91 IWL_MVM_TX_FIFO_MCAST = 5,
91}; 92};
92 93
93extern struct ieee80211_ops iwl_mvm_hw_ops; 94extern struct ieee80211_ops iwl_mvm_hw_ops;