diff options
author | David Gnedt <david.gnedt@davizone.at> | 2014-01-07 13:10:14 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-01-09 16:56:08 +0100 |
commit | c8909e5a275bfb57dc525d6551ed572e118e2eea (patch) | |
tree | e7cada306a872a763cc58ab42695aa7b6380b138 /drivers/net/wireless/ti/wl1251/main.c | |
parent | wl1251: fix channel switching in monitor mode (diff) | |
download | linux-c8909e5a275bfb57dc525d6551ed572e118e2eea.tar.xz linux-c8909e5a275bfb57dc525d6551ed572e118e2eea.zip |
wl1251: enable tx path in monitor mode if necessary for packet injection
If necessary enable the tx path in monitor mode for packet injection using
the JOIN command with BSS_TYPE_STA_BSS and zero BSSID.
Signed-off-by: David Gnedt <david.gnedt@davizone.at>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ti/wl1251/main.c')
-rw-r--r-- | drivers/net/wireless/ti/wl1251/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c index 855026a34e45..5a265a24f1fe 100644 --- a/drivers/net/wireless/ti/wl1251/main.c +++ b/drivers/net/wireless/ti/wl1251/main.c @@ -486,6 +486,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw) wl->rssi_thold = 0; wl->channel = WL1251_DEFAULT_CHANNEL; wl->monitor_present = false; + wl->joined = false; wl1251_debugfs_reset(wl); @@ -545,6 +546,7 @@ static void wl1251_op_remove_interface(struct ieee80211_hw *hw, mutex_lock(&wl->mutex); wl1251_debug(DEBUG_MAC80211, "mac80211 remove interface"); wl->vif = NULL; + memset(wl->bssid, 0, ETH_ALEN); mutex_unlock(&wl->mutex); } @@ -623,6 +625,7 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) * at firmware level. */ if (wl->vif == NULL) { + wl->joined = false; ret = wl1251_cmd_data_path_rx(wl, wl->channel, 1); } else { ret = wl1251_join(wl, wl->bss_type, wl->channel, @@ -1507,7 +1510,9 @@ struct ieee80211_hw *wl1251_alloc_hw(void) INIT_DELAYED_WORK(&wl->elp_work, wl1251_elp_work); wl->channel = WL1251_DEFAULT_CHANNEL; wl->monitor_present = false; + wl->joined = false; wl->scanning = false; + wl->bss_type = MAX_BSS_TYPE; wl->default_key = 0; wl->listen_int = 1; wl->rx_counter = 0; |