linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFT] iwlegacy: don't mess up the SCD when removing a key
@ 2012-07-01 13:07 Emmanuel Grumbach
  2012-07-01 12:01 ` Paul Bolle
  2012-07-02  8:26 ` Stanislaw Gruszka
  0 siblings, 2 replies; 6+ messages in thread
From: Emmanuel Grumbach @ 2012-07-01 13:07 UTC (permalink / raw)
  To: linux-wireless; +Cc: Stanislaw Gruszka, Emmanuel Grumbach, Paul Bolle

When we remove a key, we put a key index which was supposed
to tell the fw that we are actually removing the key. But
instead the fw took that index as a valid index and messed
up the SRAM of the device.

This memory corruption on the device mangled the data of
the SCD. The impact on the user is that SCD queue 2 got
stuck after having removed keys.

Cc: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
Paul, can you please test ?
If it solve the issues for you, I will send as a patch and Cc stable
Totally not tested
---

 drivers/net/wireless/iwlegacy/4965-mac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index d24eaf8..9981f09 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -3420,7 +3420,7 @@ il4965_remove_dynamic_key(struct il_priv *il,
 	memset(&il->stations[sta_id].sta.key, 0, sizeof(struct il4965_keyinfo));
 	il->stations[sta_id].sta.key.key_flags =
 	    STA_KEY_FLG_NO_ENC | STA_KEY_FLG_INVALID;
-	il->stations[sta_id].sta.key.key_offset = WEP_INVALID_OFFSET;
+	il->stations[sta_id].sta.key.key_offset = keyconf->hw_key_idx;
 	il->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
 	il->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
 
-- 
1.7.1

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-02  8:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-01 13:07 [RFT] iwlegacy: don't mess up the SCD when removing a key Emmanuel Grumbach
2012-07-01 12:01 ` Paul Bolle
2012-07-01 13:29   ` Grumbach, Emmanuel
2012-07-01 13:36     ` Paul Bolle
2012-07-01 13:47       ` Grumbach, Emmanuel
2012-07-02  8:26 ` Stanislaw Gruszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).