aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-core.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2008-06-30 05:23:08 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-30 17:37:39 -0400
commit37deb2a0baf1bb540b723cc8a3972b42ff2daac6 (patch)
treebd5b29719cdf1fd39e3ff805a43252b8111c804e /drivers/net/wireless/iwlwifi/iwl-core.c
parent8f91aecb4cdc2d786df8941e827b9dff3c10a4e4 (diff)
iwlwifi: don't send REPLY_REMOVE_ALL_STA upon exit
This patch avoids sending REPLY_REMOVE_ALL_STA in down flow, this avoids a meaningless warning from being printed On the way this patch also renames the the function to iwl_clear_stations_table Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 1c0670bc284..6ca946051b8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -273,26 +273,27 @@ int iwl_hw_nic_init(struct iwl_priv *priv)
273EXPORT_SYMBOL(iwl_hw_nic_init); 273EXPORT_SYMBOL(iwl_hw_nic_init);
274 274
275/** 275/**
276 * iwlcore_clear_stations_table - Clear the driver's station table 276 * iwl_clear_stations_table - Clear the driver's station table
277 * 277 *
278 * NOTE: This does not clear or otherwise alter the device's station table. 278 * NOTE: This does not clear or otherwise alter the device's station table.
279 */ 279 */
280void iwlcore_clear_stations_table(struct iwl_priv *priv) 280void iwl_clear_stations_table(struct iwl_priv *priv)
281{ 281{
282 unsigned long flags; 282 unsigned long flags;
283 283
284 spin_lock_irqsave(&priv->sta_lock, flags); 284 spin_lock_irqsave(&priv->sta_lock, flags);
285 285
286 priv->num_stations = 0;
287 if (iwl_is_alive(priv) && 286 if (iwl_is_alive(priv) &&
288 iwl_send_cmd_pdu_async(priv, REPLY_REMOVE_ALL_STA, 0, NULL, NULL)) 287 !test_bit(STATUS_EXIT_PENDING, &priv->status) &&
288 iwl_send_cmd_pdu_async(priv, REPLY_REMOVE_ALL_STA, 0, NULL, NULL))
289 IWL_ERROR("Couldn't clear the station table\n"); 289 IWL_ERROR("Couldn't clear the station table\n");
290 290
291 priv->num_stations = 0;
291 memset(priv->stations, 0, sizeof(priv->stations)); 292 memset(priv->stations, 0, sizeof(priv->stations));
292 293
293 spin_unlock_irqrestore(&priv->sta_lock, flags); 294 spin_unlock_irqrestore(&priv->sta_lock, flags);
294} 295}
295EXPORT_SYMBOL(iwlcore_clear_stations_table); 296EXPORT_SYMBOL(iwl_clear_stations_table);
296 297
297void iwl_reset_qos(struct iwl_priv *priv) 298void iwl_reset_qos(struct iwl_priv *priv)
298{ 299{
@@ -864,7 +865,7 @@ int iwl_init_drv(struct iwl_priv *priv)
864 mutex_init(&priv->mutex); 865 mutex_init(&priv->mutex);
865 866
866 /* Clear the driver's (not device's) station table */ 867 /* Clear the driver's (not device's) station table */
867 iwlcore_clear_stations_table(priv); 868 iwl_clear_stations_table(priv);
868 869
869 priv->data_retry_limit = -1; 870 priv->data_retry_limit = -1;
870 priv->ieee_channels = NULL; 871 priv->ieee_channels = NULL;