aboutsummaryrefslogtreecommitdiffstats
path: root/src/p2p
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-12-20 22:18:03 (GMT)
committerJouni Malinen <j@w1.fi>2016-12-20 22:18:03 (GMT)
commit7655bd7388f82e67a2d0461ccab0ae037bb8cd77 (patch)
tree2362229fbf372eba050e42260be1337146d44c6e /src/p2p
parent1f0fdaf0e45fac76fcd6d2382e28e0298e1edef0 (diff)
downloadhostap-7655bd7388f82e67a2d0461ccab0ae037bb8cd77.zip
hostap-7655bd7388f82e67a2d0461ccab0ae037bb8cd77.tar.gz
hostap-7655bd7388f82e67a2d0461ccab0ae037bb8cd77.tar.bz2
P2P: Do not use wait_time for SD Response TX without fragmentation
The full SD Response frame is not going to be followed by another Action frame from the peer, so remove the 200 ms wait time from the offchannel TX command in that case. This avoids leaving a 200 ms lock on the radio to remain on the channel unnecessarily. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/p2p')
-rw-r--r--src/p2p/p2p_sd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/p2p/p2p_sd.c b/src/p2p/p2p_sd.c
index a8bc5ba..d2fb4b5 100644
--- a/src/p2p/p2p_sd.c
+++ b/src/p2p/p2p_sd.c
@@ -426,6 +426,7 @@ void p2p_sd_response(struct p2p_data *p2p, int freq, const u8 *dst,
{
struct wpabuf *resp;
size_t max_len;
+ unsigned int wait_time = 200;
/*
* In the 60 GHz, we have a smaller maximum frame length for management
@@ -460,6 +461,7 @@ void p2p_sd_response(struct p2p_data *p2p, int freq, const u8 *dst,
1, p2p->srv_update_indic, NULL);
} else {
p2p_dbg(p2p, "SD response fits in initial response");
+ wait_time = 0; /* no more SD frames in the sequence */
resp = p2p_build_sd_response(dialog_token,
WLAN_STATUS_SUCCESS, 0,
p2p->srv_update_indic, resp_tlvs);
@@ -470,7 +472,7 @@ void p2p_sd_response(struct p2p_data *p2p, int freq, const u8 *dst,
p2p->pending_action_state = P2P_NO_PENDING_ACTION;
if (p2p_send_action(p2p, freq, dst, p2p->cfg->dev_addr,
p2p->cfg->dev_addr,
- wpabuf_head(resp), wpabuf_len(resp), 200) < 0)
+ wpabuf_head(resp), wpabuf_len(resp), wait_time) < 0)
p2p_dbg(p2p, "Failed to send Action frame");
wpabuf_free(resp);