robust_av: Use wpa_bss_ext_capab() helper
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@intel.com>
This commit is contained in:
parent
32cb91549e
commit
2cadb60abd
1 changed files with 2 additions and 6 deletions
|
@ -48,18 +48,14 @@ void wpas_populate_mscs_descriptor_ie(struct robust_av_data *robust_av,
|
||||||
int wpas_send_mscs_req(struct wpa_supplicant *wpa_s)
|
int wpas_send_mscs_req(struct wpa_supplicant *wpa_s)
|
||||||
{
|
{
|
||||||
struct wpabuf *buf;
|
struct wpabuf *buf;
|
||||||
const u8 *ext_capab = NULL;
|
|
||||||
size_t buf_len;
|
size_t buf_len;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (wpa_s->wpa_state != WPA_COMPLETED || !wpa_s->current_ssid)
|
if (wpa_s->wpa_state != WPA_COMPLETED || !wpa_s->current_ssid)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (wpa_s->current_bss)
|
if (!wpa_s->current_bss ||
|
||||||
ext_capab = wpa_bss_get_ie(wpa_s->current_bss,
|
!wpa_bss_ext_capab(wpa_s->current_bss, WLAN_EXT_CAPAB_MSCS)) {
|
||||||
WLAN_EID_EXT_CAPAB);
|
|
||||||
|
|
||||||
if (!ext_capab || ext_capab[1] < 11 || !(ext_capab[12] & 0x20)) {
|
|
||||||
wpa_dbg(wpa_s, MSG_INFO,
|
wpa_dbg(wpa_s, MSG_INFO,
|
||||||
"AP does not support MSCS - could not send MSCS Req");
|
"AP does not support MSCS - could not send MSCS Req");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue