Skip to content

Commit

Permalink
hostap: The security keys were checked in wrong function
Browse files Browse the repository at this point in the history
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 <jukka.rissanen@nordicsemi.no>
  • Loading branch information
jukkar authored and fabiobaltieri committed Sep 27, 2024
1 parent d11997d commit 2f47de6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/hostap/src/supp_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,6 @@ static inline int chan_to_freq(int chan)
static inline enum wifi_frequency_bands wpas_band_to_zephyr(enum wpa_radio_work_band band)
{
switch (band) {
case WPA_KEY_MGMT_IEEE8021X:
case WPA_KEY_MGMT_IEEE8021X_SUITE_B:
case WPA_KEY_MGMT_IEEE8021X_SUITE_B_192:
return WIFI_SECURITY_TYPE_EAP_TLS;
case BAND_2_4_GHZ:
return WIFI_FREQ_BAND_2_4_GHZ;
case BAND_5_GHZ:
Expand All @@ -364,6 +360,10 @@ static inline enum wifi_frequency_bands wpas_band_to_zephyr(enum wpa_radio_work_
static inline enum wifi_security_type wpas_key_mgmt_to_zephyr(int key_mgmt, int proto)
{
switch (key_mgmt) {
case WPA_KEY_MGMT_IEEE8021X:
case WPA_KEY_MGMT_IEEE8021X_SUITE_B:
case WPA_KEY_MGMT_IEEE8021X_SUITE_B_192:
return WIFI_SECURITY_TYPE_EAP_TLS;
case WPA_KEY_MGMT_NONE:
return WIFI_SECURITY_TYPE_NONE;
case WPA_KEY_MGMT_PSK:
Expand Down

0 comments on commit 2f47de6

Please sign in to comment.