diff --git a/components/esp8266/lib/VERSION b/components/esp8266/lib/VERSION index 27db68de..4fb627c8 100644 --- a/components/esp8266/lib/VERSION +++ b/components/esp8266/lib/VERSION @@ -4,7 +4,7 @@ gwen: pp: 6a32b9b wpa: 743c778 espnow: 743c778 - wps: 866fcf9 + wps: 44eada6 smartconfig: 2.8.2 phy: 1149 diff --git a/components/esp8266/lib/libwps.a b/components/esp8266/lib/libwps.a index 820a0687..58a278e7 100755 Binary files a/components/esp8266/lib/libwps.a and b/components/esp8266/lib/libwps.a differ diff --git a/components/esp8266/lib/libwps_dbg.a b/components/esp8266/lib/libwps_dbg.a index ad0898ed..c7e7d46e 100755 Binary files a/components/esp8266/lib/libwps_dbg.a and b/components/esp8266/lib/libwps_dbg.a differ diff --git a/components/wpa_supplicant/include/wps/wps.h b/components/wpa_supplicant/include/wps/wps.h index 046ad190..b5d0c344 100644 --- a/components/wpa_supplicant/include/wps/wps.h +++ b/components/wpa_supplicant/include/wps/wps.h @@ -11,6 +11,7 @@ #include "wps/wps_defs.h" #include "esp_wifi_types.h" +#include "esp_system.h" /** * enum wsc_op_code - EAP-WSC OP-Code values diff --git a/components/wpa_supplicant/src/wps/wps_attr_build.c b/components/wpa_supplicant/src/wps/wps_attr_build.c index 7268659f..e91374cc 100644 --- a/components/wpa_supplicant/src/wps/wps_attr_build.c +++ b/components/wpa_supplicant/src/wps/wps_attr_build.c @@ -26,8 +26,6 @@ #define API_MUTEX_TAKE(t) local_irq_save(t) #define API_MUTEX_GIVE(t) local_irq_restore(t) -extern bool system_overclock(void); -extern bool system_restoreclock(void); #endif int wps_build_public_key(struct wps_data* wps, struct wpabuf* msg, wps_key_mode_t mode) @@ -63,13 +61,13 @@ int wps_build_public_key(struct wps_data* wps, struct wpabuf* msg, wps_key_mode_ API_MUTEX_DECLARE(c_tmp); API_MUTEX_TAKE(c_tmp); //pp_soft_wdt_stop(); - system_overclock(); + esp_set_cpu_freq(ESP_CPU_FREQ_160M); //REG_SET_BIT(0x3ff00014, BIT(0)); //change CPU to 160Mhz //ets_update_cpu_frequency(160); #endif wps->dh_ctx = dh5_init(&wps->dh_privkey, &pubkey); #ifdef CONFIG_IDF_TARGET_ESP8266 - system_restoreclock(); + esp_set_cpu_freq(ESP_CPU_FREQ_80M); //REG_CLR_BIT(0x3ff00014, BIT(0)); //change CPU to 80Mhz //ets_update_cpu_frequency(80); diff --git a/components/wpa_supplicant/src/wps/wps_enrollee.c b/components/wpa_supplicant/src/wps/wps_enrollee.c index 6b9b6f73..e6e146f4 100644 --- a/components/wpa_supplicant/src/wps/wps_enrollee.c +++ b/components/wpa_supplicant/src/wps/wps_enrollee.c @@ -29,8 +29,6 @@ static const char mem_debug_file[] ICACHE_RODATA_ATTR = __FILE__; #define API_MUTEX_TAKE(t) local_irq_save(t) #define API_MUTEX_GIVE(t) local_irq_restore(t) -extern bool system_overclock(void); -extern bool system_restoreclock(void); #endif @@ -608,17 +606,17 @@ static int wps_process_pubkey(struct wps_data* wps, const u8* pk, //REG_SET_BIT(0x3ff00014, BIT(0)); //change CPU to 160Mhz //ets_update_cpu_frequency(160); //ets_printf("[%s]line:[%d]%d\r\n", __func__, __LINE__, REG_READ(0x3ff20c00)); - system_overclock(); + esp_set_cpu_freq(ESP_CPU_FREQ_160M); if (wps_derive_keys(wps) < 0) { //REG_CLR_BIT(0x3ff00014, BIT(0)); //change CPU to 80Mhz //ets_update_cpu_frequency(80); - system_restoreclock(); + esp_set_cpu_freq(ESP_CPU_FREQ_80M); //pp_soft_wdt_restart(); API_MUTEX_GIVE(c_tmp); return -1; } - system_restoreclock(); + esp_set_cpu_freq(ESP_CPU_FREQ_80M); //ets_printf("[%s]line:[%d]%d\r\n", __func__, __LINE__, REG_READ(0x3ff20c00)); //REG_CLR_BIT(0x3ff00014, BIT(0)); //change CPU to 80Mhz //ets_update_cpu_frequency(80);