From dbc6cdc711740e01727bb9def1c86ebe0abfb5fd Mon Sep 17 00:00:00 2001 From: Hui Bai Date: Thu, 27 Jun 2024 15:24:07 +0800 Subject: [PATCH] modules: hostap: Supports link mode of legacy STA. Link mode shows unknown when legacy (A or bg only) device connects to APUT. Set the link mode to WIFI_2 when the host freq over 4000 and set link mode to WIFI_3 when the host freq over 2000. Signed-off-by: Hui Bai --- modules/hostap/src/supp_events.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/hostap/src/supp_events.c b/modules/hostap/src/supp_events.c index ae6cffdeb5d58e..d666a60e025239 100644 --- a/modules/hostap/src/supp_events.c +++ b/modules/hostap/src/supp_events.c @@ -271,6 +271,11 @@ static enum wifi_link_mode get_sta_link_mode(struct wpa_supplicant *wpa_s, struc return WIFI_2; } else if (wpa_s->assoc_freq > 2000) { return WIFI_3; +#else + } else if (iface->freq > 4000) { + return WIFI_2; + } else if (iface->freq > 2000) { + return WIFI_3; #endif } else { return WIFI_LINK_MODE_UNKNOWN;