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
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",