summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0055-iwlegacy-don-t-mess-up-the-SCD-when-removing-a-key.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0055-iwlegacy-don-t-mess-up-the-SCD-when-removing-a-key.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0055-iwlegacy-don-t-mess-up-the-SCD-when-removing-a-key.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0055-iwlegacy-don-t-mess-up-the-SCD-when-removing-a-key.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0055-iwlegacy-don-t-mess-up-the-SCD-when-removing-a-key.patch
new file mode 100644
index 00000000..f5bbca6a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0055-iwlegacy-don-t-mess-up-the-SCD-when-removing-a-key.patch
@@ -0,0 +1,51 @@
1From 910c9012a7e02b93cc1f877aa8ef245dd1d99fbe Mon Sep 17 00:00:00 2001
2From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
3Date: Wed, 4 Jul 2012 13:59:08 +0200
4Subject: [PATCH 055/109] iwlegacy: don't mess up the SCD when removing a key
5
6commit b48d96652626b315229b1b82c6270eead6a77a6d upstream.
7
8When we remove a key, we put a key index which was supposed
9to tell the fw that we are actually removing the key. But
10instead the fw took that index as a valid index and messed
11up the SRAM of the device.
12
13This memory corruption on the device mangled the data of
14the SCD. The impact on the user is that SCD queue 2 got
15stuck after having removed keys.
16
17Reported-by: Paul Bolle <pebolle@tiscali.nl>
18Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
19Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
20Signed-off-by: John W. Linville <linville@tuxdriver.com>
21[bwh: Backported to 3.2: adjust filename, context and variable name]
22Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
23---
24 drivers/net/wireless/iwlegacy/iwl-4965-sta.c | 4 ++--
25 1 files changed, 2 insertions(+), 2 deletions(-)
26
27diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-sta.c b/drivers/net/wireless/iwlegacy/iwl-4965-sta.c
28index a262c23..0116ca8 100644
29--- a/drivers/net/wireless/iwlegacy/iwl-4965-sta.c
30+++ b/drivers/net/wireless/iwlegacy/iwl-4965-sta.c
31@@ -466,7 +466,7 @@ int iwl4965_remove_dynamic_key(struct iwl_priv *priv,
32 return 0;
33 }
34
35- if (priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) {
36+ if (priv->stations[sta_id].sta.key.key_flags & STA_KEY_FLG_INVALID) {
37 IWL_WARN(priv, "Removing wrong key %d 0x%x\n",
38 keyconf->keyidx, key_flags);
39 spin_unlock_irqrestore(&priv->sta_lock, flags);
40@@ -483,7 +483,7 @@ int iwl4965_remove_dynamic_key(struct iwl_priv *priv,
41 sizeof(struct iwl4965_keyinfo));
42 priv->stations[sta_id].sta.key.key_flags =
43 STA_KEY_FLG_NO_ENC | STA_KEY_FLG_INVALID;
44- priv->stations[sta_id].sta.key.key_offset = WEP_INVALID_OFFSET;
45+ priv->stations[sta_id].sta.key.key_offset = keyconf->hw_key_idx;
46 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
47 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
48
49--
501.7.7.6
51