linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] zd1211rw: Experimental change to add proper monitor support
@ 2010-02-14 23:34 Benoit Papillault
  2010-02-14 23:34 ` [PATCH 2/2] zd1211rw: Set hardware BSSID and set hardware IBSS mode Benoit Papillault
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Benoit Papillault @ 2010-02-14 23:34 UTC (permalink / raw)
  To: dsd, kune; +Cc: linux-wireless, zd1211-devs, Benoit Papillault

Without this patch, monitor mode does not returns all frames. With this patch,
the performance are quite poor if we create a monitor interface. Note :
creating a monitor interface with the "cook" flag has no impact on performance.

Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
---
 drivers/net/wireless/zd1211rw/zd_mac.c |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index 2d555cc..9cb6cbc 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -904,8 +904,26 @@ static int zd_op_config(struct ieee80211_hw *hw, u32 changed)
 {
 	struct zd_mac *mac = zd_hw_mac(hw);
 	struct ieee80211_conf *conf = &hw->conf;
+	int ret;
 
-	return zd_chip_set_channel(&mac->chip, conf->channel->hw_value);
+	if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
+		/*
+		 * Warning : enabling this register kills RX & TX
+		 * performance
+		 */
+		u32 cr_sniffer = !!(conf->flags & IEEE80211_CONF_MONITOR);
+		ret = zd_iowrite32(&mac->chip, CR_SNIFFER_ON, cr_sniffer);
+		if (!ret)
+			return ret;
+	}
+
+	if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
+		ret = zd_chip_set_channel(&mac->chip, conf->channel->hw_value);
+		if (!ret)
+			return ret;
+	}
+
+	return 0;
 }
 
 static void zd_process_intr(struct work_struct *work)
-- 
1.5.6.5


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

end of thread, other threads:[~2010-02-15 22:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-14 23:34 [PATCH 1/2] zd1211rw: Experimental change to add proper monitor support Benoit Papillault
2010-02-14 23:34 ` [PATCH 2/2] zd1211rw: Set hardware BSSID and set hardware IBSS mode Benoit Papillault
2010-02-15  0:28 ` [PATCH 1/2] zd1211rw: Experimental change to add proper monitor support Gábor Stefanik
2010-02-15  7:24   ` [zd1211-devs] " Benoit PAPILLAULT
2010-02-15  7:33 ` [PATCH v2] zd1211rw: Set hardware BSSID and set hardware IBSS mode Benoit Papillault
2010-02-15 11:42   ` Gábor Stefanik
2010-02-15 22:26     ` Benoit PAPILLAULT

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).