From: Johannes Berg Date: Tue, 20 Sep 2011 09:59:09 +0000 (+0200) Subject: P2P: Fix action done handling for driver-based off-channel TX X-Git-Tag: hostap-1-bp~216 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3a26a2c9dfef45896603abb529a38f0e88c361fa;p=thirdparty%2Fhostap.git P2P: Fix action done handling for driver-based off-channel TX The action done handling needs to abort an off-channel period since one might have been used for example for GO negotiation and after action done the code assumes it can start a new off-channel period. This fixes a bug I introduced when adding support for in-kernel off-channel transmissions. Reported-by: Reinette Chatre Signed-off-by: Johannes Berg --- diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 3b4e88799..f0451d2c5 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -816,11 +816,11 @@ static void wpas_send_action_done(void *ctx) wpa_printf(MSG_DEBUG, "P2P: Action frame sequence done notification"); wpabuf_free(wpa_s->pending_action_tx); wpa_s->pending_action_tx = NULL; - if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX) { - if (wpa_s->action_tx_wait_time) - wpa_drv_send_action_cancel_wait(wpa_s); - wpa_s->off_channel_freq = 0; - } else if (wpa_s->off_channel_freq || wpa_s->roc_waiting_drv_freq) { + if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX && + wpa_s->action_tx_wait_time) + wpa_drv_send_action_cancel_wait(wpa_s); + + if (wpa_s->off_channel_freq || wpa_s->roc_waiting_drv_freq) { wpa_drv_cancel_remain_on_channel(wpa_s); wpa_s->off_channel_freq = 0; wpa_s->roc_waiting_drv_freq = 0;