diff options
author | Daniel Drake <dsd@gentoo.org> | 2007-03-25 19:59:47 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-04-28 11:01:01 -0400 |
commit | 44713b1da5a78d722dc0c03a87dc9ddf46668f80 (patch) | |
tree | 88ed2038cabe31bccf6c728b2e57e4f6ea34e559 /drivers/net/wireless/zd1211rw | |
parent | d2d7c052106ebee75952da4dd547f40a1673d9e0 (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.c | 13 |
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) | |||
156 | static int reset_mode(struct zd_mac *mac) | 156 | static 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 | ||
172 | int zd_mac_open(struct net_device *netdev) | 163 | int zd_mac_open(struct net_device *netdev) |