From 24e5c40130c29bed0fbfbcc9c23613ae6ffc4c0a Mon Sep 17 00:00:00 2001 From: Emmanuel Grumbach Date: Mon, 30 Jun 2008 17:23:03 +0800 Subject: iwlwifi: better station table maintenance This patch makes the station table maintenance safer. Two flags are maintained: 1) if station is present in driver 2) if station is present in uCode This will allow us in the future to deal with more stations than the firmware allows. Signed-off-by: Emmanuel Grumbach Signed-off-by: Tomas Winkler Signed-off-by: Zhu Yi Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-core.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index eb74a40a62e..1c0670bc284 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c @@ -284,6 +284,10 @@ void iwlcore_clear_stations_table(struct iwl_priv *priv) spin_lock_irqsave(&priv->sta_lock, flags); priv->num_stations = 0; + if (iwl_is_alive(priv) && + iwl_send_cmd_pdu_async(priv, REPLY_REMOVE_ALL_STA, 0, NULL, NULL)) + IWL_ERROR("Couldn't clear the station table\n"); + memset(priv->stations, 0, sizeof(priv->stations)); spin_unlock_irqrestore(&priv->sta_lock, flags); -- cgit v1.2.3