From 2c0d0ae370f72fbe6248feed7ea0635303e3dc5a Mon Sep 17 00:00:00 2001 From: Matti Gottlieb Date: Thu, 10 Dec 2015 12:56:08 +0200 Subject: [PATCH] GAS: End remain-on-channel due to delayed GAS comeback request During the sequence of exchanging GAS frames with the AP, the AP can request to come back in X amount of time and resend the GAS request. Previously, wpa_supplicant did not terminate the remain-on-channel session, but rather waited until the requested comeback delay had expired, and then tried to send the GAS frame (potentially to save the time that is required to schedule a new remain on channel flow). This might cause unnecessary idle time (can be close to 1000 ms) in which the device might be off-channel. Ending the current remain-on-channel session and then rescheduling makes better usage of the time in this case. End remain-on-channel session due to receiving a delayed GAS comeback request from the AP. Signed-off-by: Matti Gottlieb --- wpa_supplicant/gas_query.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wpa_supplicant/gas_query.c b/wpa_supplicant/gas_query.c index 10ecce7b4..65dec2b14 100644 --- a/wpa_supplicant/gas_query.c +++ b/wpa_supplicant/gas_query.c @@ -319,6 +319,8 @@ static void gas_query_tx_comeback_req_delay(struct gas_query *gas, { unsigned int secs, usecs; + offchannel_send_action_done(gas->wpa_s); + secs = (comeback_delay * 1024) / 1000000; usecs = comeback_delay * 1024 - secs * 1000000; wpa_printf(MSG_DEBUG, "GAS: Send comeback request to " MACSTR