[Bugfix][API-1135 API-1038 957] fix sta get error auth by scan cmd
Change-Id: Idfd0489247c9badfdd27642bac58213af8035bd4
diff --git a/lib/liblynq-wifi6/libwifi6.c b/lib/liblynq-wifi6/libwifi6.c
index 579da4a..76c5d94 100755
--- a/lib/liblynq-wifi6/libwifi6.c
+++ b/lib/liblynq-wifi6/libwifi6.c
@@ -1524,10 +1524,10 @@
static lynq_wifi_auth_s convert_max_auth_from_flag(char * flag) {
if (flag != NULL)
{
- if ( strstr(flag, "SHA256") != NULL || strstr(flag,"WPA2-SAE") != NULL || strstr(flag,"SAE-H2E") != NULL)
+ if ( strstr(flag, "SHA256") != NULL || strstr(flag,"WPA2-SAE") != NULL || ( strstr(flag,"SAE-H2E") != NULL && strstr(flag,"WPS") == NULL ) )
{
return LYNQ_WIFI_AUTH_WPA3_PSK;
- }else if ( strstr( flag,"SAE-CCMP") != NULL )
+ }else if ( strstr( flag,"SAE-CCMP") != NULL || strstr(flag,"SAE-H2E") != NULL )
{
return LYNQ_WIFI_AUTH_WPA2_WPA3_PSK;
}else if (strstr( flag, "WPA2-PSK") != NULL)
@@ -1550,6 +1550,10 @@
{
return LYNQ_WIFI_AUTH_OPEN;
}
+ else
+ {
+ RLOGD("convert_max_auth_from_flag not-found auth mode");
+ }
}
return -1;