aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-04-04 12:32:09 (GMT)
committerJouni Malinen <j@w1.fi>2014-01-27 19:44:30 (GMT)
commit74df9ecd4ad46dbd9e4a0e6739980d5337f7ba20 (patch)
tree204e56dc41ca8c3df1025daf23f4d6f9ce4493db /wpa_supplicant
parent201b0f5fa6a4cc48ec9c30019a2e412d0e16756d (diff)
downloadhostap-74df9ecd4ad46dbd9e4a0e6739980d5337f7ba20.zip
hostap-74df9ecd4ad46dbd9e4a0e6739980d5337f7ba20.tar.gz
hostap-74df9ecd4ad46dbd9e4a0e6739980d5337f7ba20.tar.bz2
P2P NFC: Do not try to join peer if both devices are already GO
Send a P2P-NFC-BOTH-GO event to upper layers to determine what to do in case both devices going through NFC connection handover are already operating as a GO. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/p2p_supplicant.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 4375d9b..fa8c648 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -7212,6 +7212,15 @@ static int wpas_p2p_nfc_connection_handover(struct wpa_supplicant *wpa_s,
if (res)
return res;
+ if (params.next_step == NO_ACTION)
+ return 0;
+
+ if (params.next_step == BOTH_GO) {
+ wpa_msg(wpa_s, MSG_INFO, P2P_EVENT_NFC_BOTH_GO "peer=" MACSTR,
+ MAC2STR(params.peer->p2p_device_addr));
+ return 0;
+ }
+
wpabuf_free(wpa_s->p2p_oob_dev_pw);
wpa_s->p2p_oob_dev_pw = NULL;
@@ -7261,6 +7270,8 @@ static int wpas_p2p_nfc_connection_handover(struct wpa_supplicant *wpa_s,
switch (params.next_step) {
case NO_ACTION:
+ case BOTH_GO:
+ /* already covered above */
return 0;
case JOIN_GROUP:
return wpas_p2p_nfc_join_group(wpa_s, &params);