aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-11-05 16:39:42 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-05 16:39:42 (GMT)
commit09d660b9e3c4b24df6eff8fe409344ef1ad1507a (patch)
treeb6363ef0b0fba5ad9f0cf9e05b37e12944530220
parent8eada5ca139e09bbf14362e43cccabe4c244521a (diff)
downloadhostap-09d660b9e3c4b24df6eff8fe409344ef1ad1507a.zip
hostap-09d660b9e3c4b24df6eff8fe409344ef1ad1507a.tar.gz
hostap-09d660b9e3c4b24df6eff8fe409344ef1ad1507a.tar.bz2
P2P: Clear off_channel_freq when requesting new remain-on-channel
The driver may end up leaving the current channel when we request a new remain-on-channel and as such, it is better not assume we can start new operations like sending an Action frame on the previous off-channel.
-rw-r--r--wpa_supplicant/p2p_supplicant.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 79bbab3..eb4b238 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -569,9 +569,11 @@ static void wpas_send_action_cb(void *eloop_ctx, void *timeout_ctx)
"driver to remain on channel (%u "
"MHz) for Action Frame TX",
wpa_s->pending_action_freq);
- } else
+ } else {
+ wpa_s->off_channel_freq = 0;
wpa_s->roc_waiting_drv_freq =
wpa_s->pending_action_freq;
+ }
}
return;
}
@@ -709,6 +711,7 @@ static int wpas_send_action(void *ctx, unsigned int freq, const u8 *dst,
"Frame TX", freq);
return -1;
}
+ wpa_s->off_channel_freq = 0;
wpa_s->roc_waiting_drv_freq = freq;
return 0;
@@ -1098,6 +1101,7 @@ static int wpas_start_listen(void *ctx, unsigned int freq,
wpa_s->pending_listen_freq = 0;
return -1;
}
+ wpa_s->off_channel_freq = 0;
wpa_s->roc_waiting_drv_freq = freq;
return 0;