Skip to content

Commit a8418c6

Browse files
nxf58150kartben
authored andcommitted
modules: hostap: Fix incorrect link mode of AP
Added hw_mode check of AP with hostapd when getting link mode of current station. If the hw_mode of AP is 11b, then the link mode of current station will show 11b. Signed-off-by: Hui Bai <[email protected]>
1 parent 80361b8 commit a8418c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/hostap/src/supp_events.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,17 @@ static enum wifi_link_mode get_sta_link_mode(struct wpa_supplicant *wpa_s, struc
264264
return WIFI_5;
265265
} else if (sta->flags & WLAN_STA_HT) {
266266
return WIFI_4;
267+
#ifndef CONFIG_WIFI_NM_HOSTAPD_AP
267268
} else if (sta->flags & WLAN_STA_NONERP) {
268269
return WIFI_1;
269-
#ifndef CONFIG_WIFI_NM_HOSTAPD_AP
270270
} else if (wpa_s->assoc_freq > 4000) {
271271
return WIFI_2;
272272
} else if (wpa_s->assoc_freq > 2000) {
273273
return WIFI_3;
274274
#else
275+
} else if ((sta->flags & WLAN_STA_NONERP) ||
276+
(iface->current_mode->mode == HOSTAPD_MODE_IEEE80211B)) {
277+
return WIFI_1;
275278
} else if (iface->freq > 4000) {
276279
return WIFI_2;
277280
} else if (iface->freq > 2000) {

0 commit comments

Comments
 (0)