* [PATCH 16/18] wl1251: fix channel switching in monitor mode
@ 2011-01-30 18:02 David Gnedt
2011-01-30 19:11 ` David Gnedt
2011-01-31 15:52 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: David Gnedt @ 2011-01-30 18:02 UTC (permalink / raw)
To: John W. Linville
Cc: linux-wireless, Kalle Valo, Grazvydas Ignotas,
Denis 'GNUtoo' Carikli
Use the ENABLE_RX command for channel switching when no interface is present
(monitor mode only).
The advantage of ENABLE_RX is that it leaves the tx data path disabled in
firmware, whereas the usual JOIN command seems to transmit some frames at
firmware level.
Signed-off-by: David Gnedt <david.gnedt@davizone.at>
---
drivers/net/wireless/wl1251/main.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c
index edafa98..c931a3a 100644
--- a/drivers/net/wireless/wl1251/main.c
+++ b/drivers/net/wireless/wl1251/main.c
@@ -610,8 +610,19 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
if (channel != wl->channel) {
wl->channel = channel;
- ret = wl1251_join(wl, wl->bss_type, wl->channel,
- wl->beacon_int, wl->dtim_period);
+ /*
+ * Use ENABLE_RX command for channel switching when no
+ * interface is present (monitor mode only).
+ * This leaves the tx path disabled in firmware, whereas
+ * the usual JOIN command seems to transmit some frames
+ * at firmware level.
+ */
+ if (wl->vif == NULL) {
+ ret = wl1251_cmd_data_path_rx(wl, wl->channel, 1);
+ } else {
+ ret = wl1251_join(wl, wl->bss_type, wl->channel,
+ wl->beacon_int, wl->dtim_period);
+ }
if (ret < 0)
goto out_sleep;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 16/18] wl1251: fix channel switching in monitor mode
2011-01-30 18:02 [PATCH 16/18] wl1251: fix channel switching in monitor mode David Gnedt
@ 2011-01-30 19:11 ` David Gnedt
2011-01-31 15:52 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: David Gnedt @ 2011-01-30 19:11 UTC (permalink / raw)
To: John W. Linville
Cc: linux-wireless, Kalle Valo, Grazvydas Ignotas,
Denis 'GNUtoo' Carikli
Use the ENABLE_RX command for channel switching when no interface is present
(monitor mode only).
The advantage of ENABLE_RX is that it leaves the tx data path disabled in
firmware, whereas the usual JOIN command seems to transmit some frames at
firmware level.
Signed-off-by: David Gnedt <david.gnedt@davizone.at>
---
Sorry for the partly broken patches, I thought I configured my client the
right way. I tried to stop the mails at my mailserver, but it was mostly
already too late.
---
drivers/net/wireless/wl1251/main.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c
index edafa98..c931a3a 100644
--- a/drivers/net/wireless/wl1251/main.c
+++ b/drivers/net/wireless/wl1251/main.c
@@ -610,8 +610,19 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
if (channel != wl->channel) {
wl->channel = channel;
- ret = wl1251_join(wl, wl->bss_type, wl->channel,
- wl->beacon_int, wl->dtim_period);
+ /*
+ * Use ENABLE_RX command for channel switching when no
+ * interface is present (monitor mode only).
+ * This leaves the tx path disabled in firmware, whereas
+ * the usual JOIN command seems to transmit some frames
+ * at firmware level.
+ */
+ if (wl->vif == NULL) {
+ ret = wl1251_cmd_data_path_rx(wl, wl->channel, 1);
+ } else {
+ ret = wl1251_join(wl, wl->bss_type, wl->channel,
+ wl->beacon_int, wl->dtim_period);
+ }
if (ret < 0)
goto out_sleep;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 16/18] wl1251: fix channel switching in monitor mode
2011-01-30 18:02 [PATCH 16/18] wl1251: fix channel switching in monitor mode David Gnedt
2011-01-30 19:11 ` David Gnedt
@ 2011-01-31 15:52 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2011-01-31 15:52 UTC (permalink / raw)
To: David Gnedt
Cc: John W. Linville, linux-wireless, Grazvydas Ignotas,
Denis 'GNUtoo' Carikli
David Gnedt <david.gnedt@davizone.at> writes:
> Use the ENABLE_RX command for channel switching when no interface is
> present (monitor mode only). The advantage of ENABLE_RX is that it
> leaves the tx data path disabled in firmware, whereas the usual JOIN
> command seems to transmit some frames at firmware level.
But what about packet injection in that case? Doesn't use ENABLE_RX
make it impossible to inject packets?
--
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-31 15:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-30 18:02 [PATCH 16/18] wl1251: fix channel switching in monitor mode David Gnedt
2011-01-30 19:11 ` David Gnedt
2011-01-31 15:52 ` Kalle Valo
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).