Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 407935 - sys-kernel/gentoo-sources-3.2 - iwlwifi connection loss - iwlwifi: fix key removal
Summary: sys-kernel/gentoo-sources-3.2 - iwlwifi connection loss - iwlwifi: fix key re...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-03-12 14:27 UTC by Tomas Rusnak
Modified: 2012-03-14 13:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Rusnak 2012-03-12 14:27:54 UTC
The connection is not working with iwlwifi on Intel 5100 AGN (I have no option to test others). The problem is discribed here: https://lkml.org/lkml/2012/3/9/519. To provide working connection, we should include this patch into gentoo-sources patch for all 3.2.x based kernels. I tried patch on sys-kernel/gentoo-sources-3.2.9. No change in upstream patch is needed to patch our gentoo-sources.

Reproducible: Always

Steps to Reproduce:
1. try to connect any network
2. you wlan interface looks associated with ip address
3. all unicast packets are lost
Actual Results:  
the wifi is not working without this patch

Expected Results:  
Please, could you add to our gentoo-sources backport of patch planned for 3.3.x as described here?

https://lkml.org/lkml/2012/3/9/519

Original patch on LKML:

Reported-by: Alexander Schnaidt <alex.schnaidt@googlemail.com>
Tested-by: Alexander Schnaidt <alex.schnaidt@googlemail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/iwlwifi/iwl-agn-sta.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -1211,6 +1211,7 @@ int iwl_remove_dynamic_key(struct iwl_pr
 	unsigned long flags;
 	struct iwl_addsta_cmd sta_cmd;
 	u8 sta_id = iwlagn_key_sta_id(priv, ctx->vif, sta);
+	__le16 key_flags;
 
 	/* if station isn't there, neither is the key */
 	if (sta_id == IWL_INVALID_STATION)
@@ -1236,7 +1237,14 @@ int iwl_remove_dynamic_key(struct iwl_pr
 		IWL_ERR(priv, "offset %d not used in uCode key table.\n",
 			keyconf->hw_key_idx);
 
-	sta_cmd.key.key_flags = STA_KEY_FLG_NO_ENC | STA_KEY_FLG_INVALID;
+	key_flags = cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
+	key_flags |= STA_KEY_FLG_MAP_KEY_MSK | STA_KEY_FLG_NO_ENC |
+		     STA_KEY_FLG_INVALID;
+
+	if (!(keyconf->flags & IEEE80211_KEY_FLAG_PAIRWISE))
+		key_flags |= STA_KEY_MULTICAST_MSK;
+
+	sta_cmd.key.key_flags = key_flags;
 	sta_cmd.key.key_offset = WEP_INVALID_OFFSET;
 	sta_cmd.sta.modify_mask = STA_MODIFY_KEY_MASK;
 	sta_cmd.mode = STA_CONTROL_MODIFY_MSK;
Comment 1 Mike Pagano gentoo-dev 2012-03-14 13:56:49 UTC
This patch was released in linux patch 3.2.10.

https://lkml.org/lkml/2012/3/9/519

This patch is included in genpatches release 11.

http://sources.gentoo.org/cgi-bin/viewvc.cgi/linux-patches/genpatches-2.6/tags/3.2-11/

This patch is being used by gentoo-sources-3.2.11.

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-3.2.11.ebuild?view=log