SRU - LP #296285 - iwlagn: avoid sleep in softirq context
Tim Gardner
timg at tpi.com
Wed Nov 5 20:29:34 UTC 2008
>From 8e80cc54c0b08f38cf1f9a66ebd96284b55f0d2f Mon Sep 17 00:00:00 2001
From: John W. Linville <linville at tuxdriver.com>
Date: Thu, 30 Oct 2008 13:59:16 -0400
Subject: [PATCH] UBUNTU: SAUCE: iwlagn: avoid sleep in softirq context
LP: #286285
__ieee80211_tasklet_handler -> __ieee80211_rx ->
__ieee80211_rx_handle_packet -> ieee80211_invoke_rx_handlers ->
ieee80211_rx_h_decrypt -> ieee80211_crypto_tkip_decrypt ->
ieee80211_tkip_decrypt_data -> iwl4965_mac_update_tkip_key ->
iwl_scan_cancel_timeout -> msleep
Ooops!
Avoid the sleep by changing iwl_scan_cancel_timeout with
iwl_scan_cancel and simply returning on failure if the scan persists.
This will cause hardware decryption to fail and we'll handle a few more
frames with software decryption.
Carry this as a SAUCE patch until applied by upstream. I suspect there will be a conflict
if John fixes the spelling in the patch comment, e.g., decrpyption v.s. decryption.
Signed-off-by: John W. Linville <linville at tuxdriver.com>
Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
---
drivers/net/wireless/iwlwifi/iwl-agn.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index e01f048..7af4ca0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3266,7 +3266,12 @@ static void iwl4965_mac_update_tkip_key(struct ieee80211_hw *hw,
return;
}
- iwl_scan_cancel_timeout(priv, 100);
+ if (iwl_scan_cancel(priv)) {
+ /* cancel scan failed, just live w/ bad key and rely
+ briefly on SW decrpyption */
+ IWL_DEBUG_MAC80211("leave - failed to cancel scan\n");
+ return;
+ }
key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK);
key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
--
1.5.6.3
More information about the kernel-team
mailing list