aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-04-29 03:53:29 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-05-10 18:09:02 -0400
commit2c810ccdbac434ae38f4ec5331d3f047dc90f98a (patch)
treee1bd92e76baf88d5ac3f4af37e709f8c746fd623 /drivers/net/wireless/iwlwifi/iwl3945-base.c
parenta6a0345c837346d1b74f4907d4747e6c1053a99f (diff)
iwlwifi: rework broadcast station management
Currently, the broadcast station is managed along with the interface type, rather than always being present. That leads to a bug with injection -- it is currently not possible to inject frames when the only virtual interface is a monitor, because in that the required broadcast station is missing. Additionally, allocating and deallocating the broadcast station's LQ all the time is wasteful, and the code to support this is fairly complex. So this changes completely the way we manage the broadcast station. Rather than manage it along with any interface, we now allocate it when we bring the device up, and remove it again when we bring the device down. When we bring the device up, we don't immediately program the broadcast station into it, instead we just mark it active and rely on the next restore cycle to upload it to the device. This works because an unassociated RXON is always required at least once to set up device parameters, which implies a reprogramming of stations into the device. As we now manage all stations properly, there no longer is a need for forcing a clearing of them via iwl_clear_ucode_stations(), which can become a lot simpler. Signed-off-by: Johannes Berg <johannes.berg@intel.com> 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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 85a46ad667de..1a445711e34a 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2583,7 +2583,8 @@ static void __iwl3945_down(struct iwl_priv *priv)
2583 set_bit(STATUS_EXIT_PENDING, &priv->status); 2583 set_bit(STATUS_EXIT_PENDING, &priv->status);
2584 2584
2585 /* Station information will now be cleared in device */ 2585 /* Station information will now be cleared in device */
2586 iwl_clear_ucode_stations(priv, true); 2586 iwl_clear_ucode_stations(priv);
2587 iwl_dealloc_bcast_station(priv);
2587 2588
2588 /* Unblock any waiting calls */ 2589 /* Unblock any waiting calls */
2589 wake_up_interruptible_all(&priv->wait_command_queue); 2590 wake_up_interruptible_all(&priv->wait_command_queue);
@@ -2664,6 +2665,10 @@ static int __iwl3945_up(struct iwl_priv *priv)
2664{ 2665{
2665 int rc, i; 2666 int rc, i;
2666 2667
2668 rc = iwl_alloc_bcast_station(priv, false);
2669 if (rc)
2670 return rc;
2671
2667 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) { 2672 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) {
2668 IWL_WARN(priv, "Exit pending; will not bring the NIC up\n"); 2673 IWL_WARN(priv, "Exit pending; will not bring the NIC up\n");
2669 return -EIO; 2674 return -EIO;
@@ -3302,7 +3307,6 @@ void iwl3945_config_ap(struct iwl_priv *priv, struct ieee80211_vif *vif)
3302 /* restore RXON assoc */ 3307 /* restore RXON assoc */
3303 priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; 3308 priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK;
3304 iwlcore_commit_rxon(priv); 3309 iwlcore_commit_rxon(priv);
3305 iwl3945_add_bcast_station(priv);
3306 } 3310 }
3307 iwl3945_send_beacon_cmd(priv); 3311 iwl3945_send_beacon_cmd(priv);
3308 3312