提交 37deb2a0 编写于 作者: E Emmanuel Grumbach 提交者: John W. Linville

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: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NZhu Yi <yi.zhu@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 8f91aecb
...@@ -675,7 +675,7 @@ static void iwl5000_init_alive_start(struct iwl_priv *priv) ...@@ -675,7 +675,7 @@ static void iwl5000_init_alive_start(struct iwl_priv *priv)
goto restart; goto restart;
} }
iwlcore_clear_stations_table(priv); iwl_clear_stations_table(priv);
ret = priv->cfg->ops->lib->alive_notify(priv); ret = priv->cfg->ops->lib->alive_notify(priv);
if (ret) { if (ret) {
IWL_WARNING("Could not complete ALIVE transition: %d\n", ret); IWL_WARNING("Could not complete ALIVE transition: %d\n", ret);
......
...@@ -273,26 +273,27 @@ int iwl_hw_nic_init(struct iwl_priv *priv) ...@@ -273,26 +273,27 @@ int iwl_hw_nic_init(struct iwl_priv *priv)
EXPORT_SYMBOL(iwl_hw_nic_init); EXPORT_SYMBOL(iwl_hw_nic_init);
/** /**
* iwlcore_clear_stations_table - Clear the driver's station table * iwl_clear_stations_table - Clear the driver's station table
* *
* NOTE: This does not clear or otherwise alter the device's station table. * NOTE: This does not clear or otherwise alter the device's station table.
*/ */
void iwlcore_clear_stations_table(struct iwl_priv *priv) void iwl_clear_stations_table(struct iwl_priv *priv)
{ {
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&priv->sta_lock, flags); spin_lock_irqsave(&priv->sta_lock, flags);
priv->num_stations = 0;
if (iwl_is_alive(priv) && if (iwl_is_alive(priv) &&
iwl_send_cmd_pdu_async(priv, REPLY_REMOVE_ALL_STA, 0, NULL, NULL)) !test_bit(STATUS_EXIT_PENDING, &priv->status) &&
iwl_send_cmd_pdu_async(priv, REPLY_REMOVE_ALL_STA, 0, NULL, NULL))
IWL_ERROR("Couldn't clear the station table\n"); IWL_ERROR("Couldn't clear the station table\n");
priv->num_stations = 0;
memset(priv->stations, 0, sizeof(priv->stations)); memset(priv->stations, 0, sizeof(priv->stations));
spin_unlock_irqrestore(&priv->sta_lock, flags); spin_unlock_irqrestore(&priv->sta_lock, flags);
} }
EXPORT_SYMBOL(iwlcore_clear_stations_table); EXPORT_SYMBOL(iwl_clear_stations_table);
void iwl_reset_qos(struct iwl_priv *priv) void iwl_reset_qos(struct iwl_priv *priv)
{ {
...@@ -864,7 +865,7 @@ int iwl_init_drv(struct iwl_priv *priv) ...@@ -864,7 +865,7 @@ int iwl_init_drv(struct iwl_priv *priv)
mutex_init(&priv->mutex); mutex_init(&priv->mutex);
/* Clear the driver's (not device's) station table */ /* Clear the driver's (not device's) station table */
iwlcore_clear_stations_table(priv); iwl_clear_stations_table(priv);
priv->data_retry_limit = -1; priv->data_retry_limit = -1;
priv->ieee_channels = NULL; priv->ieee_channels = NULL;
......
...@@ -181,7 +181,7 @@ struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg, ...@@ -181,7 +181,7 @@ struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg,
struct ieee80211_ops *hw_ops); struct ieee80211_ops *hw_ops);
void iwl_hw_detect(struct iwl_priv *priv); void iwl_hw_detect(struct iwl_priv *priv);
void iwlcore_clear_stations_table(struct iwl_priv *priv); void iwl_clear_stations_table(struct iwl_priv *priv);
void iwl_free_calib_results(struct iwl_priv *priv); void iwl_free_calib_results(struct iwl_priv *priv);
void iwl_reset_qos(struct iwl_priv *priv); void iwl_reset_qos(struct iwl_priv *priv);
void iwl_set_rxon_chain(struct iwl_priv *priv); void iwl_set_rxon_chain(struct iwl_priv *priv);
......
...@@ -320,7 +320,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv) ...@@ -320,7 +320,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv)
memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon));
} }
iwlcore_clear_stations_table(priv); iwl_clear_stations_table(priv);
if (!priv->error_recovering) if (!priv->error_recovering)
priv->start_calib = 0; priv->start_calib = 0;
...@@ -841,7 +841,7 @@ static int iwl4965_set_mode(struct iwl_priv *priv, int mode) ...@@ -841,7 +841,7 @@ static int iwl4965_set_mode(struct iwl_priv *priv, int mode)
iwl4965_connection_init_rx_config(priv); iwl4965_connection_init_rx_config(priv);
memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN);
iwlcore_clear_stations_table(priv); iwl_clear_stations_table(priv);
/* dont commit rxon if rf-kill is on*/ /* dont commit rxon if rf-kill is on*/
if (!iwl_is_ready_rf(priv)) if (!iwl_is_ready_rf(priv))
...@@ -2150,7 +2150,7 @@ static void iwl_alive_start(struct iwl_priv *priv) ...@@ -2150,7 +2150,7 @@ static void iwl_alive_start(struct iwl_priv *priv)
goto restart; goto restart;
} }
iwlcore_clear_stations_table(priv); iwl_clear_stations_table(priv);
ret = priv->cfg->ops->lib->alive_notify(priv); ret = priv->cfg->ops->lib->alive_notify(priv);
if (ret) { if (ret) {
IWL_WARNING("Could not complete ALIVE transition [ntf]: %d\n", IWL_WARNING("Could not complete ALIVE transition [ntf]: %d\n",
...@@ -2228,7 +2228,7 @@ static void __iwl4965_down(struct iwl_priv *priv) ...@@ -2228,7 +2228,7 @@ static void __iwl4965_down(struct iwl_priv *priv)
iwl_leds_unregister(priv); iwl_leds_unregister(priv);
iwlcore_clear_stations_table(priv); iwl_clear_stations_table(priv);
/* Unblock any waiting calls */ /* Unblock any waiting calls */
wake_up_interruptible_all(&priv->wait_command_queue); wake_up_interruptible_all(&priv->wait_command_queue);
...@@ -2390,7 +2390,7 @@ static int __iwl4965_up(struct iwl_priv *priv) ...@@ -2390,7 +2390,7 @@ static int __iwl4965_up(struct iwl_priv *priv)
for (i = 0; i < MAX_HW_RESTARTS; i++) { for (i = 0; i < MAX_HW_RESTARTS; i++) {
iwlcore_clear_stations_table(priv); iwl_clear_stations_table(priv);
/* load bootstrap state machine, /* load bootstrap state machine,
* load bootstrap program into processor's memory, * load bootstrap program into processor's memory,
...@@ -4530,7 +4530,7 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev) ...@@ -4530,7 +4530,7 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev)
iwl_rx_queue_free(priv, &priv->rxq); iwl_rx_queue_free(priv, &priv->rxq);
iwl_hw_txq_ctx_free(priv); iwl_hw_txq_ctx_free(priv);
iwlcore_clear_stations_table(priv); iwl_clear_stations_table(priv);
iwl_eeprom_free(priv); iwl_eeprom_free(priv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册