wpa_supplicant_lib: Fix the buffer length for SET_AP_P2P_WPS_IE ioctl lineage-18.1 lineage-19.0 lineage-19.1 lineage-20 lineage-21 lineage-22.0
authorjin <grccorps@gmail.com>
Thu, 22 Jul 2021 16:37:05 +0000 (01:37 +0900)
committerjin <grccorps@gmail.com>
Thu, 22 Jul 2021 16:37:05 +0000 (01:37 +0900)
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

index 849296e17c06efd5aca93b21989c0c8d51d0e521..8c577a5eae59fd35e8601d5393b89425a61eaa5e 100644 (file)
@@ -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",