diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2010-10-20 19:41:20 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2010-10-20 19:44:21 +0300 |
commit | 3f9285ff198833e4f0b8c24fa70f8ae478e52744 (patch) | |
tree | 66da155d0bf84539e9952913b2e61aae81d5c641 /src/p2p/p2p_go_neg.c | |
parent | 0b8889d8e5de4c823aba92cff2ecabe5ed04b3c6 (diff) | |
download | external_wpa_supplicant_8_ti-3f9285ff198833e4f0b8c24fa70f8ae478e52744.zip external_wpa_supplicant_8_ti-3f9285ff198833e4f0b8c24fa70f8ae478e52744.tar.gz external_wpa_supplicant_8_ti-3f9285ff198833e4f0b8c24fa70f8ae478e52744.tar.bz2 |
P2P: Delay send_action call if p2p_scan is in progress
In order to avoid confusing the driver with a new remain-on-channel
request, delay sending of a new Action frame if the driver indicates
Action frame RX diromg a scan.
Diffstat (limited to 'src/p2p/p2p_go_neg.c')
-rw-r--r-- | src/p2p/p2p_go_neg.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c index 55c576d..5b70f7a 100644 --- a/src/p2p/p2p_go_neg.c +++ b/src/p2p/p2p_go_neg.c @@ -209,11 +209,9 @@ int p2p_connect_send(struct p2p_data *p2p, struct p2p_device *dev) p2p->pending_action_state = P2P_PENDING_GO_NEG_REQUEST; p2p->go_neg_peer = dev; dev->flags |= P2P_DEV_WAIT_GO_NEG_RESPONSE; - if (p2p->cfg->send_action(p2p->cfg->cb_ctx, freq, - dev->p2p_device_addr, p2p->cfg->dev_addr, - dev->p2p_device_addr, - wpabuf_head(req), wpabuf_len(req), 200) < 0) - { + if (p2p_send_action(p2p, freq, dev->p2p_device_addr, + p2p->cfg->dev_addr, dev->p2p_device_addr, + wpabuf_head(req), wpabuf_len(req), 200) < 0) { wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Failed to send Action frame"); /* Use P2P find to recover and retry */ @@ -616,10 +614,9 @@ fail: } else p2p->pending_action_state = P2P_PENDING_GO_NEG_RESPONSE_FAILURE; - if (p2p->cfg->send_action(p2p->cfg->cb_ctx, freq, sa, - p2p->cfg->dev_addr, p2p->cfg->dev_addr, - wpabuf_head(resp), wpabuf_len(resp), 200) < - 0) { + if (p2p_send_action(p2p, freq, sa, p2p->cfg->dev_addr, + p2p->cfg->dev_addr, + wpabuf_head(resp), wpabuf_len(resp), 200) < 0) { wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Failed to send Action frame"); } @@ -982,10 +979,8 @@ fail: freq = rx_freq; else freq = dev->listen_freq; - if (p2p->cfg->send_action(p2p->cfg->cb_ctx, freq, sa, - p2p->cfg->dev_addr, sa, - wpabuf_head(conf), wpabuf_len(conf), 200) < - 0) { + if (p2p_send_action(p2p, freq, sa, p2p->cfg->dev_addr, sa, + wpabuf_head(conf), wpabuf_len(conf), 200) < 0) { wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Failed to send Action frame"); p2p_go_neg_failed(p2p, dev, -1); |