Skip to content

Commit

Permalink
iwlagn: fix warning when set WEP key
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mohamed Abbas authored and John W. Linville committed Mar 16, 2009
1 parent fd9377e commit 48676eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/wireless/iwlwifi/iwl-sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ EXPORT_SYMBOL(iwl_remove_station);
void iwl_clear_stations_table(struct iwl_priv *priv)
{
unsigned long flags;
int i;

spin_lock_irqsave(&priv->sta_lock, flags);

Expand All @@ -486,6 +487,12 @@ void iwl_clear_stations_table(struct iwl_priv *priv)
/* clean ucode key table bit map */
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);
}
EXPORT_SYMBOL(iwl_clear_stations_table);
Expand Down

0 comments on commit 48676eb

Please sign in to comment.