wl1271: Flush TX buffers to air before going to idle
The mac80211 changes to idle almost immediately after transmitting some frames, such as deauth etc. When going to idle, the wl1271 is disconnected, which causes TX frames already on buffers, but not yet transmitted, to be deleted. To make sure deauth frames reach the air, allow the TX buffers to flush before proceeding to idle. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
0d58cbff24
commit
781608c413
@@ -1051,7 +1051,7 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw,
|
||||
mutex_lock(&wl->mutex);
|
||||
|
||||
/* let's notify MAC80211 about the remaining pending TX frames */
|
||||
wl1271_tx_flush(wl);
|
||||
wl1271_tx_reset(wl);
|
||||
wl1271_power_off(wl);
|
||||
|
||||
memset(wl->bssid, 0, ETH_ALEN);
|
||||
@@ -1298,6 +1298,15 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
conf->power_level,
|
||||
conf->flags & IEEE80211_CONF_IDLE ? "idle" : "in use");
|
||||
|
||||
/*
|
||||
* mac80211 will go to idle nearly immediately after transmitting some
|
||||
* frames, such as the deauth. To make sure those frames reach the air,
|
||||
* wait here until the TX queue is fully flushed.
|
||||
*/
|
||||
if ((changed & IEEE80211_CONF_CHANGE_IDLE) &&
|
||||
(conf->flags & IEEE80211_CONF_IDLE))
|
||||
wl1271_tx_flush(wl);
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
|
||||
if (unlikely(wl->state == WL1271_STATE_OFF))
|
||||
|
Reference in New Issue
Block a user