Commit 44713b1d authored by Daniel Drake's avatar Daniel Drake Committed by Jeff Garzik

[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: default avatarDaniel Drake <dsd@gentoo.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d2d7c052
...@@ -156,17 +156,8 @@ void zd_mac_clear(struct zd_mac *mac) ...@@ -156,17 +156,8 @@ void zd_mac_clear(struct zd_mac *mac)
static int reset_mode(struct zd_mac *mac) static int reset_mode(struct zd_mac *mac)
{ {
struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac);
struct zd_ioreq32 ioreqs[] = { u32 filter = (ieee->iw_mode == IW_MODE_MONITOR) ? ~0 : STA_RX_FILTER;
{ CR_RX_FILTER, STA_RX_FILTER }, return zd_iowrite32(&mac->chip, CR_RX_FILTER, filter);
{ CR_SNIFFER_ON, 0U },
};
if (ieee->iw_mode == IW_MODE_MONITOR) {
ioreqs[0].value = 0xffffffff;
ioreqs[1].value = 0x1;
}
return zd_iowrite32a(&mac->chip, ioreqs, ARRAY_SIZE(ioreqs));
} }
int zd_mac_open(struct net_device *netdev) int zd_mac_open(struct net_device *netdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment