linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] zd1211rw-mac80211: Fix for monitor mode bug
@ 2007-03-25 23:18 Daniel Drake
  2007-03-26  9:54 ` Jiri Benc
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Drake @ 2007-03-25 23:18 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, netdev, kune

From: Ulrich Kunitz <kune@deine-taler.de>

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 <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
---
 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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-03-28 10:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-25 23:18 [PATCH] zd1211rw-mac80211: Fix for monitor mode bug Daniel Drake
2007-03-26  9:54 ` Jiri Benc
2007-03-26  9:59   ` Johannes Berg
2007-03-26 10:14     ` Andy Green
2007-03-26 11:28       ` Michael Buesch
2007-03-26 11:31         ` Johannes Berg
2007-03-26 20:39           ` Michael Buesch
2007-03-28  9:19             ` Johannes Berg
2007-03-28  9:55               ` Michael Buesch
2007-03-28 10:18                 ` PLCP header information (was: Re: [PATCH] zd1211rw-mac80211: Fix for monitor mode bug) Johannes Berg
2007-03-26 10:28     ` [PATCH] zd1211rw-mac80211: Fix for monitor mode bug Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).