Skip to content

Commit cebd768

Browse files
committed
cpu/esp_common: rename ESP_WIFI_EAP_* -> WIFI_EAP_*
1 parent 50802b8 commit cebd768

7 files changed

Lines changed: 49 additions & 37 deletions

File tree

cpu/esp32/doc.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,16 +1612,16 @@ following configuration parameters have to be defined:
16121612

16131613
Parameter | Default | Description
16141614
:-------------------|:----------|:------------
1615-
#WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
1616-
ESP_WIFI_EAP_ID | none | Optional anonymous identity used in phase 1 (outer) EAP authentication.[1]
1617-
ESP_WIFI_EAP_USER | none | User name used in phase 2 (inner) EAP authentication.
1618-
ESP_WIFI_EAP_PASS | none | Password used in phase 2 (inner) EAP authentication.
1615+
#WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
1616+
WIFI_EAP_ID | none | Optional anonymous identity used in phase 1 (outer) EAP authentication.[1]
1617+
WIFI_EAP_USER | none | User name used in phase 2 (inner) EAP authentication.
1618+
WIFI_EAP_PASS | none | Password used in phase 2 (inner) EAP authentication.
16191619
#ESP_WIFI_STACKSIZE | #THREAD_STACKSIZE_DEFAULT | Stack size used for the WiFi netdev driver thread.
16201620

16211621
</center><br>
16221622

1623-
[1] If the optional anonymous identy `ESP_WIFI_EAP_ID` is not defined, the user
1624-
name `ESP_WIFI_EAP_USER` defined for phase 2 (inner) EAP authentication is used
1623+
[1] If the optional anonymous identy `WIFI_EAP_ID` is not defined, the user
1624+
name `WIFI_EAP_USER` defined for phase 2 (inner) EAP authentication is used
16251625
as identity in phase 1.
16261626

16271627
These configuration parameter definitions, as well as enabling the `esp_wifi`
@@ -1630,7 +1630,7 @@ line, for example:
16301630

16311631
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16321632
USEMODULE=esp_wifi_enterprise \
1633-
CFLAGS='-DWIFI_SSID=\"MySSID\" -DESP_WIFI_EAP_ID=\"anonymous\" -DESP_WIFI_EAP_USER=\"MyUserName\" -DESP_WIFI_EAP_PASS=\"MyPassphrase\"' \
1633+
CFLAGS='-DWIFI_SSID=\"MySSID\" -DWIFI_EAP_ID=\"anonymous\" -DWIFI_EAP_USER=\"MyUserName\" -DWIFI_EAP_PASS=\"MyPassphrase\"' \
16341634
make -C examples/gnrc_networking BOARD=...
16351635
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16361636

cpu/esp_common/esp-wifi/doc.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ following configuration parameters have to be defined:
8787

8888
Parameter | Default | Description
8989
:------------------|:----------|:------------
90-
WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
91-
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.
92-
ESP_WIFI_EAP_USER | none | User name used in phase 2 (inner) EAP authentication.
93-
ESP_WIFI_EAP_PASS | none | Password used in phase 2 (inner) EAP authentication.
90+
WIFI_SSID | "RIOT_AP" | SSID of the AP to be used.
91+
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.
92+
WIFI_EAP_USER | none | User name used in phase 2 (inner) EAP authentication.
93+
WIFI_EAP_PASS | none | Password used in phase 2 (inner) EAP authentication.
9494
ESP_WIFI_STACKSIZE | #THREAD_STACKSIZE_DEFAULT | Stack size used for the WiFi netdev driver thread.
9595

9696
</center>
@@ -101,7 +101,7 @@ line, for example:
101101

102102
```
103103
USEMODULE=esp_wifi_enterprise \
104-
CFLAGS='-DWIFI_SSID=\"MySSID\" -DESP_WIFI_EAP_ID=\"anonymous\" -DESP_WIFI_EAP_USER=\"MyUserName\" -DESP_WIFI_EAP_PASS=\"MyPassphrase\"' \
104+
CFLAGS='-DWIFI_SSID=\"MySSID\" -DWIFI_EAP_ID=\"anonymous\" -DWIFI_EAP_USER=\"MyUserName\" -DWIFI_EAP_PASS=\"MyPassphrase\"' \
105105
make -C examples/gnrc_networking BOARD=...
106106
```
107107

cpu/esp_common/esp-wifi/esp_wifi_netdev.c

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -947,20 +947,32 @@ void esp_wifi_setup (esp_wifi_netdev_t* dev)
947947

948948
#if defined(MODULE_ESP_WIFI_ENTERPRISE) && !defined(MODULE_ESP_WIFI_AP)
949949

950-
#ifdef ESP_WIFI_EAP_ID
951-
esp_wifi_sta_wpa2_ent_set_identity((const unsigned char *)ESP_WIFI_EAP_ID,
952-
strlen(ESP_WIFI_EAP_ID));
953-
#endif /* ESP_WIFI_EAP_ID */
954-
#if defined(ESP_WIFI_EAP_USER) && defined(ESP_WIFI_EAP_PASS)
950+
#if !defined(WIFI_EAP_ID) && defined(ESP_WIFI_EAP_ID)
951+
#define WIFI_EAP_ID ESP_WIFI_EAP_ID
952+
#endif
953+
954+
#if !defined(WIFI_EAP_USER) && defined(ESP_WIFI_EAP_USER)
955+
#define WIFI_EAP_USER ESP_WIFI_EAP_USER
956+
#endif
957+
958+
#if !defined(WIFI_EAP_PASS) && defined(ESP_WIFI_EAP_PASS)
959+
#define WIFI_EAP_PASS ESP_WIFI_EAP_PASS
960+
#endif
961+
962+
#ifdef WIFI_EAP_ID
963+
esp_wifi_sta_wpa2_ent_set_identity((const unsigned char *)WIFI_EAP_ID,
964+
strlen(WIFI_EAP_ID));
965+
#endif /* WIFI_EAP_ID */
966+
#if defined(WIFI_EAP_USER) && defined(WIFI_EAP_PASS)
955967
ESP_WIFI_DEBUG("eap_user=%s eap_pass=%s\n",
956-
ESP_WIFI_EAP_USER, ESP_WIFI_EAP_PASS);
957-
esp_wifi_sta_wpa2_ent_set_username((const unsigned char *)ESP_WIFI_EAP_USER,
958-
strlen(ESP_WIFI_EAP_USER));
959-
esp_wifi_sta_wpa2_ent_set_password((const unsigned char *)ESP_WIFI_EAP_PASS,
960-
strlen(ESP_WIFI_EAP_PASS));
961-
#else /* defined(ESP_WIFI_EAP_USER) && defined(ESP_WIFI_EAP_PASS) */
962-
#error "ESP_WIFI_EAP_USER and ESP_WIFI_EAP_PASS have to be defined for EAP phase 2 authentication"
963-
#endif /* defined(ESP_WIFI_EAP_USER) && defined(ESP_WIFI_EAP_PASS) */
968+
WIFI_EAP_USER, WIFI_EAP_PASS);
969+
esp_wifi_sta_wpa2_ent_set_username((const unsigned char *)WIFI_EAP_USER,
970+
strlen(WIFI_EAP_USER));
971+
esp_wifi_sta_wpa2_ent_set_password((const unsigned char *)WIFI_EAP_PASS,
972+
strlen(WIFI_EAP_PASS));
973+
#else /* defined(WIFI_EAP_USER) && defined(WIFI_EAP_PASS) */
974+
#error "WIFI_EAP_USER and WIFI_EAP_PASS have to be defined for EAP phase 2 authentication"
975+
#endif /* defined(WIFI_EAP_USER) && defined(WIFI_EAP_PASS) */
964976
esp_wifi_sta_wpa2_ent_enable();
965977
#endif /* defined(MODULE_ESP_WIFI_ENTERPRISE) && !defined(MODULE_ESP_WIFI_AP) */
966978

tests/external_board_dirs/esp-ci-boards/esp32-ci/Makefile.include

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# to also include the main board header
33
INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32-wrover-kit/include))
44

5-
# ESP_WIFI_EAP_USER and ESP_WIFI_EAP_PASS have to be defined to compile the
5+
# WIFI_EAP_USER and WIFI_EAP_PASS have to be defined to compile the
66
# optional module esp_wifi_enterprise in CI
7-
CFLAGS += -DESP_WIFI_EAP_USER=\"riot@riot-os.org\"
8-
CFLAGS += -DESP_WIFI_EAP_PASS=\"riot\"
7+
CFLAGS += -DWIFI_EAP_USER=\"riot@riot-os.org\"
8+
CFLAGS += -DWIFI_EAP_PASS=\"riot\"
99

1010
include $(RIOTBOARD)/esp32-wrover-kit/Makefile.include

tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile.include

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# to also include the main board header
33
INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32c3-devkit/include))
44

5-
# ESP_WIFI_EAP_USER and ESP_WIFI_EAP_PASS have to be defined to compile the
5+
# WIFI_EAP_USER and WIFI_EAP_PASS have to be defined to compile the
66
# optional module esp_wifi_enterprise in CI
7-
CFLAGS += -DESP_WIFI_EAP_USER=\"riot@riot-os.org\"
8-
CFLAGS += -DESP_WIFI_EAP_PASS=\"riot\"
7+
CFLAGS += -DWIFI_EAP_USER=\"riot@riot-os.org\"
8+
CFLAGS += -DWIFI_EAP_PASS=\"riot\"
99

1010
include $(RIOTBOARD)/esp32c3-devkit/Makefile.include

tests/external_board_dirs/esp-ci-boards/esp32s2-ci/Makefile.include

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# to also include the main board header
33
INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32s2-devkit/include))
44

5-
# ESP_WIFI_EAP_USER and ESP_WIFI_EAP_PASS have to be defined to compile the
5+
# WIFI_EAP_USER and WIFI_EAP_PASS have to be defined to compile the
66
# optional module esp_wifi_enterprise in CI
7-
CFLAGS += -DESP_WIFI_EAP_USER=\"riot@riot-os.org\"
8-
CFLAGS += -DESP_WIFI_EAP_PASS=\"riot\"
7+
CFLAGS += -DWIFI_EAP_USER=\"riot@riot-os.org\"
8+
CFLAGS += -DWIFI_EAP_PASS=\"riot\"
99

1010
include $(RIOTBOARD)/esp32s2-devkit/Makefile.include

tests/external_board_dirs/esp-ci-boards/esp32s3-ci/Makefile.include

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# to also include the main board header
33
INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32s3-devkit/include))
44

5-
# ESP_WIFI_EAP_USER and ESP_WIFI_EAP_PASS have to be defined to compile the
5+
# WIFI_EAP_USER and WIFI_EAP_PASS have to be defined to compile the
66
# optional module esp_wifi_enterprise in CI
7-
CFLAGS += -DESP_WIFI_EAP_USER=\"riot@riot-os.org\"
8-
CFLAGS += -DESP_WIFI_EAP_PASS=\"riot\"
7+
CFLAGS += -DWIFI_EAP_USER=\"riot@riot-os.org\"
8+
CFLAGS += -DWIFI_EAP_PASS=\"riot\"
99

1010
include $(RIOTBOARD)/esp32s3-devkit/Makefile.include

0 commit comments

Comments
 (0)