]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.fixes/iwlwifi-dont-clean-static-wep-keys.patch
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / iwlwifi-dont-clean-static-wep-keys.patch
1 From: Mohamed Abbas <mohamed.abbas@intel.com>
2 Date: Wed, 11 Mar 2009 11:17:59 -0700
3 Subject: [PATCH] iwlagn: fix warning when set WEP key
4 Patch-mainline: 2.6.29? (wireless-testing: 31078197aa3ab891b1260627c0497e07060222c8)
5 References: bnc#487247
6
7 iwl_clear_station_table will be called every time rxon called.
8 In this function ucode_key_table is set to 0 even though a static
9 WEP security is set. This will cause in many warning and might be
10 an issue if dynamic WEP is set. This patch make sure we keep track
11 of all existing static WEP when this function is called.
12
13 Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
14 Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
15 Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 Acked-by: Jiri Benc <jbenc@suse.cz>
17
18 ---
19 drivers/net/wireless/iwlwifi/iwl-core.c | 7 +++++++
20 1 file changed, 7 insertions(+)
21
22 --- linux-2.6.27-SLE11_BRANCH.orig/drivers/net/wireless/iwlwifi/iwl-core.c
23 +++ linux-2.6.27-SLE11_BRANCH/drivers/net/wireless/iwlwifi/iwl-core.c
24 @@ -279,6 +279,7 @@ EXPORT_SYMBOL(iwl_hw_nic_init);
25 void iwl_clear_stations_table(struct iwl_priv *priv)
26 {
27 unsigned long flags;
28 + int i;
29
30 spin_lock_irqsave(&priv->sta_lock, flags);
31
32 @@ -293,6 +294,12 @@ void iwl_clear_stations_table(struct iwl
33 /* clean ucode key table bit map */
34 priv->ucode_key_table = 0;
35
36 + /* keep track of static keys */
37 + for (i = 0; i < WEP_KEYS_MAX ; i++) {
38 + if (priv->wep_keys[i].key_size)
39 + test_and_set_bit(i, &priv->ucode_key_table);
40 + }
41 +
42 spin_unlock_irqrestore(&priv->sta_lock, flags);
43 }
44 EXPORT_SYMBOL(iwl_clear_stations_table);