From 70f4bf60f26b49401439ca56ece4c984d8c6952b Mon Sep 17 00:00:00 2001 From: jin Date: Fri, 23 Jul 2021 01:37:05 +0900 Subject: [PATCH] wpa_supplicant_lib: Fix the buffer length for SET_AP_P2P_WPS_IE ioctl With the buffer length of 3, the iftype argument was not included to the ioctl command. Changing this to 5 fixed wifi direct on Galaxy A21s Change-Id: Iaded6223680a083175cee62ea5cb5fa343d048dd --- driver_cmd_nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver_cmd_nl80211.c b/driver_cmd_nl80211.c index 849296e..8c577a5 100644 --- a/driver_cmd_nl80211.c +++ b/driver_cmd_nl80211.c @@ -178,7 +178,7 @@ int wpa_driver_set_ap_wps_p2p_ie(void *priv, const struct wpabuf *beacon, for (i = 0; cmd_arr[i].cmd != -1; i++) { ap_wps_p2p_ie = cmd_arr[i].src; if (ap_wps_p2p_ie) { - buf_len = strlen(_cmd) + 3 + wpabuf_len(ap_wps_p2p_ie); + buf_len = strlen(_cmd) + 5 + wpabuf_len(ap_wps_p2p_ie); buf = os_zalloc(buf_len); if (NULL == buf) { wpa_printf(MSG_ERROR, "%s: Out of memory", -- 2.20.1