mwifiex: handle association failure case correctly
ath9k: Fix kernel panic during driver initilization mwifiex: add NULL checks in driver unload path bcma: don't fail for bad SPROM CRC zd1211rw: firmware needs duration_id set to zero for non-pspoll frames mac80211: Fix a rwlock bad magic bug rtlwifi: Modify rtl_pci_init to return 0 on success
This commit is contained in:
parent
59b9e67990
commit
bbd9ebecee
10 changed files with 479 additions and 63 deletions
94
ath9k-Fix-kernel-panic-during-driver-initilization.patch
Normal file
94
ath9k-Fix-kernel-panic-during-driver-initilization.patch
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
From 07445f688218a48bde72316aed9de4fdcc173131 Mon Sep 17 00:00:00 2001
|
||||
From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
|
||||
Date: Thu, 2 Feb 2012 16:29:05 +0530
|
||||
Subject: [PATCH] ath9k: Fix kernel panic during driver initilization
|
||||
|
||||
all works need to be initialized before ieee80211_register_hw
|
||||
to prevent mac80211 call backs such as drv_start, drv_config
|
||||
getting started. otherwise we would queue/cancel works before
|
||||
initializing them and it leads to kernel panic.
|
||||
this issue can be recreated with the following script
|
||||
in Chrome laptops with AR928X cards, with background scan
|
||||
running (or) Network manager is running
|
||||
|
||||
while true
|
||||
do
|
||||
sudo modprobe -v ath9k
|
||||
sleep 3
|
||||
sudo modprobe -r ath9k
|
||||
sleep 3
|
||||
done
|
||||
|
||||
EIP: [<81040a47>] __cancel_work_timer+0xb8/0xe1 SS:ESP 0068:f6be9d70
|
||||
---[ end trace 4f86d6139a9900ef ]---
|
||||
Registered led device: ath9k-phy0
|
||||
ieee80211 phy0: Atheros AR9280 Rev:2 mem=0xf88a0000,
|
||||
irq=16
|
||||
Kernel panic - not syncing: Fatal exception
|
||||
Pid: 456, comm: wpa_supplicant Tainted: G D
|
||||
3.0.13 #1
|
||||
Call Trace:
|
||||
[<81379e21>] panic+0x53/0x14a
|
||||
[<81004a30>] oops_end+0x73/0x81
|
||||
[<81004b53>] die+0x4c/0x55
|
||||
[<81002710>] do_trap+0x7c/0x83
|
||||
[<81002855>] ? do_bounds+0x58/0x58
|
||||
[<810028cc>] do_invalid_op+0x77/0x81
|
||||
[<81040a47>] ? __cancel_work_timer+0xb8/0xe1
|
||||
[<810489ec>] ? sched_clock_cpu+0x81/0x11f
|
||||
[<8103f809>] ? wait_on_work+0xe2/0xf7
|
||||
[<8137f807>] error_code+0x67/0x6c
|
||||
[<810300d8>] ? wait_consider_task+0x4ba/0x84c
|
||||
[<81040a47>] ? __cancel_work_timer+0xb8/0xe1
|
||||
[<810380c9>] ? try_to_del_timer_sync+0x5f/0x67
|
||||
[<81040a91>] cancel_work_sync+0xf/0x11
|
||||
[<f88d7b7c>] ath_set_channel+0x62/0x25c [ath9k]
|
||||
[<f88d67d1>] ? ath9k_tx_last_beacon+0x26a/0x85c [ath9k]
|
||||
[<f88d8899>] ath_radio_disable+0x3f1/0x68e [ath9k]
|
||||
[<f90d0edb>] ieee80211_hw_config+0x111/0x116 [mac80211]
|
||||
[<f90dd95c>] __ieee80211_recalc_idle+0x919/0xa37 [mac80211]
|
||||
[<f90dda76>] __ieee80211_recalc_idle+0xa33/0xa37 [mac80211]
|
||||
[<812dbed8>] __dev_open+0x82/0xab
|
||||
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Cc: Gary Morain <gmorain@google.com>
|
||||
Cc: Paul Stewart <pstew@google.com>
|
||||
Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
|
||||
Tested-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
|
||||
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
|
||||
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath9k/init.c | 9 +++++----
|
||||
1 files changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
|
||||
index abf9435..53a005d 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -822,6 +822,11 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||
ARRAY_SIZE(ath9k_tpt_blink));
|
||||
#endif
|
||||
|
||||
+ INIT_WORK(&sc->hw_reset_work, ath_reset_work);
|
||||
+ INIT_WORK(&sc->hw_check_work, ath_hw_check);
|
||||
+ INIT_WORK(&sc->paprd_work, ath_paprd_calibrate);
|
||||
+ INIT_DELAYED_WORK(&sc->hw_pll_work, ath_hw_pll_work);
|
||||
+
|
||||
/* Register with mac80211 */
|
||||
error = ieee80211_register_hw(hw);
|
||||
if (error)
|
||||
@@ -840,10 +845,6 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||
goto error_world;
|
||||
}
|
||||
|
||||
- INIT_WORK(&sc->hw_reset_work, ath_reset_work);
|
||||
- INIT_WORK(&sc->hw_check_work, ath_hw_check);
|
||||
- INIT_WORK(&sc->paprd_work, ath_paprd_calibrate);
|
||||
- INIT_DELAYED_WORK(&sc->hw_pll_work, ath_hw_pll_work);
|
||||
sc->last_rssi = ATH_RSSI_DUMMY_MARKER;
|
||||
|
||||
ath_init_leds(sc);
|
||||
--
|
||||
1.7.4.4
|
||||
|
||||
|
|
@ -1,29 +1,7 @@
|
|||
From nbd@nbd.name Sun Feb 5 15:15:47 2012
|
||||
Return-path: <nbd@nbd.name>
|
||||
Envelope-to: linville@tuxdriver.com
|
||||
Delivery-date: Sun, 05 Feb 2012 15:15:47 -0500
|
||||
Received: from [2a01:4f8:131:30e2::2] (helo=nbd.name)
|
||||
by smtp.tuxdriver.com with esmtps (TLSv1:AES256-SHA:256)
|
||||
(Exim 4.63)
|
||||
(envelope-from <nbd@nbd.name>)
|
||||
id 1Ru8Um-0004mD-I2
|
||||
for linville@tuxdriver.com; Sun, 05 Feb 2012 15:15:47 -0500
|
||||
Received: by nf.local (Postfix, from userid 501)
|
||||
id 12D0F5BDE1DC; Sun, 5 Feb 2012 21:15:18 +0100 (CET)
|
||||
From f88373fa47f3ce6590fdfaa742d0ddacc2ae017f Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@openwrt.org>
|
||||
To: linux-wireless@vger.kernel.org
|
||||
Cc: linville@tuxdriver.com,
|
||||
mcgrof@qca.qualcomm.com,
|
||||
mohammed@qca.qualcomm.com
|
||||
Subject: [PATCH 3.3 1/2] ath9k: fix a WEP crypto related regression
|
||||
Date: Sun, 5 Feb 2012 21:15:17 +0100
|
||||
Message-Id: <1328472918-30012-1-git-send-email-nbd@openwrt.org>
|
||||
X-Mailer: git-send-email 1.7.3.2
|
||||
X-Spam-Score: -1.1 (-)
|
||||
X-Spam-Status: No
|
||||
Status: RO
|
||||
Content-Length: 1381
|
||||
Lines: 38
|
||||
Date: Sun, 5 Feb 2012 21:15:17 +0100
|
||||
Subject: [PATCH] ath9k: fix a WEP crypto related regression
|
||||
|
||||
commit b4a82a0 "ath9k_hw: fix interpretation of the rx KeyMiss flag"
|
||||
fixed the interpretation of the KeyMiss flag for keycache based lookups,
|
||||
|
|
@ -36,6 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|||
Cc: stable@vger.kernel.org
|
||||
Reported-by: Laurent Bonnans <bonnans.l@gmail.com>
|
||||
Reported-by: Jurica Vukadin <u.ra604@googlemail.com>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath9k/recv.c | 8 ++++++++
|
||||
1 files changed, 8 insertions(+), 0 deletions(-)
|
||||
|
|
@ -60,7 +39,5 @@ index 0e666fb..7e1a91a 100644
|
|||
return false;
|
||||
/*
|
||||
--
|
||||
1.7.3.2
|
||||
|
||||
|
||||
1.7.4.4
|
||||
|
||||
|
|
|
|||
|
|
@ -1,31 +1,7 @@
|
|||
From nbd@nbd.name Sun Feb 5 15:15:46 2012
|
||||
Return-path: <nbd@nbd.name>
|
||||
Envelope-to: linville@tuxdriver.com
|
||||
Delivery-date: Sun, 05 Feb 2012 15:15:46 -0500
|
||||
Received: from [2a01:4f8:131:30e2::2] (helo=nbd.name)
|
||||
by smtp.tuxdriver.com with esmtps (TLSv1:AES256-SHA:256)
|
||||
(Exim 4.63)
|
||||
(envelope-from <nbd@nbd.name>)
|
||||
id 1Ru8Um-0004mE-I0
|
||||
for linville@tuxdriver.com; Sun, 05 Feb 2012 15:15:44 -0500
|
||||
Received: by nf.local (Postfix, from userid 501)
|
||||
id 1926D5BDE1DD; Sun, 5 Feb 2012 21:15:18 +0100 (CET)
|
||||
From 55a2bb4a6d5e8c7b324d003e130fd9aaf33be4e6 Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@openwrt.org>
|
||||
To: linux-wireless@vger.kernel.org
|
||||
Cc: linville@tuxdriver.com,
|
||||
mcgrof@qca.qualcomm.com,
|
||||
mohammed@qca.qualcomm.com
|
||||
Subject: [PATCH 3.3 2/2] ath9k_hw: fix a RTS/CTS timeout regression
|
||||
Date: Sun, 5 Feb 2012 21:15:18 +0100
|
||||
Message-Id: <1328472918-30012-2-git-send-email-nbd@openwrt.org>
|
||||
X-Mailer: git-send-email 1.7.3.2
|
||||
In-Reply-To: <1328472918-30012-1-git-send-email-nbd@openwrt.org>
|
||||
References: <1328472918-30012-1-git-send-email-nbd@openwrt.org>
|
||||
X-Spam-Score: -1.1 (-)
|
||||
X-Spam-Status: No
|
||||
Status: RO
|
||||
Content-Length: 1749
|
||||
Lines: 45
|
||||
Date: Sun, 5 Feb 2012 21:15:18 +0100
|
||||
Subject: [PATCH] ath9k_hw: fix a RTS/CTS timeout regression
|
||||
|
||||
commit adb5066 "ath9k_hw: do not apply the 2.4 ghz ack timeout
|
||||
workaround to cts" reduced the hardware CTS timeout to the normal
|
||||
|
|
@ -41,6 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|||
Cc: stable@vger.kernel.org
|
||||
Reported-by: Seth Forshee <seth.forshee@canonical.com>
|
||||
Reported-by: Marek Lindner <lindner_marek@yahoo.de>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath9k/hw.c | 7 +++++--
|
||||
1 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
|
@ -69,7 +46,5 @@ index ee77595..87db1ee 100644
|
|||
ath9k_hw_set_sifs_time(ah, sifstime);
|
||||
ath9k_hw_setslottime(ah, slottime);
|
||||
--
|
||||
1.7.3.2
|
||||
|
||||
|
||||
1.7.4.4
|
||||
|
||||
|
|
|
|||
36
bcma-don-t-fail-for-bad-SPROM-CRC.patch
Normal file
36
bcma-don-t-fail-for-bad-SPROM-CRC.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
From 2e6b411971de727a5bcea4323331fdaa70a81b11 Mon Sep 17 00:00:00 2001
|
||||
From: Henrik Rydberg <rydberg@euromail.se>
|
||||
Date: Tue, 31 Jan 2012 14:22:15 -0500
|
||||
Subject: [PATCH] bcma: don't fail for bad SPROM CRC
|
||||
|
||||
The brcmsmac driver is now using the bcma SPROM CRC check, which does
|
||||
not recognize all chipsets that were functional prior to the switch. In
|
||||
particular, the current code bails out on odd CRC errors in recent
|
||||
Macbooks. This patch ignores those errors, with the argument that an
|
||||
unrecognized SPROM should be treated similarly to a non-existing one.
|
||||
|
||||
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
---
|
||||
drivers/bcma/main.c | 4 +---
|
||||
1 files changed, 1 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
|
||||
index febbc0a..ec31f7d 100644
|
||||
--- a/drivers/bcma/main.c
|
||||
+++ b/drivers/bcma/main.c
|
||||
@@ -169,10 +169,8 @@ int bcma_bus_register(struct bcma_bus *bus)
|
||||
err = bcma_sprom_get(bus);
|
||||
if (err == -ENOENT) {
|
||||
pr_err("No SPROM available\n");
|
||||
- } else if (err) {
|
||||
+ } else if (err)
|
||||
pr_err("Failed to get SPROM: %d\n", err);
|
||||
- return -ENOENT;
|
||||
- }
|
||||
|
||||
/* Register found cores */
|
||||
bcma_register_cores(bus);
|
||||
--
|
||||
1.7.4.4
|
||||
|
||||
31
kernel.spec
31
kernel.spec
|
|
@ -827,10 +827,16 @@ Patch50111: iwlwifi-make-Tx-aggregation-enabled-on-ra-be-at-DEBU.patch
|
|||
Patch50112: ssb-fix-cardbus-slot-in-hostmode.patch
|
||||
Patch50113: iwlwifi-don-t-mess-up-QoS-counters-with-non-QoS-fram.patch
|
||||
Patch50114: mac80211-timeout-a-single-frame-in-the-rx-reorder-bu.patch
|
||||
|
||||
Patch50200: ath9k-use-WARN_ON_ONCE-in-ath_rc_get_highest_rix.patch
|
||||
Patch50201: ath9k-fix-a-WEP-crypto-related-regression.patch
|
||||
Patch50202: ath9k_hw-fix-a-RTS-CTS-timeout-regression.patch
|
||||
Patch50115: ath9k-use-WARN_ON_ONCE-in-ath_rc_get_highest_rix.patch
|
||||
Patch50116: mwifiex-handle-association-failure-case-correctly.patch
|
||||
Patch50117: ath9k-Fix-kernel-panic-during-driver-initilization.patch
|
||||
Patch50118: mwifiex-add-NULL-checks-in-driver-unload-path.patch
|
||||
Patch50119: ath9k-fix-a-WEP-crypto-related-regression.patch
|
||||
Patch50120: ath9k_hw-fix-a-RTS-CTS-timeout-regression.patch
|
||||
Patch50121: bcma-don-t-fail-for-bad-SPROM-CRC.patch
|
||||
Patch50122: zd1211rw-firmware-needs-duration_id-set-to-zero-for-.patch
|
||||
Patch50123: mac80211-Fix-a-rwlock-bad-magic-bug.patch
|
||||
Patch50124: rtlwifi-Modify-rtl_pci_init-to-return-0-on-success.patch
|
||||
|
||||
%endif
|
||||
|
||||
|
|
@ -1600,10 +1606,16 @@ ApplyPatch iwlwifi-make-Tx-aggregation-enabled-on-ra-be-at-DEBU.patch
|
|||
ApplyPatch ssb-fix-cardbus-slot-in-hostmode.patch
|
||||
ApplyPatch iwlwifi-don-t-mess-up-QoS-counters-with-non-QoS-fram.patch
|
||||
ApplyPatch mac80211-timeout-a-single-frame-in-the-rx-reorder-bu.patch
|
||||
|
||||
ApplyPatch ath9k-use-WARN_ON_ONCE-in-ath_rc_get_highest_rix.patch
|
||||
ApplyPatch mwifiex-handle-association-failure-case-correctly.patch
|
||||
ApplyPatch ath9k-Fix-kernel-panic-during-driver-initilization.patch
|
||||
ApplyPatch mwifiex-add-NULL-checks-in-driver-unload-path.patch
|
||||
ApplyPatch ath9k-fix-a-WEP-crypto-related-regression.patch
|
||||
ApplyPatch ath9k_hw-fix-a-RTS-CTS-timeout-regression.patch
|
||||
ApplyPatch bcma-don-t-fail-for-bad-SPROM-CRC.patch
|
||||
ApplyPatch zd1211rw-firmware-needs-duration_id-set-to-zero-for-.patch
|
||||
ApplyPatch mac80211-Fix-a-rwlock-bad-magic-bug.patch
|
||||
ApplyPatch rtlwifi-Modify-rtl_pci_init-to-return-0-on-success.patch
|
||||
|
||||
ApplyPatch rt2x00_fix_MCU_request_failures.patch
|
||||
|
||||
|
|
@ -2317,6 +2329,15 @@ fi
|
|||
# and build.
|
||||
|
||||
%changelog
|
||||
* Mon Feb 13 2012 John W. Linville <linville@redhat.com>
|
||||
- mwifiex: handle association failure case correctly
|
||||
- ath9k: Fix kernel panic during driver initilization
|
||||
- mwifiex: add NULL checks in driver unload path
|
||||
- bcma: don't fail for bad SPROM CRC
|
||||
- zd1211rw: firmware needs duration_id set to zero for non-pspoll frames
|
||||
- mac80211: Fix a rwlock bad magic bug
|
||||
- rtlwifi: Modify rtl_pci_init to return 0 on success
|
||||
|
||||
* Fri Feb 10 2012 Josh Boyer <jwboyer@redhat.com>
|
||||
- Patch to prevent NULL pointer dereference in sd_revalidate_disk (rhbz 754518)
|
||||
|
||||
|
|
|
|||
89
mac80211-Fix-a-rwlock-bad-magic-bug.patch
Normal file
89
mac80211-Fix-a-rwlock-bad-magic-bug.patch
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
From b57e6b560fc2a2742910ac5ca0eb2c46e45aeac2 Mon Sep 17 00:00:00 2001
|
||||
From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
|
||||
Date: Thu, 9 Feb 2012 19:59:43 +0530
|
||||
Subject: [PATCH] mac80211: Fix a rwlock bad magic bug
|
||||
|
||||
read_lock(&tpt_trig->trig.leddev_list_lock) is accessed via the path
|
||||
ieee80211_open (->) ieee80211_do_open (->) ieee80211_mod_tpt_led_trig
|
||||
(->) ieee80211_start_tpt_led_trig (->) tpt_trig_timer before initializing
|
||||
it.
|
||||
the intilization of this read/write lock happens via the path
|
||||
ieee80211_led_init (->) led_trigger_register, but we are doing
|
||||
'ieee80211_led_init' after 'ieeee80211_if_add' where we
|
||||
register netdev_ops.
|
||||
so we access leddev_list_lock before initializing it and causes the
|
||||
following bug in chrome laptops with AR928X cards with the following
|
||||
script
|
||||
|
||||
while true
|
||||
do
|
||||
sudo modprobe -v ath9k
|
||||
sleep 3
|
||||
sudo modprobe -r ath9k
|
||||
sleep 3
|
||||
done
|
||||
|
||||
BUG: rwlock bad magic on CPU#1, wpa_supplicant/358, f5b9eccc
|
||||
Pid: 358, comm: wpa_supplicant Not tainted 3.0.13 #1
|
||||
Call Trace:
|
||||
|
||||
[<8137b9df>] rwlock_bug+0x3d/0x47
|
||||
[<81179830>] do_raw_read_lock+0x19/0x29
|
||||
[<8137f063>] _raw_read_lock+0xd/0xf
|
||||
[<f9081957>] tpt_trig_timer+0xc3/0x145 [mac80211]
|
||||
[<f9081f3a>] ieee80211_mod_tpt_led_trig+0x152/0x174 [mac80211]
|
||||
[<f9076a3f>] ieee80211_do_open+0x11e/0x42e [mac80211]
|
||||
[<f9075390>] ? ieee80211_check_concurrent_iface+0x26/0x13c [mac80211]
|
||||
[<f9076d97>] ieee80211_open+0x48/0x4c [mac80211]
|
||||
[<812dbed8>] __dev_open+0x82/0xab
|
||||
[<812dc0c9>] __dev_change_flags+0x9c/0x113
|
||||
[<812dc1ae>] dev_change_flags+0x18/0x44
|
||||
[<8132144f>] devinet_ioctl+0x243/0x51a
|
||||
[<81321ba9>] inet_ioctl+0x93/0xac
|
||||
[<812cc951>] sock_ioctl+0x1c6/0x1ea
|
||||
[<812cc78b>] ? might_fault+0x20/0x20
|
||||
[<810b1ebb>] do_vfs_ioctl+0x46e/0x4a2
|
||||
[<810a6ebb>] ? fget_light+0x2f/0x70
|
||||
[<812ce549>] ? sys_recvmsg+0x3e/0x48
|
||||
[<810b1f35>] sys_ioctl+0x46/0x69
|
||||
[<8137fa77>] sysenter_do_call+0x12/0x2
|
||||
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Cc: Gary Morain <gmorain@google.com>
|
||||
Cc: Paul Stewart <pstew@google.com>
|
||||
Cc: Abhijit Pradhan <abhijit@qca.qualcomm.com>
|
||||
Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
|
||||
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
|
||||
Acked-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Tested-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
|
||||
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
---
|
||||
net/mac80211/main.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
|
||||
index 0a0d94a..b142bd4 100644
|
||||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -910,6 +910,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
|
||||
wiphy_debug(local->hw.wiphy, "Failed to initialize wep: %d\n",
|
||||
result);
|
||||
|
||||
+ ieee80211_led_init(local);
|
||||
+
|
||||
rtnl_lock();
|
||||
|
||||
result = ieee80211_init_rate_ctrl_alg(local,
|
||||
@@ -931,8 +933,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
|
||||
|
||||
rtnl_unlock();
|
||||
|
||||
- ieee80211_led_init(local);
|
||||
-
|
||||
local->network_latency_notifier.notifier_call =
|
||||
ieee80211_max_network_latency;
|
||||
result = pm_qos_add_notifier(PM_QOS_NETWORK_LATENCY,
|
||||
--
|
||||
1.7.4.4
|
||||
|
||||
66
mwifiex-add-NULL-checks-in-driver-unload-path.patch
Normal file
66
mwifiex-add-NULL-checks-in-driver-unload-path.patch
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
From 2da8cbf8a6b454296c9db7b57cac72d5a39e3aa7 Mon Sep 17 00:00:00 2001
|
||||
From: Amitkumar Karwar <akarwar@marvell.com>
|
||||
Date: Fri, 3 Feb 2012 20:34:02 -0800
|
||||
Subject: [PATCH] mwifiex: add NULL checks in driver unload path
|
||||
|
||||
If driver load is failed, sometimes few pointers may remain
|
||||
uninitialized ex. priv->wdev, priv->netdev, adapter->sleep_cfm
|
||||
This will cause NULL pointer dereferance while unloading the
|
||||
driver.
|
||||
|
||||
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
|
||||
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
|
||||
Signed-off-by: Bing Zhao <bzhao@marvell.com>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
---
|
||||
drivers/net/wireless/mwifiex/init.c | 3 ++-
|
||||
drivers/net/wireless/mwifiex/main.c | 12 ++++++++----
|
||||
2 files changed, 10 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
|
||||
index e05b417..1d0ec57 100644
|
||||
--- a/drivers/net/wireless/mwifiex/init.c
|
||||
+++ b/drivers/net/wireless/mwifiex/init.c
|
||||
@@ -382,7 +382,8 @@ mwifiex_free_adapter(struct mwifiex_adapter *adapter)
|
||||
|
||||
adapter->if_ops.cleanup_if(adapter);
|
||||
|
||||
- dev_kfree_skb_any(adapter->sleep_cfm);
|
||||
+ if (adapter->sleep_cfm)
|
||||
+ dev_kfree_skb_any(adapter->sleep_cfm);
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
|
||||
index 84be196..b728f54 100644
|
||||
--- a/drivers/net/wireless/mwifiex/main.c
|
||||
+++ b/drivers/net/wireless/mwifiex/main.c
|
||||
@@ -822,7 +822,9 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem)
|
||||
continue;
|
||||
|
||||
rtnl_lock();
|
||||
- mwifiex_del_virtual_intf(priv->wdev->wiphy, priv->netdev);
|
||||
+ if (priv->wdev && priv->netdev)
|
||||
+ mwifiex_del_virtual_intf(priv->wdev->wiphy,
|
||||
+ priv->netdev);
|
||||
rtnl_unlock();
|
||||
}
|
||||
|
||||
@@ -830,9 +832,11 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem)
|
||||
if (!priv)
|
||||
goto exit_remove;
|
||||
|
||||
- wiphy_unregister(priv->wdev->wiphy);
|
||||
- wiphy_free(priv->wdev->wiphy);
|
||||
- kfree(priv->wdev);
|
||||
+ if (priv->wdev) {
|
||||
+ wiphy_unregister(priv->wdev->wiphy);
|
||||
+ wiphy_free(priv->wdev->wiphy);
|
||||
+ kfree(priv->wdev);
|
||||
+ }
|
||||
|
||||
mwifiex_terminate_workqueue(adapter);
|
||||
|
||||
--
|
||||
1.7.4.4
|
||||
|
||||
67
mwifiex-handle-association-failure-case-correctly.patch
Normal file
67
mwifiex-handle-association-failure-case-correctly.patch
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
From b7097eb75fa11c302dcdec83f1dbfa874e0af0d1 Mon Sep 17 00:00:00 2001
|
||||
From: Amitkumar Karwar <akarwar@marvell.com>
|
||||
Date: Wed, 1 Feb 2012 20:41:43 -0800
|
||||
Subject: [PATCH] mwifiex: handle association failure case correctly
|
||||
|
||||
Currently even if association is failed "iw link" shows some
|
||||
information about connected BSS and "Tx timeout" error is seen in
|
||||
dmesg log.
|
||||
|
||||
This patch fixes below issues in the code to handle assoc failure
|
||||
case correctly.
|
||||
1) "status" variable in mwifiex_wait_queue_complete() is not
|
||||
correctly updated. Hence driver doesn't inform cfg80211 stack
|
||||
about association failure.
|
||||
2) During association network queues are stopped but carrier is
|
||||
not cleared, which gives Tx timeout error in failure case
|
||||
|
||||
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
|
||||
Signed-off-by: Bing Zhao <bzhao@marvell.com>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
---
|
||||
drivers/net/wireless/mwifiex/sta_ioctl.c | 8 +++++++-
|
||||
1 files changed, 7 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
|
||||
index 470ca75..b0fbf5d 100644
|
||||
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
|
||||
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
|
||||
@@ -54,7 +54,7 @@ int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list *mlist,
|
||||
int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter)
|
||||
{
|
||||
bool cancel_flag = false;
|
||||
- int status = adapter->cmd_wait_q.status;
|
||||
+ int status;
|
||||
struct cmd_ctrl_node *cmd_queued;
|
||||
|
||||
if (!adapter->cmd_queued)
|
||||
@@ -79,6 +79,8 @@ int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter)
|
||||
mwifiex_cancel_pending_ioctl(adapter);
|
||||
dev_dbg(adapter->dev, "cmd cancel\n");
|
||||
}
|
||||
+
|
||||
+ status = adapter->cmd_wait_q.status;
|
||||
adapter->cmd_wait_q.status = 0;
|
||||
|
||||
return status;
|
||||
@@ -240,6 +242,8 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
|
||||
|
||||
if (!netif_queue_stopped(priv->netdev))
|
||||
mwifiex_stop_net_dev_queue(priv->netdev, adapter);
|
||||
+ if (netif_carrier_ok(priv->netdev))
|
||||
+ netif_carrier_off(priv->netdev);
|
||||
|
||||
/* Clear any past association response stored for
|
||||
* application retrieval */
|
||||
@@ -271,6 +275,8 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
|
||||
|
||||
if (!netif_queue_stopped(priv->netdev))
|
||||
mwifiex_stop_net_dev_queue(priv->netdev, adapter);
|
||||
+ if (netif_carrier_ok(priv->netdev))
|
||||
+ netif_carrier_off(priv->netdev);
|
||||
|
||||
if (!ret) {
|
||||
dev_dbg(adapter->dev, "info: network found in scan"
|
||||
--
|
||||
1.7.4.4
|
||||
|
||||
40
rtlwifi-Modify-rtl_pci_init-to-return-0-on-success.patch
Normal file
40
rtlwifi-Modify-rtl_pci_init-to-return-0-on-success.patch
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
From c27111e5b8d6b1e9296f7075cdc35872f672b524 Mon Sep 17 00:00:00 2001
|
||||
From: Simon Graham <simon.graham@virtualcomputer.com>
|
||||
Date: Thu, 9 Feb 2012 09:55:13 -0500
|
||||
Subject: [PATCH] rtlwifi: Modify rtl_pci_init to return 0 on success
|
||||
|
||||
Fixes problem where caller would think routine succeeded when it failed
|
||||
leading to divide by zero panic.
|
||||
|
||||
Signed-off-by: Simon Graham <simon.graham@virtualcomputer.com>
|
||||
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
---
|
||||
drivers/net/wireless/rtlwifi/pci.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
|
||||
index 39e0907..9245d88 100644
|
||||
--- a/drivers/net/wireless/rtlwifi/pci.c
|
||||
+++ b/drivers/net/wireless/rtlwifi/pci.c
|
||||
@@ -1501,7 +1501,7 @@ static int rtl_pci_init(struct ieee80211_hw *hw, struct pci_dev *pdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
- return 1;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int rtl_pci_start(struct ieee80211_hw *hw)
|
||||
@@ -1870,7 +1870,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
|
||||
}
|
||||
|
||||
/* Init PCI sw */
|
||||
- err = !rtl_pci_init(hw, pdev);
|
||||
+ err = rtl_pci_init(hw, pdev);
|
||||
if (err) {
|
||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
|
||||
("Failed to init PCI.\n"));
|
||||
--
|
||||
1.7.4.4
|
||||
|
||||
51
zd1211rw-firmware-needs-duration_id-set-to-zero-for-.patch
Normal file
51
zd1211rw-firmware-needs-duration_id-set-to-zero-for-.patch
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
From e81a7bd55531a77d8c16d44766db4089c2983f1b Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Vanek <Tomas.Vanek@fbl.cz>
|
||||
Date: Sun, 5 Feb 2012 15:51:53 +0200
|
||||
Subject: [PATCH] zd1211rw: firmware needs duration_id set to zero for
|
||||
non-pspoll frames
|
||||
|
||||
Some devices (iwl5100) cannot connect to zd1211rw based AP. It appears that
|
||||
zd1211 firmware messes up duration_id field if it is not set to zero by driver.
|
||||
|
||||
Sniffing traffic shows that zd1211 is transmitting frames with duration_id bits
|
||||
14 and 15 set and other bits appearing random. Setting duration_id at driver to
|
||||
zero results zd1211 outputting sane duration_id. This means that firmware is
|
||||
setting correct values itself and expects duration_id to be zero in first
|
||||
place.
|
||||
|
||||
Looking at vendor driver shows that only PSPoll frames have duration_id set by
|
||||
driver, for other frames duration_id left zero.
|
||||
|
||||
Original bug-report and attached patch at:
|
||||
http://sourceforge.net/mailarchive/message.php?msg_id=28759111
|
||||
|
||||
Reported-by: Tomas Vanek <Tomas.Vanek@fbl.cz>
|
||||
[modified original patch from bug-report, added check for pspoll frame]
|
||||
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
---
|
||||
drivers/net/wireless/zd1211rw/zd_mac.c | 8 ++++++++
|
||||
1 files changed, 8 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
|
||||
index 0a70149..98a574a 100644
|
||||
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
|
||||
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
|
||||
@@ -866,6 +866,14 @@ static int fill_ctrlset(struct zd_mac *mac,
|
||||
|
||||
ZD_ASSERT(frag_len <= 0xffff);
|
||||
|
||||
+ /*
|
||||
+ * Firmware computes the duration itself (for all frames except PSPoll)
|
||||
+ * and needs the field set to 0 at input, otherwise firmware messes up
|
||||
+ * duration_id and sets bits 14 and 15 on.
|
||||
+ */
|
||||
+ if (!ieee80211_is_pspoll(hdr->frame_control))
|
||||
+ hdr->duration_id = 0;
|
||||
+
|
||||
txrate = ieee80211_get_tx_rate(mac->hw, info);
|
||||
|
||||
cs->modulation = txrate->hw_value;
|
||||
--
|
||||
1.7.4.4
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue