Commit 48676eb3 authored by Mohamed Abbas's avatar Mohamed Abbas Committed by John W. Linville

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: default avatarMohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent fd9377ee
...@@ -472,6 +472,7 @@ EXPORT_SYMBOL(iwl_remove_station); ...@@ -472,6 +472,7 @@ EXPORT_SYMBOL(iwl_remove_station);
void iwl_clear_stations_table(struct iwl_priv *priv) void iwl_clear_stations_table(struct iwl_priv *priv)
{ {
unsigned long flags; unsigned long flags;
int i;
spin_lock_irqsave(&priv->sta_lock, flags); spin_lock_irqsave(&priv->sta_lock, flags);
...@@ -486,6 +487,12 @@ void iwl_clear_stations_table(struct iwl_priv *priv) ...@@ -486,6 +487,12 @@ void iwl_clear_stations_table(struct iwl_priv *priv)
/* clean ucode key table bit map */ /* clean ucode key table bit map */
priv->ucode_key_table = 0; priv->ucode_key_table = 0;
/* keep track of static keys */
for (i = 0; i < WEP_KEYS_MAX ; i++) {
if (priv->wep_keys[i].key_size)
test_and_set_bit(i, &priv->ucode_key_table);
}
spin_unlock_irqrestore(&priv->sta_lock, flags); spin_unlock_irqrestore(&priv->sta_lock, flags);
} }
EXPORT_SYMBOL(iwl_clear_stations_table); EXPORT_SYMBOL(iwl_clear_stations_table);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment