aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMohamed Abbas <mohamed.abbas@intel.com>2009-03-11 14:17:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-03-16 18:09:47 -0400
commit48676eb3c3de9013de7d9a63fb8ffb70cd540d95 (patch)
tree2eddd37d83a30c3546ae9cdef110cec4f670b478 /drivers
parentfd9377ee6c351b3fd27bcc56fd5e24622df180bb (diff)
iwlagn: fix warning when set WEP key
iwl_clear_station_table will be called every time rxon called. In this function ucode_key_table is set to 0 even though a static WEP security is set. This will cause in many warning and might be an issue if dynamic WEP is set. This patch make sure we keep track of all existing static WEP when this function is called. Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 0ea08d080928..1684490d93c0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -472,6 +472,7 @@ EXPORT_SYMBOL(iwl_remove_station);
472void iwl_clear_stations_table(struct iwl_priv *priv) 472void iwl_clear_stations_table(struct iwl_priv *priv)
473{ 473{
474 unsigned long flags; 474 unsigned long flags;
475 int i;
475 476
476 spin_lock_irqsave(&priv->sta_lock, flags); 477 spin_lock_irqsave(&priv->sta_lock, flags);
477 478
@@ -486,6 +487,12 @@ void iwl_clear_stations_table(struct iwl_priv *priv)
486 /* clean ucode key table bit map */ 487 /* clean ucode key table bit map */
487 priv->ucode_key_table = 0; 488 priv->ucode_key_table = 0;
488 489
490 /* keep track of static keys */
491 for (i = 0; i < WEP_KEYS_MAX ; i++) {
492 if (priv->wep_keys[i].key_size)
493 test_and_set_bit(i, &priv->ucode_key_table);
494 }
495
489 spin_unlock_irqrestore(&priv->sta_lock, flags); 496 spin_unlock_irqrestore(&priv->sta_lock, flags);
490} 497}
491EXPORT_SYMBOL(iwl_clear_stations_table); 498EXPORT_SYMBOL(iwl_clear_stations_table);