aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-6000.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2009-11-06 17:52:54 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-11 15:23:44 -0500
commit0924e519a3a18ffbfaa043f4a2c369140c5a235c (patch)
tree85bab606d81ae1959fec12d246ba19f1097eeacc /drivers/net/wireless/iwlwifi/iwl-6000.c
parent681988653ed46a14032ac5fe2ee84eaae314b72e (diff)
iwlwifi: fix for channel switch
Different channel has different configuration, need to pass correct configuration to uCode when send "channel switch" command to uCode. Invalid configuration will cause sysassert in uCode and produce un-expected result. Even it is a very small windows, but we also need to consider and handle the case if commit_rxon occurred before the "channel switch announcement" notification received from uCode. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-6000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 9ab79546b8a4..1f769ea23636 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -186,8 +186,8 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
186 186
187 cmd.band = priv->band == IEEE80211_BAND_2GHZ; 187 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
188 cmd.channel = cpu_to_le16(channel); 188 cmd.channel = cpu_to_le16(channel);
189 cmd.rxon_flags = priv->active_rxon.flags; 189 cmd.rxon_flags = priv->staging_rxon.flags;
190 cmd.rxon_filter_flags = priv->active_rxon.filter_flags; 190 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
191 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time); 191 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
192 ch_info = iwl_get_channel_info(priv, priv->band, channel); 192 ch_info = iwl_get_channel_info(priv, priv->band, channel);
193 if (ch_info) 193 if (ch_info)
@@ -197,6 +197,8 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
197 priv->active_rxon.channel, channel); 197 priv->active_rxon.channel, channel);
198 return -EFAULT; 198 return -EFAULT;
199 } 199 }
200 priv->switch_rxon.channel = cpu_to_le16(channel);
201 priv->switch_rxon.switch_in_progress = true;
200 202
201 return iwl_send_cmd_sync(priv, &hcmd); 203 return iwl_send_cmd_sync(priv, &hcmd);
202} 204}