wpa_supplicant: Removed ESP32 reference from generic APIs/Code

This commit is contained in:
Kapil Gupta 2022-06-06 11:01:02 +05:30
parent e60ebc0cbe
commit e9128b3b5b
4 changed files with 20 additions and 6 deletions

View File

@ -26,7 +26,7 @@ extern "C" {
*/
/** \defgroup WPA_APIs WPS APIs
* @brief ESP32 Supplicant APIs
* @brief Supplicant APIs
*
*/

View File

@ -32,7 +32,7 @@ extern "C" {
/**
* @brief Enable wpa2 enterprise authentication.
*
* @attention 1. wpa2 enterprise authentication can only be used when ESP32 station is enabled.
* @attention 1. wpa2 enterprise authentication can only be used when station mode is enabled.
* @attention 2. wpa2 enterprise authentication can only support TLS, PEAP-MSCHAPv2 and TTLS-MSCHAPv2 method.
*
* @return
@ -44,7 +44,7 @@ esp_err_t esp_wifi_sta_wpa2_ent_enable(void);
/**
* @brief Disable wpa2 enterprise authentication.
*
* @attention 1. wpa2 enterprise authentication can only be used when ESP32 station is enabled.
* @attention 1. wpa2 enterprise authentication can only be used when station mode is enabled.
* @attention 2. wpa2 enterprise authentication can only support TLS, PEAP-MSCHAPv2 and TTLS-MSCHAPv2 method.
*
* @return

View File

@ -63,7 +63,7 @@ typedef struct {
.wps_type = type, \
.factory_info = { \
ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_STR(manufacturer, "ESPRESSIF") \
ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_STR(model_number, "ESP32") \
ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_STR(model_number, CONFIG_IDF_TARGET) \
ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_STR(model_name, "ESPRESSIF IOT") \
ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_STR(device_name, "ESP DEVICE") \
}, \

View File

@ -29,6 +29,20 @@
#include "eap_common/eap_wsc_common.h"
#include "esp_wpas_glue.h"
#if CONFIG_IDF_TARGET_ESP32
const char *wps_model_number = "ESP32";
#elif CONFIG_IDF_TARGET_ESP32S2
const char *wps_model_number = "ESP32S2";
#elif CONFIG_IDF_TARGET_ESP32S3
const char *wps_model_number = "ESP32S3";
#elif CONFIG_IDF_TARGET_ESP32C3
const char *wps_model_number = "ESP32C3";
#elif CONFIG_IDF_TARGET_ESP32C2
const char *wps_model_number = "ESP32C2";
#elif CONFIG_IDF_TARGET_ESP32H2
const char *wps_model_number = "ESP32H2";
#endif
void *s_wps_api_lock = NULL; /* Used in WPS public API only, never be freed */
void *s_wps_api_sem = NULL; /* Sync semaphore used between WPS publi API caller task and WPS task */
bool s_wps_enabled = false;
@ -1054,8 +1068,8 @@ int wps_set_default_factory(void)
os_snprintf(s_factory_info->manufacturer, WPS_MAX_MANUFACTURER_LEN, "ESPRESSIF");
os_snprintf(s_factory_info->model_name, WPS_MAX_MODEL_NUMBER_LEN, "ESPRESSIF IOT");
os_snprintf(s_factory_info->model_number, WPS_MAX_MODEL_NAME_LEN, "ESP32");
os_snprintf(s_factory_info->device_name, WPS_MAX_DEVICE_NAME_LEN, "ESP32 STATION");
os_snprintf(s_factory_info->model_number, WPS_MAX_MODEL_NAME_LEN, wps_model_number);
os_snprintf(s_factory_info->device_name, WPS_MAX_DEVICE_NAME_LEN, "%s STATION", wps_model_number);
return ESP_OK;
}