P2PS: Fix PD PIN event notifications
authorMax Stepanov <Max.Stepanov@intel.com>
Thu, 30 Jul 2015 06:00:00 +0000 (09:00 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 6 Aug 2015 10:56:01 +0000 (13:56 +0300)
commit93f22b4583e25c5e66a0176da1fbd33414894de9
treefa10c75273ed393c4033c7b5e2ed4783e525d7d3
parentab653ed2f6268708b553467937593515fc04bc4d
P2PS: Fix PD PIN event notifications

Change P2PS P2P-PROV-SHOW-PIN/P2P-PROV-ENTER-PIN event notifications
on PD Request/Response handling to meet required P2PS behavior.

The new implemented scheme:
1. For a legacy P2P provision discovery the event behavior remains
   without changes
2. P2PS PD, advertiser method: DISPLAY, autoaccept: TRUE:
   Advertiser: SHOW-PIN on PD request replied with a status SUCCESS
   Seeker: ENTER-PIN on PD response received with a status SUCCESS
3. P2PS PD, advertiser method: DISPLAY, autoaccept: FALSE:
   Advertiser: SHOW-PIN on PD request replied with a status
     INFO_CURRENTLY_UNAVAILABLE
   Seeker: ENTER-PIN on Follow-on PD request with a status
     SUCCESS_DEFERRED
4. P2PS PD, advertiser method: KEYPAD, autoaccept: TRUE/FALSE:
   Advertiser: ENTER-PIN on PD request replied with a status
     INFO_CURRENTLY_UNAVAILABLE
   Seeker: SHOW-PIN on PD response received with a status
     INFO_CURRENTLY_UNAVAILABLE

This change in behavior breaks the existing test cases
p2ps_connect_keypad_method_nonautoaccept and
p2ps_connect_display_method_nonautoaccept. Those will be fixed in a
followup commit.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
src/p2p/p2p.h
src/p2p/p2p_pd.c
wpa_supplicant/ctrl_iface.c