Commit ed3213c9 authored by David Gnedt's avatar David Gnedt Committed by John W. Linville

wl1251: fix channel switching in monitor mode

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: default avatarDavid Gnedt <david.gnedt@davizone.at>
Signed-off-by: default avatarPali Rohár <pali.rohar@gmail.com>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent dd4a560f
......@@ -615,8 +615,19 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
if (channel != wl->channel) {
wl->channel = channel;
/*
* 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;
}
......
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