aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-core.c
diff options
context:
space:
mode:
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 1c0670bc284d..6ca946051b82 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;