aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1211rw
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2007-03-25 19:59:47 -0400
committerJeff Garzik <jeff@garzik.org>2007-04-28 11:01:01 -0400
commit44713b1da5a78d722dc0c03a87dc9ddf46668f80 (patch)
tree88ed2038cabe31bccf6c728b2e57e4f6ea34e559 /drivers/net/wireless/zd1211rw
parentd2d7c052106ebee75952da4dd547f40a1673d9e0 (diff)
[PATCH] zd1211rw: Don't handle broken frames in monitor mode
Using monitor mode, Johannes Berg observed out that lots of corrupted and otherwise invalid frames were being passed to the host. When in monitor mode we were disabling the hardware filtering here, but this is not how monitor mode should work. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index 19172f57152..6753d240c16 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -156,17 +156,8 @@ void zd_mac_clear(struct zd_mac *mac)
156static int reset_mode(struct zd_mac *mac) 156static int reset_mode(struct zd_mac *mac)
157{ 157{
158 struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); 158 struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac);
159 struct zd_ioreq32 ioreqs[] = { 159 u32 filter = (ieee->iw_mode == IW_MODE_MONITOR) ? ~0 : STA_RX_FILTER;
160 { CR_RX_FILTER, STA_RX_FILTER }, 160 return zd_iowrite32(&mac->chip, CR_RX_FILTER, filter);
161 { CR_SNIFFER_ON, 0U },
162 };
163
164 if (ieee->iw_mode == IW_MODE_MONITOR) {
165 ioreqs[0].value = 0xffffffff;
166 ioreqs[1].value = 0x1;
167 }
168
169 return zd_iowrite32a(&mac->chip, ioreqs, ARRAY_SIZE(ioreqs));
170} 161}
171 162
172int zd_mac_open(struct net_device *netdev) 163int zd_mac_open(struct net_device *netdev)