aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-11-05 16:39:15 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-05 16:39:15 (GMT)
commit8eada5ca139e09bbf14362e43cccabe4c244521a (patch)
treea4707951c6aa5880c88de11a5a91eb9c9ad169b3
parent9bcf9541a748b63bcc3a81e67e5087f8b566d3cb (diff)
downloadhostap-8eada5ca139e09bbf14362e43cccabe4c244521a.zip
hostap-8eada5ca139e09bbf14362e43cccabe4c244521a.tar.gz
hostap-8eada5ca139e09bbf14362e43cccabe4c244521a.tar.bz2
P2P: Cancel pending remain-on-channel request when stopping Listen
If we have already asked the driver to start a new remain-on-channel, we need to cancel it even if the actual remain-on-channel has not yet started at the point when a new operation or timeout etc. triggers Listen state to be stopped.
-rw-r--r--wpa_supplicant/p2p_supplicant.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index f082eef..79bbab3 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -721,7 +721,7 @@ 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->off_channel_freq) {
+ 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;
@@ -995,7 +995,7 @@ void wpas_go_neg_completed(void *ctx, struct p2p_go_neg_results *res)
{
struct wpa_supplicant *wpa_s = ctx;
- if (wpa_s->off_channel_freq) {
+ 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;