summaryrefslogtreecommitdiffstatshomepage
path: root/drivers
diff options
context:
space:
mode:
authoriabdalkader <i.abdalkader@gmail.com>2024-04-24 19:58:06 +0200
committerDamien George <damien@micropython.org>2024-07-12 01:03:46 +1000
commit20b00ca501f5e7ff096ae3e31c3e7e7d99963d23 (patch)
treea4e43c1ea9c6af9d1ec4efa09ce5171bb7c3567f /drivers
parent2be45dd682f0ce01e4a1061375e96ce2c501a187 (diff)
downloadmicropython-20b00ca501f5e7ff096ae3e31c3e7e7d99963d23.tar.gz
micropython-20b00ca501f5e7ff096ae3e31c3e7e7d99963d23.zip
extmod/network_nina: Fix the AP security mode constants.
The only AP security mode supported is actually WPA/WPA2 not WEP. The firmware command `0x19` starts the AP using `WIFI_AUTH_WPA_WPA2_PSK` mode. There are no functional changes in this commit, it just fixes the constant names and removes the useless sanity checks for WEP. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ninaw10/nina_wifi_drv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ninaw10/nina_wifi_drv.c b/drivers/ninaw10/nina_wifi_drv.c
index 6e4df84294..1aaeec5a09 100644
--- a/drivers/ninaw10/nina_wifi_drv.c
+++ b/drivers/ninaw10/nina_wifi_drv.c
@@ -95,7 +95,7 @@ typedef enum {
// AP mode commands.
NINA_CMD_START_AP_OPEN = 0x18,
- NINA_CMD_START_AP_WEP = 0x19,
+ NINA_CMD_START_AP_WPA = 0x19,
// AP mode scan commands.
NINA_CMD_AP_START_SCAN = 0x36,
@@ -395,7 +395,7 @@ int nina_start_ap(const char *ssid, uint8_t security, const char *key, uint16_t
uint8_t status = NINA_STATUS_AP_FAILED;
if ((key == NULL && security != NINA_SEC_OPEN) ||
- (security != NINA_SEC_OPEN && security != NINA_SEC_WEP)) {
+ (security != NINA_SEC_OPEN && security != NINA_SEC_WPA_PSK)) {
return -1;
}
@@ -406,8 +406,8 @@ int nina_start_ap(const char *ssid, uint8_t security, const char *key, uint16_t
return -1;
}
break;
- case NINA_SEC_WEP:
- if (nina_send_command_read_ack(NINA_CMD_START_AP_WEP,
+ case NINA_SEC_WPA_PSK:
+ if (nina_send_command_read_ack(NINA_CMD_START_AP_WPA,
3, ARG_8BITS, NINA_ARGS(ARG_STR(ssid), ARG_STR(key), ARG_BYTE(channel))) != SPI_ACK) {
return -1;
}