drivers: wifi: nxp: fix the wrong security type print of WPA2

For embedded supplicant case, when connects to WPA2 AP, driver will set
the key_mgmt to 'WLAN_KEY_MGMT_PSK | WLAN_KEY_MGMT_PSK_SHA256', as mfp
is default WIFI_MFP_OPTIONAL. Therefore, when using 'wifi status' to
get the security type, when the key_mgmt is 'WLAN_KEY_MGMT_PSK |
WLAN_KEY_MGMT_PSK_SHA256', the security type should be
'WIFI_SECURITY_TYPE_PSK'.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
This commit is contained in:
Maochen Wang 2025-03-01 08:23:59 +08:00 committed by Benjamin Cabé
commit e242c08aef

View file

@ -1042,6 +1042,8 @@ static inline enum wifi_security_type nxp_wifi_key_mgmt_to_zephyr(int key_mgmt,
return WIFI_SECURITY_TYPE_PSK; return WIFI_SECURITY_TYPE_PSK;
case WLAN_KEY_MGMT_PSK_SHA256: case WLAN_KEY_MGMT_PSK_SHA256:
return WIFI_SECURITY_TYPE_PSK_SHA256; return WIFI_SECURITY_TYPE_PSK_SHA256;
case WLAN_KEY_MGMT_PSK | WLAN_KEY_MGMT_PSK_SHA256:
return WIFI_SECURITY_TYPE_PSK;
case WLAN_KEY_MGMT_SAE: case WLAN_KEY_MGMT_SAE:
if (pwe == 1) { if (pwe == 1) {
return WIFI_SECURITY_TYPE_SAE_H2E; return WIFI_SECURITY_TYPE_SAE_H2E;