aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl4965-base.c
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2007-09-26 23:27:33 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:53:21 -0400
commit556f8db74809a435195c840f495fd1bf855dfadb (patch)
tree707ac85c06b443207a7eff8afb9353de8a70a943 /drivers/net/wireless/iwlwifi/iwl4965-base.c
parente1493deb74d22b005769e6ecbd24a00106941c6c (diff)
[PATCH] iwlwifi: clear station table in rxon unconditionally
This patch clears stations table for every rxon command. It removes iwl_rxon_add_station function in 3945. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index fac130d0e9e5..c663288a675e 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -407,6 +407,7 @@ const u8 BROADCAST_ADDR[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
407 407
408/**************************************************************/ 408/**************************************************************/
409 409
410#if 0 /* temparary disable till we add real remove station */
410static u8 iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap) 411static u8 iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
411{ 412{
412 int index = IWL_INVALID_STATION; 413 int index = IWL_INVALID_STATION;
@@ -442,6 +443,7 @@ out:
442 spin_unlock_irqrestore(&priv->sta_lock, flags); 443 spin_unlock_irqrestore(&priv->sta_lock, flags);
443 return 0; 444 return 0;
444} 445}
446#endif
445 447
446static void iwl_clear_stations_table(struct iwl_priv *priv) 448static void iwl_clear_stations_table(struct iwl_priv *priv)
447{ 449{
@@ -852,16 +854,12 @@ int iwl_send_statistics_request(struct iwl_priv *priv)
852static int iwl_rxon_add_station(struct iwl_priv *priv, 854static int iwl_rxon_add_station(struct iwl_priv *priv,
853 const u8 *addr, int is_ap) 855 const u8 *addr, int is_ap)
854{ 856{
855 u8 rc; 857 u8 sta_id;
856
857 /* Remove this station if it happens to already exist */
858 iwl_remove_station(priv, addr, is_ap);
859
860 rc = iwl_add_station(priv, addr, is_ap, 0);
861 858
859 sta_id = iwl_add_station(priv, addr, is_ap, 0);
862 iwl4965_add_station(priv, addr, is_ap); 860 iwl4965_add_station(priv, addr, is_ap);
863 861
864 return rc; 862 return sta_id;
865} 863}
866 864
867/** 865/**
@@ -1149,16 +1147,6 @@ static int iwl_commit_rxon(struct iwl_priv *priv)
1149 "configuration (%d).\n", rc); 1147 "configuration (%d).\n", rc);
1150 return rc; 1148 return rc;
1151 } 1149 }
1152
1153 /* The RXON bit toggling will have cleared out the
1154 * station table in the uCode, so blank it in the driver
1155 * as well */
1156 iwl_clear_stations_table(priv);
1157 } else if (priv->staging_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) {
1158 /* When switching from non-associated to associated, the
1159 * uCode clears out the station table; so clear it in the
1160 * driver as well */
1161 iwl_clear_stations_table(priv);
1162 } 1150 }
1163 1151
1164 IWL_DEBUG_INFO("Sending RXON\n" 1152 IWL_DEBUG_INFO("Sending RXON\n"
@@ -1178,6 +1166,8 @@ static int iwl_commit_rxon(struct iwl_priv *priv)
1178 return rc; 1166 return rc;
1179 } 1167 }
1180 1168
1169 iwl_clear_stations_table(priv);
1170
1181#ifdef CONFIG_IWLWIFI_SENSITIVITY 1171#ifdef CONFIG_IWLWIFI_SENSITIVITY
1182 if (!priv->error_recovering) 1172 if (!priv->error_recovering)
1183 priv->start_calib = 0; 1173 priv->start_calib = 0;