1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-17 18:43:50 +01:00

cpu/esp_common: rename ESP_WIFI_EAP_* -> WIFI_EAP_*

This commit is contained in:
Benjamin Valentin 2023-02-17 16:08:51 +01:00
parent 50802b841d
commit cebd768c08
7 changed files with 49 additions and 37 deletions

View File

@ -1612,16 +1612,16 @@ following configuration parameters have to be defined:
Parameter | Default | Description Parameter | Default | Description
:-------------------|:----------|:------------ :-------------------|:----------|:------------
#WIFI_SSID | "RIOT_AP" | SSID of the AP to be used. #WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
ESP_WIFI_EAP_ID | none | Optional anonymous identity used in phase 1 (outer) EAP authentication.[1] WIFI_EAP_ID | none | Optional anonymous identity used in phase 1 (outer) EAP authentication.[1]
ESP_WIFI_EAP_USER | none | User name used in phase 2 (inner) EAP authentication. WIFI_EAP_USER | none | User name used in phase 2 (inner) EAP authentication.
ESP_WIFI_EAP_PASS | none | Password used in phase 2 (inner) EAP authentication. WIFI_EAP_PASS | none | Password used in phase 2 (inner) EAP authentication.
#ESP_WIFI_STACKSIZE | #THREAD_STACKSIZE_DEFAULT | Stack size used for the WiFi netdev driver thread. #ESP_WIFI_STACKSIZE | #THREAD_STACKSIZE_DEFAULT | Stack size used for the WiFi netdev driver thread.
</center><br> </center><br>
[1] If the optional anonymous identy `ESP_WIFI_EAP_ID` is not defined, the user [1] If the optional anonymous identy `WIFI_EAP_ID` is not defined, the user
name `ESP_WIFI_EAP_USER` defined for phase 2 (inner) EAP authentication is used name `WIFI_EAP_USER` defined for phase 2 (inner) EAP authentication is used
as identity in phase 1. as identity in phase 1.
These configuration parameter definitions, as well as enabling the `esp_wifi` These configuration parameter definitions, as well as enabling the `esp_wifi`
@ -1630,7 +1630,7 @@ line, for example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
USEMODULE=esp_wifi_enterprise \ USEMODULE=esp_wifi_enterprise \
CFLAGS='-DWIFI_SSID=\"MySSID\" -DESP_WIFI_EAP_ID=\"anonymous\" -DESP_WIFI_EAP_USER=\"MyUserName\" -DESP_WIFI_EAP_PASS=\"MyPassphrase\"' \ CFLAGS='-DWIFI_SSID=\"MySSID\" -DWIFI_EAP_ID=\"anonymous\" -DWIFI_EAP_USER=\"MyUserName\" -DWIFI_EAP_PASS=\"MyPassphrase\"' \
make -C examples/gnrc_networking BOARD=... make -C examples/gnrc_networking BOARD=...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -87,10 +87,10 @@ following configuration parameters have to be defined:
Parameter | Default | Description Parameter | Default | Description
:------------------|:----------|:------------ :------------------|:----------|:------------
WIFI_SSID | "RIOT_AP" | SSID of the AP to be used. WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
ESP_WIFI_EAP_ID | none | Optional anonymous identity used in phase 1 (outer) EAP authentication. If it is not defined, the user name defined for phase 2 (inner) EAP authentication is used as idendity in phase 1. WIFI_EAP_ID | none | Optional anonymous identity used in phase 1 (outer) EAP authentication. If it is not defined, the user name defined for phase 2 (inner) EAP authentication is used as idendity in phase 1.
ESP_WIFI_EAP_USER | none | User name used in phase 2 (inner) EAP authentication. WIFI_EAP_USER | none | User name used in phase 2 (inner) EAP authentication.
ESP_WIFI_EAP_PASS | none | Password used in phase 2 (inner) EAP authentication. WIFI_EAP_PASS | none | Password used in phase 2 (inner) EAP authentication.
ESP_WIFI_STACKSIZE | #THREAD_STACKSIZE_DEFAULT | Stack size used for the WiFi netdev driver thread. ESP_WIFI_STACKSIZE | #THREAD_STACKSIZE_DEFAULT | Stack size used for the WiFi netdev driver thread.
</center> </center>
@ -101,7 +101,7 @@ line, for example:
``` ```
USEMODULE=esp_wifi_enterprise \ USEMODULE=esp_wifi_enterprise \
CFLAGS='-DWIFI_SSID=\"MySSID\" -DESP_WIFI_EAP_ID=\"anonymous\" -DESP_WIFI_EAP_USER=\"MyUserName\" -DESP_WIFI_EAP_PASS=\"MyPassphrase\"' \ CFLAGS='-DWIFI_SSID=\"MySSID\" -DWIFI_EAP_ID=\"anonymous\" -DWIFI_EAP_USER=\"MyUserName\" -DWIFI_EAP_PASS=\"MyPassphrase\"' \
make -C examples/gnrc_networking BOARD=... make -C examples/gnrc_networking BOARD=...
``` ```

View File

@ -947,20 +947,32 @@ void esp_wifi_setup (esp_wifi_netdev_t* dev)
#if defined(MODULE_ESP_WIFI_ENTERPRISE) && !defined(MODULE_ESP_WIFI_AP) #if defined(MODULE_ESP_WIFI_ENTERPRISE) && !defined(MODULE_ESP_WIFI_AP)
#ifdef ESP_WIFI_EAP_ID #if !defined(WIFI_EAP_ID) && defined(ESP_WIFI_EAP_ID)
esp_wifi_sta_wpa2_ent_set_identity((const unsigned char *)ESP_WIFI_EAP_ID, #define WIFI_EAP_ID ESP_WIFI_EAP_ID
strlen(ESP_WIFI_EAP_ID)); #endif
#endif /* ESP_WIFI_EAP_ID */
#if defined(ESP_WIFI_EAP_USER) && defined(ESP_WIFI_EAP_PASS) #if !defined(WIFI_EAP_USER) && defined(ESP_WIFI_EAP_USER)
#define WIFI_EAP_USER ESP_WIFI_EAP_USER
#endif
#if !defined(WIFI_EAP_PASS) && defined(ESP_WIFI_EAP_PASS)
#define WIFI_EAP_PASS ESP_WIFI_EAP_PASS
#endif
#ifdef WIFI_EAP_ID
esp_wifi_sta_wpa2_ent_set_identity((const unsigned char *)WIFI_EAP_ID,
strlen(WIFI_EAP_ID));
#endif /* WIFI_EAP_ID */
#if defined(WIFI_EAP_USER) && defined(WIFI_EAP_PASS)
ESP_WIFI_DEBUG("eap_user=%s eap_pass=%s\n", ESP_WIFI_DEBUG("eap_user=%s eap_pass=%s\n",
ESP_WIFI_EAP_USER, ESP_WIFI_EAP_PASS); WIFI_EAP_USER, WIFI_EAP_PASS);
esp_wifi_sta_wpa2_ent_set_username((const unsigned char *)ESP_WIFI_EAP_USER, esp_wifi_sta_wpa2_ent_set_username((const unsigned char *)WIFI_EAP_USER,
strlen(ESP_WIFI_EAP_USER)); strlen(WIFI_EAP_USER));
esp_wifi_sta_wpa2_ent_set_password((const unsigned char *)ESP_WIFI_EAP_PASS, esp_wifi_sta_wpa2_ent_set_password((const unsigned char *)WIFI_EAP_PASS,
strlen(ESP_WIFI_EAP_PASS)); strlen(WIFI_EAP_PASS));
#else /* defined(ESP_WIFI_EAP_USER) && defined(ESP_WIFI_EAP_PASS) */ #else /* defined(WIFI_EAP_USER) && defined(WIFI_EAP_PASS) */
#error "ESP_WIFI_EAP_USER and ESP_WIFI_EAP_PASS have to be defined for EAP phase 2 authentication" #error "WIFI_EAP_USER and WIFI_EAP_PASS have to be defined for EAP phase 2 authentication"
#endif /* defined(ESP_WIFI_EAP_USER) && defined(ESP_WIFI_EAP_PASS) */ #endif /* defined(WIFI_EAP_USER) && defined(WIFI_EAP_PASS) */
esp_wifi_sta_wpa2_ent_enable(); esp_wifi_sta_wpa2_ent_enable();
#endif /* defined(MODULE_ESP_WIFI_ENTERPRISE) && !defined(MODULE_ESP_WIFI_AP) */ #endif /* defined(MODULE_ESP_WIFI_ENTERPRISE) && !defined(MODULE_ESP_WIFI_AP) */

View File

@ -2,9 +2,9 @@
# to also include the main board header # to also include the main board header
INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32-wrover-kit/include)) INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32-wrover-kit/include))
# ESP_WIFI_EAP_USER and ESP_WIFI_EAP_PASS have to be defined to compile the # WIFI_EAP_USER and WIFI_EAP_PASS have to be defined to compile the
# optional module esp_wifi_enterprise in CI # optional module esp_wifi_enterprise in CI
CFLAGS += -DESP_WIFI_EAP_USER=\"riot@riot-os.org\" CFLAGS += -DWIFI_EAP_USER=\"riot@riot-os.org\"
CFLAGS += -DESP_WIFI_EAP_PASS=\"riot\" CFLAGS += -DWIFI_EAP_PASS=\"riot\"
include $(RIOTBOARD)/esp32-wrover-kit/Makefile.include include $(RIOTBOARD)/esp32-wrover-kit/Makefile.include

View File

@ -2,9 +2,9 @@
# to also include the main board header # to also include the main board header
INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32c3-devkit/include)) INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32c3-devkit/include))
# ESP_WIFI_EAP_USER and ESP_WIFI_EAP_PASS have to be defined to compile the # WIFI_EAP_USER and WIFI_EAP_PASS have to be defined to compile the
# optional module esp_wifi_enterprise in CI # optional module esp_wifi_enterprise in CI
CFLAGS += -DESP_WIFI_EAP_USER=\"riot@riot-os.org\" CFLAGS += -DWIFI_EAP_USER=\"riot@riot-os.org\"
CFLAGS += -DESP_WIFI_EAP_PASS=\"riot\" CFLAGS += -DWIFI_EAP_PASS=\"riot\"
include $(RIOTBOARD)/esp32c3-devkit/Makefile.include include $(RIOTBOARD)/esp32c3-devkit/Makefile.include

View File

@ -2,9 +2,9 @@
# to also include the main board header # to also include the main board header
INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32s2-devkit/include)) INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32s2-devkit/include))
# ESP_WIFI_EAP_USER and ESP_WIFI_EAP_PASS have to be defined to compile the # WIFI_EAP_USER and WIFI_EAP_PASS have to be defined to compile the
# optional module esp_wifi_enterprise in CI # optional module esp_wifi_enterprise in CI
CFLAGS += -DESP_WIFI_EAP_USER=\"riot@riot-os.org\" CFLAGS += -DWIFI_EAP_USER=\"riot@riot-os.org\"
CFLAGS += -DESP_WIFI_EAP_PASS=\"riot\" CFLAGS += -DWIFI_EAP_PASS=\"riot\"
include $(RIOTBOARD)/esp32s2-devkit/Makefile.include include $(RIOTBOARD)/esp32s2-devkit/Makefile.include

View File

@ -2,9 +2,9 @@
# to also include the main board header # to also include the main board header
INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32s3-devkit/include)) INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32s3-devkit/include))
# ESP_WIFI_EAP_USER and ESP_WIFI_EAP_PASS have to be defined to compile the # WIFI_EAP_USER and WIFI_EAP_PASS have to be defined to compile the
# optional module esp_wifi_enterprise in CI # optional module esp_wifi_enterprise in CI
CFLAGS += -DESP_WIFI_EAP_USER=\"riot@riot-os.org\" CFLAGS += -DWIFI_EAP_USER=\"riot@riot-os.org\"
CFLAGS += -DESP_WIFI_EAP_PASS=\"riot\" CFLAGS += -DWIFI_EAP_PASS=\"riot\"
include $(RIOTBOARD)/esp32s3-devkit/Makefile.include include $(RIOTBOARD)/esp32s3-devkit/Makefile.include