diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-11-10 09:55:12 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-11 12:32:54 -0500 |
commit | df912e5119759dad2d2f4b989a5fe83fbdfdeec0 (patch) | |
tree | 3c4a8ca41416f714f849803524f13268499ad215 | |
parent | 7335613ae27ae148fde720caccbfbbd9afa7465d (diff) |
iwlagn: use per-vif AC parameters
Eliad added the ability to configure AC parameters
per virtual interface; make use of this in iwlwifi
and set the parameters in the right context. Since
storage and uploading to the device is already per
context, this is sufficient.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 001fdf140abb..989f9f3fdaf8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1125,10 +1125,14 @@ int iwlagn_mac_conf_tx(struct ieee80211_hw *hw, | |||
1125 | const struct ieee80211_tx_queue_params *params) | 1125 | const struct ieee80211_tx_queue_params *params) |
1126 | { | 1126 | { |
1127 | struct iwl_priv *priv = hw->priv; | 1127 | struct iwl_priv *priv = hw->priv; |
1128 | struct iwl_rxon_context *ctx; | 1128 | struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; |
1129 | struct iwl_rxon_context *ctx = vif_priv->ctx; | ||
1129 | unsigned long flags; | 1130 | unsigned long flags; |
1130 | int q; | 1131 | int q; |
1131 | 1132 | ||
1133 | if (WARN_ON(!ctx)) | ||
1134 | return -EINVAL; | ||
1135 | |||
1132 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 1136 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
1133 | 1137 | ||
1134 | if (!iwl_is_ready_rf(priv->shrd)) { | 1138 | if (!iwl_is_ready_rf(priv->shrd)) { |
@@ -1145,21 +1149,15 @@ int iwlagn_mac_conf_tx(struct ieee80211_hw *hw, | |||
1145 | 1149 | ||
1146 | spin_lock_irqsave(&priv->shrd->lock, flags); | 1150 | spin_lock_irqsave(&priv->shrd->lock, flags); |
1147 | 1151 | ||
1148 | /* | 1152 | ctx->qos_data.def_qos_parm.ac[q].cw_min = |
1149 | * MULTI-FIXME | 1153 | cpu_to_le16(params->cw_min); |
1150 | * This may need to be done per interface in nl80211/cfg80211/mac80211. | 1154 | ctx->qos_data.def_qos_parm.ac[q].cw_max = |
1151 | */ | 1155 | cpu_to_le16(params->cw_max); |
1152 | for_each_context(priv, ctx) { | 1156 | ctx->qos_data.def_qos_parm.ac[q].aifsn = params->aifs; |
1153 | ctx->qos_data.def_qos_parm.ac[q].cw_min = | 1157 | ctx->qos_data.def_qos_parm.ac[q].edca_txop = |
1154 | cpu_to_le16(params->cw_min); | 1158 | cpu_to_le16((params->txop * 32)); |
1155 | ctx->qos_data.def_qos_parm.ac[q].cw_max = | 1159 | |
1156 | cpu_to_le16(params->cw_max); | 1160 | ctx->qos_data.def_qos_parm.ac[q].reserved1 = 0; |
1157 | ctx->qos_data.def_qos_parm.ac[q].aifsn = params->aifs; | ||
1158 | ctx->qos_data.def_qos_parm.ac[q].edca_txop = | ||
1159 | cpu_to_le16((params->txop * 32)); | ||
1160 | |||
1161 | ctx->qos_data.def_qos_parm.ac[q].reserved1 = 0; | ||
1162 | } | ||
1163 | 1161 | ||
1164 | spin_unlock_irqrestore(&priv->shrd->lock, flags); | 1162 | spin_unlock_irqrestore(&priv->shrd->lock, flags); |
1165 | 1163 | ||