diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2008-06-30 05:23:08 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-30 17:37:39 -0400 |
commit | 37deb2a0baf1bb540b723cc8a3972b42ff2daac6 (patch) | |
tree | bd5b29719cdf1fd39e3ff805a43252b8111c804e /drivers/net/wireless/iwlwifi | |
parent | 8f91aecb4cdc2d786df8941e827b9dff3c10a4e4 (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')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 12 |
4 files changed, 15 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 5abfd56e9bb4..104b6f7c81ed 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -675,7 +675,7 @@ static void iwl5000_init_alive_start(struct iwl_priv *priv) | |||
675 | goto restart; | 675 | goto restart; |
676 | } | 676 | } |
677 | 677 | ||
678 | iwlcore_clear_stations_table(priv); | 678 | iwl_clear_stations_table(priv); |
679 | ret = priv->cfg->ops->lib->alive_notify(priv); | 679 | ret = priv->cfg->ops->lib->alive_notify(priv); |
680 | if (ret) { | 680 | if (ret) { |
681 | IWL_WARNING("Could not complete ALIVE transition: %d\n", ret); | 681 | IWL_WARNING("Could not complete ALIVE transition: %d\n", ret); |
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) | |||
273 | EXPORT_SYMBOL(iwl_hw_nic_init); | 273 | EXPORT_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 | */ |
280 | void iwlcore_clear_stations_table(struct iwl_priv *priv) | 280 | void 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 | } |
295 | EXPORT_SYMBOL(iwlcore_clear_stations_table); | 296 | EXPORT_SYMBOL(iwl_clear_stations_table); |
296 | 297 | ||
297 | void iwl_reset_qos(struct iwl_priv *priv) | 298 | void 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; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 375afe15b54b..0cff64d878e6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -181,7 +181,7 @@ struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg, | |||
181 | struct ieee80211_ops *hw_ops); | 181 | struct ieee80211_ops *hw_ops); |
182 | void iwl_hw_detect(struct iwl_priv *priv); | 182 | void iwl_hw_detect(struct iwl_priv *priv); |
183 | 183 | ||
184 | void iwlcore_clear_stations_table(struct iwl_priv *priv); | 184 | void iwl_clear_stations_table(struct iwl_priv *priv); |
185 | void iwl_free_calib_results(struct iwl_priv *priv); | 185 | void iwl_free_calib_results(struct iwl_priv *priv); |
186 | void iwl_reset_qos(struct iwl_priv *priv); | 186 | void iwl_reset_qos(struct iwl_priv *priv); |
187 | void iwl_set_rxon_chain(struct iwl_priv *priv); | 187 | void iwl_set_rxon_chain(struct iwl_priv *priv); |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 13d53f3009d8..a607b39223e7 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -320,7 +320,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv) | |||
320 | memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); | 320 | memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); |
321 | } | 321 | } |
322 | 322 | ||
323 | iwlcore_clear_stations_table(priv); | 323 | iwl_clear_stations_table(priv); |
324 | 324 | ||
325 | if (!priv->error_recovering) | 325 | if (!priv->error_recovering) |
326 | priv->start_calib = 0; | 326 | priv->start_calib = 0; |
@@ -841,7 +841,7 @@ static int iwl4965_set_mode(struct iwl_priv *priv, int mode) | |||
841 | iwl4965_connection_init_rx_config(priv); | 841 | iwl4965_connection_init_rx_config(priv); |
842 | memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); | 842 | memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); |
843 | 843 | ||
844 | iwlcore_clear_stations_table(priv); | 844 | iwl_clear_stations_table(priv); |
845 | 845 | ||
846 | /* dont commit rxon if rf-kill is on*/ | 846 | /* dont commit rxon if rf-kill is on*/ |
847 | if (!iwl_is_ready_rf(priv)) | 847 | if (!iwl_is_ready_rf(priv)) |
@@ -2150,7 +2150,7 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2150 | goto restart; | 2150 | goto restart; |
2151 | } | 2151 | } |
2152 | 2152 | ||
2153 | iwlcore_clear_stations_table(priv); | 2153 | iwl_clear_stations_table(priv); |
2154 | ret = priv->cfg->ops->lib->alive_notify(priv); | 2154 | ret = priv->cfg->ops->lib->alive_notify(priv); |
2155 | if (ret) { | 2155 | if (ret) { |
2156 | IWL_WARNING("Could not complete ALIVE transition [ntf]: %d\n", | 2156 | IWL_WARNING("Could not complete ALIVE transition [ntf]: %d\n", |
@@ -2228,7 +2228,7 @@ static void __iwl4965_down(struct iwl_priv *priv) | |||
2228 | 2228 | ||
2229 | iwl_leds_unregister(priv); | 2229 | iwl_leds_unregister(priv); |
2230 | 2230 | ||
2231 | iwlcore_clear_stations_table(priv); | 2231 | iwl_clear_stations_table(priv); |
2232 | 2232 | ||
2233 | /* Unblock any waiting calls */ | 2233 | /* Unblock any waiting calls */ |
2234 | wake_up_interruptible_all(&priv->wait_command_queue); | 2234 | wake_up_interruptible_all(&priv->wait_command_queue); |
@@ -2390,7 +2390,7 @@ static int __iwl4965_up(struct iwl_priv *priv) | |||
2390 | 2390 | ||
2391 | for (i = 0; i < MAX_HW_RESTARTS; i++) { | 2391 | for (i = 0; i < MAX_HW_RESTARTS; i++) { |
2392 | 2392 | ||
2393 | iwlcore_clear_stations_table(priv); | 2393 | iwl_clear_stations_table(priv); |
2394 | 2394 | ||
2395 | /* load bootstrap state machine, | 2395 | /* load bootstrap state machine, |
2396 | * load bootstrap program into processor's memory, | 2396 | * load bootstrap program into processor's memory, |
@@ -4530,7 +4530,7 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev) | |||
4530 | iwl_rx_queue_free(priv, &priv->rxq); | 4530 | iwl_rx_queue_free(priv, &priv->rxq); |
4531 | iwl_hw_txq_ctx_free(priv); | 4531 | iwl_hw_txq_ctx_free(priv); |
4532 | 4532 | ||
4533 | iwlcore_clear_stations_table(priv); | 4533 | iwl_clear_stations_table(priv); |
4534 | iwl_eeprom_free(priv); | 4534 | iwl_eeprom_free(priv); |
4535 | 4535 | ||
4536 | 4536 | ||