aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rxon.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c59
1 files changed, 31 insertions, 28 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index 9db3924ea1d6..203ee60a82b4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -72,6 +72,34 @@ static int iwlagn_disable_pan(struct iwl_priv *priv,
72 return ret; 72 return ret;
73} 73}
74 74
75static void iwlagn_update_qos(struct iwl_priv *priv,
76 struct iwl_rxon_context *ctx)
77{
78 int ret;
79
80 if (!ctx->is_active)
81 return;
82
83 ctx->qos_data.def_qos_parm.qos_flags = 0;
84
85 if (ctx->qos_data.qos_active)
86 ctx->qos_data.def_qos_parm.qos_flags |=
87 QOS_PARAM_FLG_UPDATE_EDCA_MSK;
88
89 if (ctx->ht.enabled)
90 ctx->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK;
91
92 IWL_DEBUG_QOS(priv, "send QoS cmd with Qos active=%d FLAGS=0x%X\n",
93 ctx->qos_data.qos_active,
94 ctx->qos_data.def_qos_parm.qos_flags);
95
96 ret = iwl_send_cmd_pdu(priv, ctx->qos_cmd,
97 sizeof(struct iwl_qosparam_cmd),
98 &ctx->qos_data.def_qos_parm);
99 if (ret)
100 IWL_ERR(priv, "Failed to update QoS\n");
101}
102
75static int iwlagn_update_beacon(struct iwl_priv *priv, 103static int iwlagn_update_beacon(struct iwl_priv *priv,
76 struct ieee80211_vif *vif) 104 struct ieee80211_vif *vif)
77{ 105{
@@ -208,6 +236,9 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
208 } 236 }
209 237
210 if (new_assoc) { 238 if (new_assoc) {
239 /* QoS info may be cleared by previous un-assoc RXON */
240 iwlagn_update_qos(priv, ctx);
241
211 /* 242 /*
212 * We'll run into this code path when beaconing is 243 * We'll run into this code path when beaconing is
213 * enabled, but then we also need to send the beacon 244 * enabled, but then we also need to send the beacon
@@ -266,34 +297,6 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
266 return 0; 297 return 0;
267} 298}
268 299
269static void iwlagn_update_qos(struct iwl_priv *priv,
270 struct iwl_rxon_context *ctx)
271{
272 int ret;
273
274 if (!ctx->is_active)
275 return;
276
277 ctx->qos_data.def_qos_parm.qos_flags = 0;
278
279 if (ctx->qos_data.qos_active)
280 ctx->qos_data.def_qos_parm.qos_flags |=
281 QOS_PARAM_FLG_UPDATE_EDCA_MSK;
282
283 if (ctx->ht.enabled)
284 ctx->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK;
285
286 IWL_DEBUG_QOS(priv, "send QoS cmd with Qos active=%d FLAGS=0x%X\n",
287 ctx->qos_data.qos_active,
288 ctx->qos_data.def_qos_parm.qos_flags);
289
290 ret = iwl_send_cmd_pdu(priv, ctx->qos_cmd,
291 sizeof(struct iwl_qosparam_cmd),
292 &ctx->qos_data.def_qos_parm);
293 if (ret)
294 IWL_ERR(priv, "Failed to update QoS\n");
295}
296
297int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) 300int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
298{ 301{
299 struct iwl_priv *priv = hw->priv; 302 struct iwl_priv *priv = hw->priv;