STALE7020d

[PATCH] zd1211rw-mac80211: Fix for monitor mode bug

From: Daniel Drake <hidden>
Date: 2007-03-25 23:18:17
Also in: linux-wireless
Subsystem: networking drivers (wireless), the rest · Maintainers: Johannes Berg, Linus Torvalds

From: Ulrich Kunitz <redacted>

The ZD1211 supports the delivery of packets with a wrong CRC value
to the host. We switched that feature on in monitor mode, so that
incomplete packets were delivered.

This problem has been reported to bugzilla.kernel.org as bug 8152.
This patch fixes it for the mac80211 stack.

Signed-off-by: Ulrich Kunitz <redacted>
Signed-off-by: Daniel Drake <redacted>
---
 drivers/net/wireless/mac80211/zd1211rw/zd_mac.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/mac80211/zd1211rw/zd_mac.c b/drivers/net/wireless/mac80211/zd1211rw/zd_mac.c
index 097f614..65eabfa 100644
--- a/drivers/net/wireless/mac80211/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/mac80211/zd1211rw/zd_mac.c
@@ -91,17 +91,9 @@ void zd_mac_clear(struct zd_mac *mac)
 
 static int reset_mode(struct zd_mac *mac)
 {
-	struct zd_ioreq32 ioreqs[] = {
-		{ CR_RX_FILTER, STA_RX_FILTER },
-		{ CR_SNIFFER_ON, 0U },
-	};
-
-	if (mac->mode == IEEE80211_IF_TYPE_MNTR) {
-		ioreqs[0].value = 0xffffffff;
-		ioreqs[1].value = 0x1;
-	}
+	u32 filter = mac->mode == IEEE80211_IF_TYPE_MNTR ? ~0 : STA_RX_FILTER;
 
-	return zd_iowrite32a(&mac->chip, ioreqs, ARRAY_SIZE(ioreqs));
+	return zd_iowrite32(&mac->chip, CR_RX_FILTER, filter);
 }
 
 static int zd_mac_open(struct ieee80211_hw *dev)
-- 
1.5.0.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help