diff --git a/wpa_supplicant-2.9_standard/src/p2p/p2p.c b/wpa_supplicant-2.9_standard/src/p2p/p2p.c index d8b4f21ee94d90bacdc50aaaf00e3b6af934ba18..b865b877e3ef57d79a2d3ad60d9fa774b3c1ed81 100644 --- a/wpa_supplicant-2.9_standard/src/p2p/p2p.c +++ b/wpa_supplicant-2.9_standard/src/p2p/p2p.c @@ -4110,7 +4110,8 @@ static void p2p_timeout_connect(struct p2p_data *p2p) (p2p->go_neg_peer->flags & P2P_DEV_WAIT_GO_NEG_CONFIRM)) { p2p_dbg(p2p, "Wait for GO Negotiation Confirm timed out - assume GO Negotiation failed"); #ifdef CONFIG_P2P_CHR - wpa_supplicant_upload_chr_error_code(P2P_EVENT_REASON_GO_WAIT_CONFRIM_FAILURE); + wpa_supplicant_upload_state_before_group_formation_success(GROUP_OWNER_NEGOTIATION, + P2P_EVENT_REASON_GO_NEGOTIATION_WAIT_CONFRIM_FAILURE); #endif p2p_go_neg_failed(p2p, -1); return; @@ -4288,7 +4289,7 @@ static void p2p_timeout_invite_listen(struct p2p_data *p2p) 0, 0); } #ifdef CONFIG_P2P_CHR - wpa_supplicant_upload_chr_error_code(P2P_EVENT_REASON_INVIT_TIMEOUT); + wpa_supplicant_upload_state_before_group_formation_success(P2P_INVITATION, P2P_EVENT_REASON_INVIT_TIMEOUT); #endif p2p_set_state(p2p, P2P_IDLE); } @@ -5746,6 +5747,8 @@ void p2p_go_neg_wait_timeout(void *eloop_ctx, void *timeout_ctx) #ifdef CONFIG_P2P_CHR if (p2p->state == P2P_WAIT_PEER_CONNECT || p2p->state == P2P_WAIT_PEER_IDLE) { wpa_supplicant_upload_chr_statistics_event(GO_NEG_WAIT_PEER_READY_TIMEOUT_CNT); + wpa_supplicant_upload_state_before_group_formation_success(GROUP_OWNER_NEGOTIATION, + P2P_EVENT_REASON_GO_NEGOTIATION_WAIT_PEER_READY_TIMEOUT); #ifdef CONFIG_LIBWPA_VENDOR char buf[CHR_BUFFER_SIZE] = {0}; os_snprintf(buf, CHR_BUFFER_SIZE, "04:%serrCode=%d", WPA_EVENT_CHR_REPORT, diff --git a/wpa_supplicant-2.9_standard/wpa_supplicant/notify.c b/wpa_supplicant-2.9_standard/wpa_supplicant/notify.c index 12e755a6f9737bdd8cb1f3e4852c4475c85fed16..d8f46c3e43cab8daf8b94e5210fa6708a48bf4ab 100644 --- a/wpa_supplicant-2.9_standard/wpa_supplicant/notify.c +++ b/wpa_supplicant-2.9_standard/wpa_supplicant/notify.c @@ -40,6 +40,10 @@ #include "eap_common/eap_sim_common.h" #include "securec.h" +#ifdef CONFIG_P2P_CHR +#include "wpa_hw_p2p_chr.h" +#endif + #define HEX_OPC_LEN 16 #define HEX_AMF_LEN 2 #define HEX_KI_LEN 16 @@ -996,6 +1000,11 @@ void wpas_notify_p2p_provision_discovery(struct wpa_supplicant *wpa_s, wpas_dbus_signal_p2p_provision_discovery(wpa_s, dev_addr, request, status, config_methods, generated_pin); +#ifdef CONFIG_P2P_CHR + if (status != P2P_PROV_DISC_SUCCESS) { + wpa_supplicant_upload_state_before_group_formation_success(PROVISION_DISCOVERY, status); + } +#endif } diff --git a/wpa_supplicant-2.9_standard/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant-2.9_standard/wpa_supplicant/p2p_supplicant.c index 25c4b70d96db2627b15e9ea75a6d090315fd9852..352d73de0c20b86e5ebb81677cc36ba725fee608 100644 --- a/wpa_supplicant-2.9_standard/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant-2.9_standard/wpa_supplicant/p2p_supplicant.c @@ -1614,11 +1614,6 @@ static void wpas_group_formation_completed(struct wpa_supplicant *wpa_s, WpaEventReport(wpa_s->ifname, WPA_EVENT_GROUP_FORMATION_FAILURE, ""); #endif -#ifdef CONFIG_P2P_CHR - if (wpa_s->wpa_state == WPA_SCANNING) { - wpa_supplicant_upload_chr_error_code(P2P_EVENT_REASON_GROUP_FAILURE_IN_SCAN); - } -#endif wpas_notify_p2p_group_formation_failure(wpa_s, ""); if (already_deleted) return; @@ -9287,6 +9282,8 @@ int wpas_p2p_cancel(struct wpa_supplicant *wpa_s) #ifdef CONFIG_P2P_CHR if (global->p2p->state == P2P_WAIT_PEER_CONNECT || global->p2p->state == P2P_WAIT_PEER_IDLE) { + wpa_supplicant_upload_state_before_group_formation_success(GROUP_OWNER_NEGOTIATION, + P2P_EVENT_REASON_GO_NEGOTIATION_WAIT_PEER_READY_TIMEOUT); wpa_supplicant_upload_chr_statistics_event(GO_NEG_WAIT_PEER_READY_TIMEOUT_CNT); #ifdef CONFIG_LIBWPA_VENDOR char buf[CHR_BUFFER_SIZE] = {0};