Fix oops in iwlwifi/iwlagn driver (rhbz 766071)

This commit is contained in:
Josh Boyer 2012-01-23 09:53:44 -05:00
parent 7f50a05c33
commit e4e2bcb507
2 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,43 @@
From b2ccccdca46273c7b321ecf5041c362cd950da20 Mon Sep 17 00:00:00 2001
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Date: Thu, 10 Nov 2011 06:55:04 -0800
Subject: [PATCH] iwlagn: check for SMPS mode
Check and report WARN only when its invalid
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 1 +
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 1a52ed2..6465983 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -827,6 +827,7 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt)
case IEEE80211_SMPS_STATIC:
case IEEE80211_SMPS_DYNAMIC:
return IWL_NUM_IDLE_CHAINS_SINGLE;
+ case IEEE80211_SMPS_AUTOMATIC:
case IEEE80211_SMPS_OFF:
return active_cnt;
default:
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index 4c52bee..8e45fba 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -542,6 +542,9 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
mutex_lock(&priv->shrd->mutex);
+ if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status))
+ goto out;
+
if (unlikely(test_bit(STATUS_SCANNING, &priv->shrd->status))) {
IWL_DEBUG_MAC80211(priv, "leave - scanning\n");
goto out;
--
1.7.7.5

View File

@ -54,7 +54,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
#
%global baserelease 2
%global baserelease 3
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -810,6 +810,9 @@ Patch21227: mac80211-fix-work-removal-on-deauth-request.patch
#rhbz 781625
Patch21228: SCSI-sym53c8xx-Fix-NULL-pointer-dereference-in-slave.patch
#rhbz 766071
Patch21229: iwlagn-check-for-SMPS-mode.patch
Patch22000: rcu-reintroduce-missing-calls.patch
@ -1502,6 +1505,9 @@ ApplyPatch mac80211-fix-work-removal-on-deauth-request.patch
#rhbz 781625
ApplyPatch SCSI-sym53c8xx-Fix-NULL-pointer-dereference-in-slave.patch
#rhbz 766071
ApplyPatch iwlagn-check-for-SMPS-mode.patch
ApplyPatch rcu-reintroduce-missing-calls.patch
# END OF PATCH APPLICATIONS
@ -2281,6 +2287,7 @@ fi
%changelog
* Mon Jan 23 2012 Josh Boyer <jwboyer@redhat.com>
- Fix oops in iwlwifi/iwlagn driver (rhbz 766071)
- Fix NULL pointer dereference in sym53c8xx module (rhbz 781625)
* Fri Jan 20 2012 Dave Jones <davej@redhat.com>