|
@@ -893,9 +893,9 @@ int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch)
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(iwl_set_rxon_channel);
|
|
EXPORT_SYMBOL(iwl_set_rxon_channel);
|
|
|
|
|
|
-static void iwl_set_flags_for_band(struct iwl_priv *priv,
|
|
|
|
- enum ieee80211_band band,
|
|
|
|
- struct ieee80211_vif *vif)
|
|
|
|
|
|
+void iwl_set_flags_for_band(struct iwl_priv *priv,
|
|
|
|
+ enum ieee80211_band band,
|
|
|
|
+ struct ieee80211_vif *vif)
|
|
{
|
|
{
|
|
if (band == IEEE80211_BAND_5GHZ) {
|
|
if (band == IEEE80211_BAND_5GHZ) {
|
|
priv->staging_rxon.flags &=
|
|
priv->staging_rxon.flags &=
|
|
@@ -914,6 +914,7 @@ static void iwl_set_flags_for_band(struct iwl_priv *priv,
|
|
priv->staging_rxon.flags &= ~RXON_FLG_CCK_MSK;
|
|
priv->staging_rxon.flags &= ~RXON_FLG_CCK_MSK;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+EXPORT_SYMBOL(iwl_set_flags_for_band);
|
|
|
|
|
|
/*
|
|
/*
|
|
* initialize rxon structure with default values from eeprom
|
|
* initialize rxon structure with default values from eeprom
|
|
@@ -989,7 +990,7 @@ void iwl_connection_init_rx_config(struct iwl_priv *priv,
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(iwl_connection_init_rx_config);
|
|
EXPORT_SYMBOL(iwl_connection_init_rx_config);
|
|
|
|
|
|
-static void iwl_set_rate(struct iwl_priv *priv)
|
|
|
|
|
|
+void iwl_set_rate(struct iwl_priv *priv)
|
|
{
|
|
{
|
|
const struct ieee80211_supported_band *hw = NULL;
|
|
const struct ieee80211_supported_band *hw = NULL;
|
|
struct ieee80211_rate *rate;
|
|
struct ieee80211_rate *rate;
|
|
@@ -1017,6 +1018,21 @@ static void iwl_set_rate(struct iwl_priv *priv)
|
|
priv->staging_rxon.ofdm_basic_rates =
|
|
priv->staging_rxon.ofdm_basic_rates =
|
|
(IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF;
|
|
(IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF;
|
|
}
|
|
}
|
|
|
|
+EXPORT_SYMBOL(iwl_set_rate);
|
|
|
|
+
|
|
|
|
+void iwl_chswitch_done(struct iwl_priv *priv, bool is_success)
|
|
|
|
+{
|
|
|
|
+ if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ if (priv->switch_rxon.switch_in_progress) {
|
|
|
|
+ ieee80211_chswitch_done(priv->vif, is_success);
|
|
|
|
+ mutex_lock(&priv->mutex);
|
|
|
|
+ priv->switch_rxon.switch_in_progress = false;
|
|
|
|
+ mutex_unlock(&priv->mutex);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+EXPORT_SYMBOL(iwl_chswitch_done);
|
|
|
|
|
|
void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
|
|
void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
|
|
{
|
|
{
|
|
@@ -1031,11 +1047,12 @@ void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
|
|
priv->staging_rxon.channel = csa->channel;
|
|
priv->staging_rxon.channel = csa->channel;
|
|
IWL_DEBUG_11H(priv, "CSA notif: channel %d\n",
|
|
IWL_DEBUG_11H(priv, "CSA notif: channel %d\n",
|
|
le16_to_cpu(csa->channel));
|
|
le16_to_cpu(csa->channel));
|
|
- } else
|
|
|
|
|
|
+ iwl_chswitch_done(priv, true);
|
|
|
|
+ } else {
|
|
IWL_ERR(priv, "CSA notif (fail) : channel %d\n",
|
|
IWL_ERR(priv, "CSA notif (fail) : channel %d\n",
|
|
le16_to_cpu(csa->channel));
|
|
le16_to_cpu(csa->channel));
|
|
-
|
|
|
|
- priv->switch_rxon.switch_in_progress = false;
|
|
|
|
|
|
+ iwl_chswitch_done(priv, false);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(iwl_rx_csa);
|
|
EXPORT_SYMBOL(iwl_rx_csa);
|
|
@@ -2044,22 +2061,7 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
|
|
|
|
|
|
iwl_set_flags_for_band(priv, conf->channel->band, priv->vif);
|
|
iwl_set_flags_for_band(priv, conf->channel->band, priv->vif);
|
|
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
|