|
@@ -1316,14 +1316,19 @@ void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
|
|
struct iwl_rxon_cmd *rxon = (void *)&priv->active_rxon;
|
|
struct iwl_rxon_cmd *rxon = (void *)&priv->active_rxon;
|
|
struct iwl_csa_notification *csa = &(pkt->u.csa_notif);
|
|
struct iwl_csa_notification *csa = &(pkt->u.csa_notif);
|
|
|
|
|
|
- if (!le32_to_cpu(csa->status)) {
|
|
|
|
- rxon->channel = csa->channel;
|
|
|
|
- priv->staging_rxon.channel = csa->channel;
|
|
|
|
- IWL_DEBUG_11H(priv, "CSA notif: channel %d\n",
|
|
|
|
- le16_to_cpu(csa->channel));
|
|
|
|
- } else
|
|
|
|
- IWL_ERR(priv, "CSA notif (fail) : channel %d\n",
|
|
|
|
- le16_to_cpu(csa->channel));
|
|
|
|
|
|
+ if (priv->switch_rxon.switch_in_progress) {
|
|
|
|
+ if (!le32_to_cpu(csa->status) &&
|
|
|
|
+ (csa->channel == priv->switch_rxon.channel)) {
|
|
|
|
+ rxon->channel = csa->channel;
|
|
|
|
+ priv->staging_rxon.channel = csa->channel;
|
|
|
|
+ IWL_DEBUG_11H(priv, "CSA notif: channel %d\n",
|
|
|
|
+ le16_to_cpu(csa->channel));
|
|
|
|
+ } else
|
|
|
|
+ IWL_ERR(priv, "CSA notif (fail) : channel %d\n",
|
|
|
|
+ le16_to_cpu(csa->channel));
|
|
|
|
+
|
|
|
|
+ priv->switch_rxon.switch_in_progress = false;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(iwl_rx_csa);
|
|
EXPORT_SYMBOL(iwl_rx_csa);
|
|
|
|
|
|
@@ -2690,14 +2695,6 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
|
|
goto set_ch_out;
|
|
goto set_ch_out;
|
|
}
|
|
}
|
|
|
|
|
|
- if (iwl_is_associated(priv) &&
|
|
|
|
- (le16_to_cpu(priv->active_rxon.channel) != ch) &&
|
|
|
|
- priv->cfg->ops->lib->set_channel_switch) {
|
|
|
|
- ret = priv->cfg->ops->lib->set_channel_switch(priv,
|
|
|
|
- ch);
|
|
|
|
- goto out;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
spin_lock_irqsave(&priv->lock, flags);
|
|
spin_lock_irqsave(&priv->lock, flags);
|
|
|
|
|
|
/* Configure HT40 channels */
|
|
/* Configure HT40 channels */
|
|
@@ -2732,6 +2729,22 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
|
|
|
|
|
|
iwl_set_flags_for_band(priv, conf->channel->band);
|
|
iwl_set_flags_for_band(priv, conf->channel->band);
|
|
spin_unlock_irqrestore(&priv->lock, flags);
|
|
spin_unlock_irqrestore(&priv->lock, flags);
|
|
|
|
+ if (iwl_is_associated(priv) &&
|
|
|
|
+ (le16_to_cpu(priv->active_rxon.channel) != ch) &&
|
|
|
|
+ priv->cfg->ops->lib->set_channel_switch) {
|
|
|
|
+ iwl_set_rate(priv);
|
|
|
|
+ /*
|
|
|
|
+ * at this point, staging_rxon has the
|
|
|
|
+ * configuration for channel switch
|
|
|
|
+ */
|
|
|
|
+ ret = priv->cfg->ops->lib->set_channel_switch(priv,
|
|
|
|
+ ch);
|
|
|
|
+ if (!ret) {
|
|
|
|
+ iwl_print_rx_config_cmd(priv);
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
|
|
+ priv->switch_rxon.switch_in_progress = false;
|
|
|
|
+ }
|
|
set_ch_out:
|
|
set_ch_out:
|
|
/* The list of supported rates and rate mask can be different
|
|
/* The list of supported rates and rate mask can be different
|
|
* for each band; since the band may have changed, reset
|
|
* for each band; since the band may have changed, reset
|