From bd6f14783a5f5e0a0e3ab361027c284be98daaee Mon Sep 17 00:00:00 2001 From: "tarun.kumar" Date: Mon, 3 Feb 2025 21:12:53 +0530 Subject: [PATCH] fix(esp_wifi): Modifying os_time_t datatype for platform and compiler independence --- components/esp_wifi/lib | 2 +- components/wpa_supplicant/port/include/os.h | 3 ++- components/wpa_supplicant/src/wps/wps_registrar.c | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 56ee699463..f6617e4f25 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 56ee699463c13fb007001d986f390f58b4058d53 +Subproject commit f6617e4f25427f792eac49717933d0de07ce807e diff --git a/components/wpa_supplicant/port/include/os.h b/components/wpa_supplicant/port/include/os.h index 7b8f7798be..a511694cc5 100644 --- a/components/wpa_supplicant/port/include/os.h +++ b/components/wpa_supplicant/port/include/os.h @@ -23,7 +23,8 @@ #include "supplicant_opt.h" #include "esp_wifi.h" -typedef time_t os_time_t; +/* Modifying datatype for platform and compiler independence */ +typedef uint64_t os_time_t; /** * os_sleep - Sleep (sec, usec) diff --git a/components/wpa_supplicant/src/wps/wps_registrar.c b/components/wpa_supplicant/src/wps/wps_registrar.c index a7edf79ff6..462e16c5df 100644 --- a/components/wpa_supplicant/src/wps/wps_registrar.c +++ b/components/wpa_supplicant/src/wps/wps_registrar.c @@ -1209,7 +1209,9 @@ void wps_registrar_probe_req_rx(struct wps_registrar *reg, const u8 *addr, struct os_reltime now, dur; os_get_reltime(&now); os_reltime_sub(&now, ®->pbc_ignore_start, &dur); - if (dur.sec >= 0 && dur.sec < 5) { +#ifdef ESP_SUPPLICANT + if (dur.sec < 5) { +#endif /* ESP_SUPPLICANT */ wpa_printf(MSG_DEBUG, "WPS: Ignore PBC activation " "based on Probe Request from the Enrollee " "that just completed PBC provisioning");