diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2009-11-06 17:52:54 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-11 15:23:44 -0500 |
commit | 0924e519a3a18ffbfaa043f4a2c369140c5a235c (patch) | |
tree | 85bab606d81ae1959fec12d246ba19f1097eeacc /drivers/net/wireless/iwlwifi/iwl-agn.c | |
parent | 681988653ed46a14032ac5fe2ee84eaae314b72e (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-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 1710815691d5..7bdedf61dd36 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -122,6 +122,17 @@ int iwl_commit_rxon(struct iwl_priv *priv) | |||
122 | return -EINVAL; | 122 | return -EINVAL; |
123 | } | 123 | } |
124 | 124 | ||
125 | /* | ||
126 | * receive commit_rxon request | ||
127 | * abort any previous channel switch if still in process | ||
128 | */ | ||
129 | if (priv->switch_rxon.switch_in_progress && | ||
130 | (priv->switch_rxon.channel != priv->staging_rxon.channel)) { | ||
131 | IWL_DEBUG_11H(priv, "abort channel switch on %d\n", | ||
132 | le16_to_cpu(priv->switch_rxon.channel)); | ||
133 | priv->switch_rxon.switch_in_progress = false; | ||
134 | } | ||
135 | |||
125 | /* If we don't need to send a full RXON, we can use | 136 | /* If we don't need to send a full RXON, we can use |
126 | * iwl_rxon_assoc_cmd which is used to reconfigure filter | 137 | * iwl_rxon_assoc_cmd which is used to reconfigure filter |
127 | * and other flags for the current radio configuration. */ | 138 | * and other flags for the current radio configuration. */ |