From patchwork Sun Jul 1 13:07:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 1144041 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 49A3740ABE for ; Sun, 1 Jul 2012 10:09:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754385Ab2GAKJP (ORCPT ); Sun, 1 Jul 2012 06:09:15 -0400 Received: from mga01.intel.com ([192.55.52.88]:52000 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751145Ab2GAKJO (ORCPT ); Sun, 1 Jul 2012 06:09:14 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 01 Jul 2012 03:09:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="187129220" Received: from imail001.iil.intel.com ([10.184.77.142]) by fmsmga002.fm.intel.com with ESMTP; 01 Jul 2012 03:09:12 -0700 Received: from egrumbacLAB.jer.intel.com (egrumbaclab.jer.intel.com [10.12.217.156]) by imail001.iil.intel.com with ESMTP id q61A9AVS006931; Sun, 1 Jul 2012 13:09:10 +0300 From: Emmanuel Grumbach To: linux-wireless@vger.kernel.org Cc: Stanislaw Gruszka , Emmanuel Grumbach , Paul Bolle Subject: [RFT] iwlegacy: don't mess up the SCD when removing a key Date: Sun, 1 Jul 2012 16:07:03 +0300 Message-Id: <1341148023-17673-1-git-send-email-emmanuel.grumbach@intel.com> X-Mailer: git-send-email 1.7.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 Signed-off-by: Emmanuel Grumbach --- 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;