bbd9ebecee
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
52 lines
1.9 KiB
Diff
52 lines
1.9 KiB
Diff
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
|
|
|