aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2010-02-19 01:58:32 -0500
committerReinette Chatre <reinette.chatre@intel.com>2010-03-19 16:40:49 -0400
commit7e2461910e9115c9964975f77584baf8c2f76bfe (patch)
treeedb0c98a855116e54555f162db166d4fd8ffaafc /drivers/net
parent647291f5c1596839eb69d6c1f231b2249a703c27 (diff)
iwlwifi: only add broadcast station once
Currently the broadcast station is added after every RXON command. Change this to only add the broadcast station when interface is added by mac80211. With this we need some extra work to ensure broadcast station is always present since station table is cleared when RXON without ASSOC bit set is sent. To deal with this we re-add all driver known stations to uCode after such an RXON command is sent. We also do some cleanup and remove the various calls to clear the station table. We now only clear the station table in two scenarios: - only clear uCode portion of station table when RXON command without ASSOC bit is sent - clear uCode and driver portion when interface goes down or is removed. We need to do this clearing when interface goes down to deal with the device restart/reconfigure routines which do not remove the interface, but do add the interface during reconfiguration. Previously the keys were also cleared when station table in driver is cleared, this is not done anymore since mac80211 will take care that keys are set and cleared correctly. There is a known issue with this change. Associating with different AP without bringing interface down fails with a firmware error. This is because of the lack of full station notification support and the later patches in this series that complete the station notification support will fix this. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c27
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c108
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.h9
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c11
7 files changed, 117 insertions, 57 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index ed59e2744ca4..7f95f9019093 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -1911,6 +1911,8 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv)
1911 "configuration (%d).\n", rc); 1911 "configuration (%d).\n", rc);
1912 return rc; 1912 return rc;
1913 } 1913 }
1914 iwl_clear_ucode_stations(priv, false);
1915 iwl_restore_stations(priv);
1914 } 1916 }
1915 1917
1916 IWL_DEBUG_INFO(priv, "Sending RXON\n" 1918 IWL_DEBUG_INFO(priv, "Sending RXON\n"
@@ -1941,7 +1943,10 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv)
1941 1943
1942 memcpy(active_rxon, staging_rxon, sizeof(*active_rxon)); 1944 memcpy(active_rxon, staging_rxon, sizeof(*active_rxon));
1943 1945
1944 iwl_clear_stations_table(priv); 1946 if (!new_assoc) {
1947 iwl_clear_ucode_stations(priv, false);
1948 iwl_restore_stations(priv);
1949 }
1945 1950
1946 /* If we issue a new RXON command which required a tune then we must 1951 /* If we issue a new RXON command which required a tune then we must
1947 * send a new TXPOWER command or we won't be able to Tx any frames */ 1952 * send a new TXPOWER command or we won't be able to Tx any frames */
@@ -1951,9 +1956,6 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv)
1951 return rc; 1956 return rc;
1952 } 1957 }
1953 1958
1954 /* Add the broadcast address so we can send broadcast frames */
1955 priv->cfg->ops->lib->add_bcast_station(priv);
1956
1957 /* If we have set the ASSOC_MSK and we are in BSS mode then 1959 /* If we have set the ASSOC_MSK and we are in BSS mode then
1958 * add the IWL_AP_ID to the station rate table */ 1960 * add the IWL_AP_ID to the station rate table */
1959 if (iwl_is_associated(priv) && 1961 if (iwl_is_associated(priv) &&
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 37e1e77f513d..046bdd96e5a0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -544,7 +544,6 @@ void iwl5000_init_alive_start(struct iwl_priv *priv)
544 goto restart; 544 goto restart;
545 } 545 }
546 546
547 iwl_clear_stations_table(priv);
548 ret = priv->cfg->ops->lib->alive_notify(priv); 547 ret = priv->cfg->ops->lib->alive_notify(priv);
549 if (ret) { 548 if (ret) {
550 IWL_WARN(priv, 549 IWL_WARN(priv,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index d6e1a059b9b0..85ff1552481f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -166,6 +166,8 @@ int iwl_commit_rxon(struct iwl_priv *priv)
166 IWL_ERR(priv, "Error clearing ASSOC_MSK (%d)\n", ret); 166 IWL_ERR(priv, "Error clearing ASSOC_MSK (%d)\n", ret);
167 return ret; 167 return ret;
168 } 168 }
169 iwl_clear_ucode_stations(priv, false);
170 iwl_restore_stations(priv);
169 } 171 }
170 172
171 IWL_DEBUG_INFO(priv, "Sending RXON\n" 173 IWL_DEBUG_INFO(priv, "Sending RXON\n"
@@ -179,9 +181,8 @@ int iwl_commit_rxon(struct iwl_priv *priv)
179 iwl_set_rxon_hwcrypto(priv, !priv->cfg->mod_params->sw_crypto); 181 iwl_set_rxon_hwcrypto(priv, !priv->cfg->mod_params->sw_crypto);
180 182
181 /* Apply the new configuration 183 /* Apply the new configuration
182 * RXON unassoc clears the station table in uCode, send it before 184 * RXON unassoc clears the station table in uCode so restoration of
183 * we add the bcast station. If assoc bit is set, we will send RXON 185 * stations is needed after it (the RXON command) completes
184 * after having added the bcast and bssid station.
185 */ 186 */
186 if (!new_assoc) { 187 if (!new_assoc) {
187 ret = iwl_send_cmd_pdu(priv, REPLY_RXON, 188 ret = iwl_send_cmd_pdu(priv, REPLY_RXON,
@@ -190,17 +191,14 @@ int iwl_commit_rxon(struct iwl_priv *priv)
190 IWL_ERR(priv, "Error setting new RXON (%d)\n", ret); 191 IWL_ERR(priv, "Error setting new RXON (%d)\n", ret);
191 return ret; 192 return ret;
192 } 193 }
194 IWL_DEBUG_INFO(priv, "Return from !new_assoc RXON. \n");
193 memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); 195 memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon));
196 iwl_clear_ucode_stations(priv, false);
197 iwl_restore_stations(priv);
194 } 198 }
195 199
196 iwl_clear_stations_table(priv);
197
198 priv->start_calib = 0; 200 priv->start_calib = 0;
199 201
200 /* Add the broadcast address so we can send broadcast frames */
201 priv->cfg->ops->lib->add_bcast_station(priv);
202
203
204 /* If we have set the ASSOC_MSK and we are in BSS mode then 202 /* If we have set the ASSOC_MSK and we are in BSS mode then
205 * add the IWL_AP_ID to the station rate table */ 203 * add the IWL_AP_ID to the station rate table */
206 if (new_assoc) { 204 if (new_assoc) {
@@ -2087,7 +2085,6 @@ static void iwl_alive_start(struct iwl_priv *priv)
2087 goto restart; 2085 goto restart;
2088 } 2086 }
2089 2087
2090 iwl_clear_stations_table(priv);
2091 ret = priv->cfg->ops->lib->alive_notify(priv); 2088 ret = priv->cfg->ops->lib->alive_notify(priv);
2092 if (ret) { 2089 if (ret) {
2093 IWL_WARN(priv, 2090 IWL_WARN(priv,
@@ -2143,6 +2140,8 @@ static void iwl_alive_start(struct iwl_priv *priv)
2143 wake_up_interruptible(&priv->wait_command_queue); 2140 wake_up_interruptible(&priv->wait_command_queue);
2144 2141
2145 iwl_power_update_mode(priv, true); 2142 iwl_power_update_mode(priv, true);
2143 IWL_DEBUG_INFO(priv, "Updated power mode\n");
2144
2146 2145
2147 return; 2146 return;
2148 2147
@@ -2162,7 +2161,7 @@ static void __iwl_down(struct iwl_priv *priv)
2162 if (!exit_pending) 2161 if (!exit_pending)
2163 set_bit(STATUS_EXIT_PENDING, &priv->status); 2162 set_bit(STATUS_EXIT_PENDING, &priv->status);
2164 2163
2165 iwl_clear_stations_table(priv); 2164 iwl_clear_ucode_stations(priv, true);
2166 2165
2167 /* Unblock any waiting calls */ 2166 /* Unblock any waiting calls */
2168 wake_up_interruptible_all(&priv->wait_command_queue); 2167 wake_up_interruptible_all(&priv->wait_command_queue);
@@ -2359,8 +2358,6 @@ static int __iwl_up(struct iwl_priv *priv)
2359 2358
2360 for (i = 0; i < MAX_HW_RESTARTS; i++) { 2359 for (i = 0; i < MAX_HW_RESTARTS; i++) {
2361 2360
2362 iwl_clear_stations_table(priv);
2363
2364 /* load bootstrap state machine, 2361 /* load bootstrap state machine,
2365 * load bootstrap program into processor's memory, 2362 * load bootstrap program into processor's memory,
2366 * prepare to load the "initialize" uCode */ 2363 * prepare to load the "initialize" uCode */
@@ -3270,9 +3267,6 @@ static int iwl_init_drv(struct iwl_priv *priv)
3270 mutex_init(&priv->mutex); 3267 mutex_init(&priv->mutex);
3271 mutex_init(&priv->sync_cmd_mutex); 3268 mutex_init(&priv->sync_cmd_mutex);
3272 3269
3273 /* Clear the driver's (not device's) station table */
3274 iwl_clear_stations_table(priv);
3275
3276 priv->ieee_channels = NULL; 3270 priv->ieee_channels = NULL;
3277 priv->ieee_rates = NULL; 3271 priv->ieee_rates = NULL;
3278 priv->band = IEEE80211_BAND_2GHZ; 3272 priv->band = IEEE80211_BAND_2GHZ;
@@ -3649,7 +3643,6 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev)
3649 iwl_rx_queue_free(priv, &priv->rxq); 3643 iwl_rx_queue_free(priv, &priv->rxq);
3650 iwl_hw_txq_ctx_free(priv); 3644 iwl_hw_txq_ctx_free(priv);
3651 3645
3652 iwl_clear_stations_table(priv);
3653 iwl_eeprom_free(priv); 3646 iwl_eeprom_free(priv);
3654 3647
3655 3648
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index ec435e5491d9..a33e4536657a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2283,8 +2283,6 @@ static int iwl_set_mode(struct iwl_priv *priv, struct ieee80211_vif *vif)
2283 2283
2284 memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); 2284 memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN);
2285 2285
2286 iwl_clear_stations_table(priv);
2287
2288 return iwlcore_commit_rxon(priv); 2286 return iwlcore_commit_rxon(priv);
2289} 2287}
2290 2288
@@ -2317,6 +2315,10 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
2317 err = iwl_set_mode(priv, vif); 2315 err = iwl_set_mode(priv, vif);
2318 if (err) 2316 if (err)
2319 goto out_err; 2317 goto out_err;
2318
2319 /* Add the broadcast address so we can send broadcast frames */
2320 priv->cfg->ops->lib->add_bcast_station(priv);
2321
2320 goto out; 2322 goto out;
2321 2323
2322 out_err: 2324 out_err:
@@ -2339,6 +2341,8 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
2339 2341
2340 mutex_lock(&priv->mutex); 2342 mutex_lock(&priv->mutex);
2341 2343
2344 iwl_clear_ucode_stations(priv, true);
2345
2342 if (iwl_is_ready_rf(priv)) { 2346 if (iwl_is_ready_rf(priv)) {
2343 iwl_scan_cancel_timeout(priv, 100); 2347 iwl_scan_cancel_timeout(priv, 100);
2344 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; 2348 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index b1aad306efa9..312099099ed3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -34,9 +34,6 @@
34#include "iwl-core.h" 34#include "iwl-core.h"
35#include "iwl-sta.h" 35#include "iwl-sta.h"
36 36
37#define IWL_STA_DRIVER_ACTIVE BIT(0) /* driver entry is active */
38#define IWL_STA_UCODE_ACTIVE BIT(1) /* ucode entry is active */
39
40u8 iwl_find_station(struct iwl_priv *priv, const u8 *addr) 37u8 iwl_find_station(struct iwl_priv *priv, const u8 *addr)
41{ 38{
42 int i; 39 int i;
@@ -495,37 +492,102 @@ out:
495} 492}
496 493
497/** 494/**
498 * iwl_clear_stations_table - Clear the driver's station table 495 * iwl_clear_ucode_stations() - clear entire station table driver and/or ucode
499 * 496 * @priv:
500 * NOTE: This does not clear or otherwise alter the device's station table. 497 * @force: If set then the uCode station table needs to be cleared here. If
498 * not set then the uCode station table has already been cleared,
499 * for example after sending it a RXON command without ASSOC bit
500 * set, and we just need to change driver state here.
501 */ 501 */
502void iwl_clear_stations_table(struct iwl_priv *priv) 502void iwl_clear_ucode_stations(struct iwl_priv *priv, bool force)
503{ 503{
504 unsigned long flags;
505 int i; 504 int i;
505 unsigned long flags_spin;
506 bool cleared = false;
507
508 IWL_DEBUG_INFO(priv, "Clearing ucode stations in driver%s\n",
509 force ? " and ucode" : "");
510
511 if (force) {
512 if (!iwl_is_ready(priv)) {
513 /*
514 * If device is not ready at this point the station
515 * table is likely already empty (uCode not ready
516 * to receive station requests) or will soon be
517 * due to interface going down.
518 */
519 IWL_DEBUG_INFO(priv, "Unable to remove stations from device - device not ready\n");
520 } else {
521 iwl_send_cmd_pdu_async(priv, REPLY_REMOVE_ALL_STA, 0, NULL, NULL);
522 }
523 }
506 524
507 spin_lock_irqsave(&priv->sta_lock, flags); 525 spin_lock_irqsave(&priv->sta_lock, flags_spin);
526 if (force) {
527 IWL_DEBUG_INFO(priv, "Clearing all station information in driver\n");
528 priv->num_stations = 0;
529 memset(priv->stations, 0, sizeof(priv->stations));
530 } else {
531 for (i = 0; i < priv->hw_params.max_stations; i++) {
532 if (priv->stations[i].used & IWL_STA_UCODE_ACTIVE) {
533 IWL_DEBUG_INFO(priv, "Clearing ucode active for station %d \n", i);
534 priv->stations[i].used &= ~IWL_STA_UCODE_ACTIVE;
535 cleared = true;
536 }
537 }
538 }
539 spin_unlock_irqrestore(&priv->sta_lock, flags_spin);
540
541 if (!cleared)
542 IWL_DEBUG_INFO(priv, "No active stations found to be cleared\n");
543}
544EXPORT_SYMBOL(iwl_clear_ucode_stations);
508 545
509 if (iwl_is_alive(priv) && 546/**
510 !test_bit(STATUS_EXIT_PENDING, &priv->status) && 547 * iwl_restore_stations() - Restore driver known stations to device
511 iwl_send_cmd_pdu_async(priv, REPLY_REMOVE_ALL_STA, 0, NULL, NULL)) 548 *
512 IWL_ERR(priv, "Couldn't clear the station table\n"); 549 * All stations considered active by driver, but not present in ucode, is
550 * restored.
551 */
552void iwl_restore_stations(struct iwl_priv *priv)
553{
554 unsigned long flags_spin;
555 int i;
556 bool found = false;
513 557
514 priv->num_stations = 0; 558 if (!iwl_is_ready(priv)) {
515 memset(priv->stations, 0, sizeof(priv->stations)); 559 IWL_DEBUG_INFO(priv, "Not ready yet, not restoring any stations.\n");
560 return;
561 }
516 562
517 /* clean ucode key table bit map */ 563 IWL_DEBUG_ASSOC(priv, "Restoring all known stations ... start.\n");
518 priv->ucode_key_table = 0; 564 spin_lock_irqsave(&priv->sta_lock, flags_spin);
565 for (i = 0; i < priv->hw_params.max_stations; i++) {
566 if ((priv->stations[i].used & IWL_STA_DRIVER_ACTIVE) &&
567 !(priv->stations[i].used & IWL_STA_UCODE_ACTIVE)) {
568 IWL_DEBUG_ASSOC(priv, "Restoring sta %pM\n",
569 priv->stations[i].sta.sta.addr);
570 priv->stations[i].sta.mode = 0;
571 priv->stations[i].used |= IWL_STA_UCODE_INPROGRESS;
572 found = true;
573 }
574 }
519 575
520 /* keep track of static keys */ 576 for (i = 0; i < priv->hw_params.max_stations; i++) {
521 for (i = 0; i < WEP_KEYS_MAX ; i++) { 577 if ((priv->stations[i].used & IWL_STA_UCODE_INPROGRESS)) {
522 if (priv->wep_keys[i].key_size) 578 iwl_send_add_sta(priv, &priv->stations[i].sta,
523 set_bit(i, &priv->ucode_key_table); 579 CMD_ASYNC);
580 priv->stations[i].used &= ~IWL_STA_UCODE_INPROGRESS;
581 }
524 } 582 }
525 583
526 spin_unlock_irqrestore(&priv->sta_lock, flags); 584 spin_unlock_irqrestore(&priv->sta_lock, flags_spin);
585 if (!found)
586 IWL_DEBUG_INFO(priv, "Restoring all known stations .... no stations to be restored.\n");
587 else
588 IWL_DEBUG_INFO(priv, "Restoring all known stations .... in progress.\n");
527} 589}
528EXPORT_SYMBOL(iwl_clear_stations_table); 590EXPORT_SYMBOL(iwl_restore_stations);
529 591
530int iwl_get_free_ucode_key_index(struct iwl_priv *priv) 592int iwl_get_free_ucode_key_index(struct iwl_priv *priv)
531{ 593{
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.h b/drivers/net/wireless/iwlwifi/iwl-sta.h
index 2dc35fe28f56..50367e83defd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.h
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.h
@@ -32,6 +32,12 @@
32#define HW_KEY_DYNAMIC 0 32#define HW_KEY_DYNAMIC 0
33#define HW_KEY_DEFAULT 1 33#define HW_KEY_DEFAULT 1
34 34
35#define IWL_STA_DRIVER_ACTIVE BIT(0) /* driver entry is active */
36#define IWL_STA_UCODE_ACTIVE BIT(1) /* ucode entry is active */
37#define IWL_STA_UCODE_INPROGRESS BIT(2) /* ucode entry is in process of
38 being activated */
39
40
35/** 41/**
36 * iwl_find_station - Find station id for a given BSSID 42 * iwl_find_station - Find station id for a given BSSID
37 * @bssid: MAC address of station ID to find 43 * @bssid: MAC address of station ID to find
@@ -55,7 +61,8 @@ int iwl_rxon_add_station(struct iwl_priv *priv, const u8 *addr, bool is_ap);
55void iwl_add_bcast_station(struct iwl_priv *priv); 61void iwl_add_bcast_station(struct iwl_priv *priv);
56void iwl3945_add_bcast_station(struct iwl_priv *priv); 62void iwl3945_add_bcast_station(struct iwl_priv *priv);
57int iwl_remove_station(struct iwl_priv *priv, const u8 *addr, bool is_ap); 63int iwl_remove_station(struct iwl_priv *priv, const u8 *addr, bool is_ap);
58void iwl_clear_stations_table(struct iwl_priv *priv); 64void iwl_restore_stations(struct iwl_priv *priv);
65void iwl_clear_ucode_stations(struct iwl_priv *priv, bool force);
59int iwl_get_free_ucode_key_index(struct iwl_priv *priv); 66int iwl_get_free_ucode_key_index(struct iwl_priv *priv);
60int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr); 67int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr);
61int iwl_get_ra_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr); 68int iwl_get_ra_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr);
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 2579bbcaab36..6d3e6a85f932 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2480,8 +2480,6 @@ static void iwl3945_alive_start(struct iwl_priv *priv)
2480 goto restart; 2480 goto restart;
2481 } 2481 }
2482 2482
2483 iwl_clear_stations_table(priv);
2484
2485 rfkill = iwl_read_prph(priv, APMG_RFKILL_REG); 2483 rfkill = iwl_read_prph(priv, APMG_RFKILL_REG);
2486 IWL_DEBUG_INFO(priv, "RFKILL status: 0x%x\n", rfkill); 2484 IWL_DEBUG_INFO(priv, "RFKILL status: 0x%x\n", rfkill);
2487 2485
@@ -2558,7 +2556,8 @@ static void __iwl3945_down(struct iwl_priv *priv)
2558 if (!exit_pending) 2556 if (!exit_pending)
2559 set_bit(STATUS_EXIT_PENDING, &priv->status); 2557 set_bit(STATUS_EXIT_PENDING, &priv->status);
2560 2558
2561 iwl_clear_stations_table(priv); 2559 /* Station information will now be cleared in device */
2560 iwl_clear_ucode_stations(priv, true);
2562 2561
2563 /* Unblock any waiting calls */ 2562 /* Unblock any waiting calls */
2564 wake_up_interruptible_all(&priv->wait_command_queue); 2563 wake_up_interruptible_all(&priv->wait_command_queue);
@@ -2692,8 +2691,6 @@ static int __iwl3945_up(struct iwl_priv *priv)
2692 2691
2693 for (i = 0; i < MAX_HW_RESTARTS; i++) { 2692 for (i = 0; i < MAX_HW_RESTARTS; i++) {
2694 2693
2695 iwl_clear_stations_table(priv);
2696
2697 /* load bootstrap state machine, 2694 /* load bootstrap state machine,
2698 * load bootstrap program into processor's memory, 2695 * load bootstrap program into processor's memory,
2699 * prepare to load the "initialize" uCode */ 2696 * prepare to load the "initialize" uCode */
@@ -3834,9 +3831,6 @@ static int iwl3945_init_drv(struct iwl_priv *priv)
3834 mutex_init(&priv->mutex); 3831 mutex_init(&priv->mutex);
3835 mutex_init(&priv->sync_cmd_mutex); 3832 mutex_init(&priv->sync_cmd_mutex);
3836 3833
3837 /* Clear the driver's (not device's) station table */
3838 iwl_clear_stations_table(priv);
3839
3840 priv->ieee_channels = NULL; 3834 priv->ieee_channels = NULL;
3841 priv->ieee_rates = NULL; 3835 priv->ieee_rates = NULL;
3842 priv->band = IEEE80211_BAND_2GHZ; 3836 priv->band = IEEE80211_BAND_2GHZ;
@@ -4196,7 +4190,6 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev)
4196 iwl3945_hw_txq_ctx_free(priv); 4190 iwl3945_hw_txq_ctx_free(priv);
4197 4191
4198 iwl3945_unset_hw_params(priv); 4192 iwl3945_unset_hw_params(priv);
4199 iwl_clear_stations_table(priv);
4200 4193
4201 /*netif_stop_queue(dev); */ 4194 /*netif_stop_queue(dev); */
4202 flush_workqueue(priv->workqueue); 4195 flush_workqueue(priv->workqueue);