diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2010-02-19 01:58:32 -0500 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-03-19 16:40:49 -0400 |
commit | 7e2461910e9115c9964975f77584baf8c2f76bfe (patch) | |
tree | edb0c98a855116e54555f162db166d4fd8ffaafc /drivers/net/wireless/iwlwifi/iwl-3945.c | |
parent | 647291f5c1596839eb69d6c1f231b2249a703c27 (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/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 10 |
1 files changed, 6 insertions, 4 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) && |