aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
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/wireless/iwlwifi/iwl3945-base.c
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/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c11
1 files changed, 2 insertions, 9 deletions
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);