P2P: Do not use wait_time for SD Response TX for last fragmentation
The last SD Response frame fragment 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.
This is similar to commit 7655bd7388
('P2P: Do not use wait_time for SD Response TX without fragmentation').
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
0e947f32b4
commit
2971da270f
1 changed files with 3 additions and 1 deletions
|
@ -625,6 +625,7 @@ void p2p_rx_gas_comeback_req(struct p2p_data *p2p, const u8 *sa,
|
||||||
u8 dialog_token;
|
u8 dialog_token;
|
||||||
size_t frag_len, max_len;
|
size_t frag_len, max_len;
|
||||||
int more = 0;
|
int more = 0;
|
||||||
|
unsigned int wait_time = 200;
|
||||||
|
|
||||||
wpa_hexdump(MSG_DEBUG, "P2P: RX GAS Comeback Request", data, len);
|
wpa_hexdump(MSG_DEBUG, "P2P: RX GAS Comeback Request", data, len);
|
||||||
if (len < 1)
|
if (len < 1)
|
||||||
|
@ -677,12 +678,13 @@ void p2p_rx_gas_comeback_req(struct p2p_data *p2p, const u8 *sa,
|
||||||
p2p_dbg(p2p, "All fragments of SD response sent");
|
p2p_dbg(p2p, "All fragments of SD response sent");
|
||||||
wpabuf_free(p2p->sd_resp);
|
wpabuf_free(p2p->sd_resp);
|
||||||
p2p->sd_resp = NULL;
|
p2p->sd_resp = NULL;
|
||||||
|
wait_time = 0; /* no more SD frames in the sequence */
|
||||||
}
|
}
|
||||||
|
|
||||||
p2p->pending_action_state = P2P_NO_PENDING_ACTION;
|
p2p->pending_action_state = P2P_NO_PENDING_ACTION;
|
||||||
if (p2p_send_action(p2p, rx_freq, sa, p2p->cfg->dev_addr,
|
if (p2p_send_action(p2p, rx_freq, sa, p2p->cfg->dev_addr,
|
||||||
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");
|
p2p_dbg(p2p, "Failed to send Action frame");
|
||||||
|
|
||||||
wpabuf_free(resp);
|
wpabuf_free(resp);
|
||||||
|
|
Loading…
Reference in a new issue