Skip to content

Commit 2f47de6

Browse files
jukkarfabiobaltieri
authored andcommitted
hostap: The security keys were checked in wrong function
The security check case statements were in frequency band setting checks. This is totally wrong and will cause compiler warnings. Moving the checks to correct function. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent d11997d commit 2f47de6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/hostap/src/supp_api.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,6 @@ static inline int chan_to_freq(int chan)
348348
static inline enum wifi_frequency_bands wpas_band_to_zephyr(enum wpa_radio_work_band band)
349349
{
350350
switch (band) {
351-
case WPA_KEY_MGMT_IEEE8021X:
352-
case WPA_KEY_MGMT_IEEE8021X_SUITE_B:
353-
case WPA_KEY_MGMT_IEEE8021X_SUITE_B_192:
354-
return WIFI_SECURITY_TYPE_EAP_TLS;
355351
case BAND_2_4_GHZ:
356352
return WIFI_FREQ_BAND_2_4_GHZ;
357353
case BAND_5_GHZ:
@@ -364,6 +360,10 @@ static inline enum wifi_frequency_bands wpas_band_to_zephyr(enum wpa_radio_work_
364360
static inline enum wifi_security_type wpas_key_mgmt_to_zephyr(int key_mgmt, int proto)
365361
{
366362
switch (key_mgmt) {
363+
case WPA_KEY_MGMT_IEEE8021X:
364+
case WPA_KEY_MGMT_IEEE8021X_SUITE_B:
365+
case WPA_KEY_MGMT_IEEE8021X_SUITE_B_192:
366+
return WIFI_SECURITY_TYPE_EAP_TLS;
367367
case WPA_KEY_MGMT_NONE:
368368
return WIFI_SECURITY_TYPE_NONE;
369369
case WPA_KEY_MGMT_PSK:

0 commit comments

Comments
 (0)