Просмотр исходного кода

esp_wifi: Clear old keys before going for new connection

Kapil Gupta 3 лет назад
Родитель
Сommit
ff00a1c7a2

+ 1 - 1
components/esp_wifi/lib

@@ -1 +1 @@
-Subproject commit 14785adfe48ed428579615530019d2a1f5996858
+Subproject commit a24708b2f4264911aa374d589e6de16ac72ca2d7

+ 1 - 3
components/wpa_supplicant/esp_supplicant/src/esp_wpas_glue.c

@@ -68,9 +68,7 @@ int wpa_ether_send(void *ctx, const u8 *dest, u16 proto,
     os_memcpy(eth->h_source, gWpaSm.own_addr, ETH_ALEN);
     os_memcpy(eth->h_source, gWpaSm.own_addr, ETH_ALEN);
     eth->h_proto = host_to_be16(proto);
     eth->h_proto = host_to_be16(proto);
 
 
-    esp_wifi_internal_tx(WIFI_IF_STA, buffer, sizeof(struct l2_ethhdr) + data_len);
-
-    return ESP_OK;
+    return esp_wifi_internal_tx(WIFI_IF_STA, buffer, sizeof(struct l2_ethhdr) + data_len);
 }
 }
 
 
 int hostapd_send_eapol(const u8 *source, const u8 *sta_addr,
 int hostapd_send_eapol(const u8 *source, const u8 *sta_addr,

+ 3 - 0
components/wpa_supplicant/esp_supplicant/src/esp_wps.c

@@ -437,6 +437,7 @@ int wps_send_eap_identity_rsp(u8 id)
     eap_buf = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_IDENTITY, sm->identity_len,
     eap_buf = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_IDENTITY, sm->identity_len,
                             EAP_CODE_RESPONSE, id);
                             EAP_CODE_RESPONSE, id);
     if (!eap_buf) {
     if (!eap_buf) {
+        wpa_printf(MSG_ERROR, "eap buf allocation failed");
         ret = ESP_FAIL;
         ret = ESP_FAIL;
         goto _err;
         goto _err;
     }
     }
@@ -446,12 +447,14 @@ int wps_send_eap_identity_rsp(u8 id)
 
 
     buf = wps_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAP_PACKET, wpabuf_head_u8(eap_buf), wpabuf_len(eap_buf), (size_t *)&len, NULL);
     buf = wps_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAP_PACKET, wpabuf_head_u8(eap_buf), wpabuf_len(eap_buf), (size_t *)&len, NULL);
     if (!buf) {
     if (!buf) {
+        wpa_printf(MSG_ERROR, "buf allocation failed");
         ret = ESP_ERR_NO_MEM;
         ret = ESP_ERR_NO_MEM;
         goto _err;
         goto _err;
     }
     }
 
 
     ret = wps_sm_ether_send(sm, ETH_P_EAPOL, buf, len);
     ret = wps_sm_ether_send(sm, ETH_P_EAPOL, buf, len);
     if (ret) {
     if (ret) {
+        wpa_printf(MSG_ERROR, "wps sm ether send failed ret=%d", ret);
         ret = ESP_FAIL;
         ret = ESP_FAIL;
         goto _err;
         goto _err;
     }
     }