[PATCH] robust_av: use wpa_bss_ext_capab() helper
Johannes Berg
johannes at sipsolutions.net
Tue Jan 19 14:06:57 EST 2021
From: Johannes Berg <johannes.berg at intel.com>
Use the helper instead of open-coding the check. Since the
helper doesn't handle a NULL BSS, keep that extra check.
Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
wpa_supplicant/robust_av.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/wpa_supplicant/robust_av.c b/wpa_supplicant/robust_av.c
index 1280f5d96e7e..590ba78ce18b 100644
--- a/wpa_supplicant/robust_av.c
+++ b/wpa_supplicant/robust_av.c
@@ -59,7 +59,8 @@ int wpas_send_mscs_req(struct wpa_supplicant *wpa_s)
ext_capab = wpa_bss_get_ie(wpa_s->current_bss,
WLAN_EID_EXT_CAPAB);
- if (!ext_capab || ext_capab[1] < 11 || !(ext_capab[12] & 0x20)) {
+ if (!wpa_s->current_bss ||
+ !wpa_bss_ext_capab(wpa_s->current_bss, WLAN_EXT_CAPAB_MSCS)) {
wpa_dbg(wpa_s, MSG_INFO,
"AP does not support MSCS - could not send MSCS Req");
return -1;
--
2.26.2
More information about the Hostap
mailing list