diff options
author | Winkler, Tomas <tomas.winkler@intel.com> | 2008-11-19 18:32:23 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-26 09:47:37 -0500 |
commit | 83dde8c90522b89366e241bdbd69113f7094c249 (patch) | |
tree | 6449703fa237de777c540021342ede3c742a4a6c /drivers/net/wireless/iwlwifi/iwl-sta.c | |
parent | ce546fd2eacdbd8dc15f3d2ffd9a95661d082919 (diff) |
iwlwifi: move iwl_clear_stations_table to iwl-sta.c
This patch moves iwl_clear_stations_table into iwl-sta.c
Signed-off-by: Tomas Winkler <tomas.winkler@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-sta.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 109136a09c54..f86a8ca2aa3b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -463,6 +463,29 @@ out: | |||
463 | } | 463 | } |
464 | EXPORT_SYMBOL(iwl_remove_station); | 464 | EXPORT_SYMBOL(iwl_remove_station); |
465 | 465 | ||
466 | /** | ||
467 | * iwl_clear_stations_table - Clear the driver's station table | ||
468 | * | ||
469 | * NOTE: This does not clear or otherwise alter the device's station table. | ||
470 | */ | ||
471 | void iwl_clear_stations_table(struct iwl_priv *priv) | ||
472 | { | ||
473 | unsigned long flags; | ||
474 | |||
475 | spin_lock_irqsave(&priv->sta_lock, flags); | ||
476 | |||
477 | if (iwl_is_alive(priv) && | ||
478 | !test_bit(STATUS_EXIT_PENDING, &priv->status) && | ||
479 | iwl_send_cmd_pdu_async(priv, REPLY_REMOVE_ALL_STA, 0, NULL, NULL)) | ||
480 | IWL_ERROR("Couldn't clear the station table\n"); | ||
481 | |||
482 | priv->num_stations = 0; | ||
483 | memset(priv->stations, 0, sizeof(priv->stations)); | ||
484 | |||
485 | spin_unlock_irqrestore(&priv->sta_lock, flags); | ||
486 | } | ||
487 | EXPORT_SYMBOL(iwl_clear_stations_table); | ||
488 | |||
466 | static int iwl_get_free_ucode_key_index(struct iwl_priv *priv) | 489 | static int iwl_get_free_ucode_key_index(struct iwl_priv *priv) |
467 | { | 490 | { |
468 | int i; | 491 | int i; |