|
@@ -269,6 +269,34 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void iwlagn_update_qos(struct iwl_priv *priv,
|
|
|
|
+ struct iwl_rxon_context *ctx)
|
|
|
|
+{
|
|
|
|
+ int ret;
|
|
|
|
+
|
|
|
|
+ if (!ctx->is_active)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ ctx->qos_data.def_qos_parm.qos_flags = 0;
|
|
|
|
+
|
|
|
|
+ if (ctx->qos_data.qos_active)
|
|
|
|
+ ctx->qos_data.def_qos_parm.qos_flags |=
|
|
|
|
+ QOS_PARAM_FLG_UPDATE_EDCA_MSK;
|
|
|
|
+
|
|
|
|
+ if (ctx->ht.enabled)
|
|
|
|
+ ctx->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK;
|
|
|
|
+
|
|
|
|
+ IWL_DEBUG_QOS(priv, "send QoS cmd with Qos active=%d FLAGS=0x%X\n",
|
|
|
|
+ ctx->qos_data.qos_active,
|
|
|
|
+ ctx->qos_data.def_qos_parm.qos_flags);
|
|
|
|
+
|
|
|
|
+ ret = iwl_send_cmd_pdu(priv, ctx->qos_cmd,
|
|
|
|
+ sizeof(struct iwl_qosparam_cmd),
|
|
|
|
+ &ctx->qos_data.def_qos_parm);
|
|
|
|
+ if (ret)
|
|
|
|
+ IWL_ERR(priv, "Failed to update QoS\n");
|
|
|
|
+}
|
|
|
|
+
|
|
int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
|
|
int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
|
|
{
|
|
{
|
|
struct iwl_priv *priv = hw->priv;
|
|
struct iwl_priv *priv = hw->priv;
|
|
@@ -277,6 +305,7 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
|
|
struct ieee80211_channel *channel = conf->channel;
|
|
struct ieee80211_channel *channel = conf->channel;
|
|
const struct iwl_channel_info *ch_info;
|
|
const struct iwl_channel_info *ch_info;
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
+ bool ht_changed[NUM_IWL_RXON_CTX] = {};
|
|
|
|
|
|
IWL_DEBUG_MAC80211(priv, "changed %#x", changed);
|
|
IWL_DEBUG_MAC80211(priv, "changed %#x", changed);
|
|
|
|
|
|
@@ -324,7 +353,11 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
|
|
|
|
|
|
for_each_context(priv, ctx) {
|
|
for_each_context(priv, ctx) {
|
|
/* Configure HT40 channels */
|
|
/* Configure HT40 channels */
|
|
- ctx->ht.enabled = conf_is_ht(conf);
|
|
|
|
|
|
+ if (ctx->ht.enabled != conf_is_ht(conf)) {
|
|
|
|
+ ctx->ht.enabled = conf_is_ht(conf);
|
|
|
|
+ ht_changed[ctx->ctxid] = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (ctx->ht.enabled) {
|
|
if (ctx->ht.enabled) {
|
|
if (conf_is_ht40_minus(conf)) {
|
|
if (conf_is_ht40_minus(conf)) {
|
|
ctx->ht.extension_chan_offset =
|
|
ctx->ht.extension_chan_offset =
|
|
@@ -392,40 +425,14 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
|
|
if (!memcmp(&ctx->staging, &ctx->active, sizeof(ctx->staging)))
|
|
if (!memcmp(&ctx->staging, &ctx->active, sizeof(ctx->staging)))
|
|
continue;
|
|
continue;
|
|
iwlagn_commit_rxon(priv, ctx);
|
|
iwlagn_commit_rxon(priv, ctx);
|
|
|
|
+ if (ht_changed[ctx->ctxid])
|
|
|
|
+ iwlagn_update_qos(priv, ctx);
|
|
}
|
|
}
|
|
out:
|
|
out:
|
|
mutex_unlock(&priv->mutex);
|
|
mutex_unlock(&priv->mutex);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
-static void iwlagn_update_qos(struct iwl_priv *priv,
|
|
|
|
- struct iwl_rxon_context *ctx)
|
|
|
|
-{
|
|
|
|
- int ret;
|
|
|
|
-
|
|
|
|
- if (!ctx->is_active)
|
|
|
|
- return;
|
|
|
|
-
|
|
|
|
- ctx->qos_data.def_qos_parm.qos_flags = 0;
|
|
|
|
-
|
|
|
|
- if (ctx->qos_data.qos_active)
|
|
|
|
- ctx->qos_data.def_qos_parm.qos_flags |=
|
|
|
|
- QOS_PARAM_FLG_UPDATE_EDCA_MSK;
|
|
|
|
-
|
|
|
|
- if (ctx->ht.enabled)
|
|
|
|
- ctx->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK;
|
|
|
|
-
|
|
|
|
- IWL_DEBUG_QOS(priv, "send QoS cmd with Qos active=%d FLAGS=0x%X\n",
|
|
|
|
- ctx->qos_data.qos_active,
|
|
|
|
- ctx->qos_data.def_qos_parm.qos_flags);
|
|
|
|
-
|
|
|
|
- ret = iwl_send_cmd_pdu(priv, ctx->qos_cmd,
|
|
|
|
- sizeof(struct iwl_qosparam_cmd),
|
|
|
|
- &ctx->qos_data.def_qos_parm);
|
|
|
|
- if (ret)
|
|
|
|
- IWL_ERR(priv, "Failed to update QoS\n");
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static void iwlagn_check_needed_chains(struct iwl_priv *priv,
|
|
static void iwlagn_check_needed_chains(struct iwl_priv *priv,
|
|
struct iwl_rxon_context *ctx,
|
|
struct iwl_rxon_context *ctx,
|
|
struct ieee80211_bss_conf *bss_conf)
|
|
struct ieee80211_bss_conf *bss_conf)
|