From: jin Date: Thu, 22 Jul 2021 16:37:05 +0000 (+0900) Subject: wpa_supplicant_lib: Fix the buffer length for SET_AP_P2P_WPS_IE ioctl X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_scsc_wifibt_wpa_supplicant_lib.git 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 --- 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",