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.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index a95ad84c5377..09f679d6046f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -325,6 +325,14 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
325 return 0; 325 return 0;
326 } 326 }
327 327
328 /*
329 * force CTS-to-self frames protection if RTS-CTS is not preferred
330 * one aggregation protection method
331 */
332 if (!(priv->cfg->ht_params &&
333 priv->cfg->ht_params->use_rts_for_aggregation))
334 ctx->staging.flags |= RXON_FLG_SELF_CTS_EN;
335
328 if ((ctx->vif && ctx->vif->bss_conf.use_short_slot) || 336 if ((ctx->vif && ctx->vif->bss_conf.use_short_slot) ||
329 !(ctx->staging.flags & RXON_FLG_BAND_24G_MSK)) 337 !(ctx->staging.flags & RXON_FLG_BAND_24G_MSK))
330 ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK; 338 ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK;
@@ -342,10 +350,10 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
342 * receive commit_rxon request 350 * receive commit_rxon request
343 * abort any previous channel switch if still in process 351 * abort any previous channel switch if still in process
344 */ 352 */
345 if (priv->switch_rxon.switch_in_progress && 353 if (test_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status) &&
346 (priv->switch_rxon.channel != ctx->staging.channel)) { 354 (priv->switch_channel != ctx->staging.channel)) {
347 IWL_DEBUG_11H(priv, "abort channel switch on %d\n", 355 IWL_DEBUG_11H(priv, "abort channel switch on %d\n",
348 le16_to_cpu(priv->switch_rxon.channel)); 356 le16_to_cpu(priv->switch_channel));
349 iwl_chswitch_done(priv, false); 357 iwl_chswitch_done(priv, false);
350 } 358 }
351 359
@@ -362,6 +370,11 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
362 } 370 }
363 371
364 memcpy(active, &ctx->staging, sizeof(*active)); 372 memcpy(active, &ctx->staging, sizeof(*active));
373 /*
374 * We do not commit tx power settings while channel changing,
375 * do it now if after settings changed.
376 */
377 iwl_set_tx_power(priv, priv->tx_power_next, false);
365 return 0; 378 return 0;
366 } 379 }
367 380