DFS: Use helper functions for VHT/HE parameters

This is needed to cover the HE-specific conf->he_oper_chwidth value in
addition to conf->vht_oper_chwidth.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
This commit is contained in:
Markus Theil 2020-06-30 13:53:23 +02:00 committed by Jouni Malinen
parent a72599b319
commit c3f37c35f0

View file

@ -955,10 +955,13 @@ dfs_downgrade_bandwidth(struct hostapd_iface *iface, int *secondary_channel,
if (*skip_radar) { if (*skip_radar) {
*skip_radar = 0; *skip_radar = 0;
} else { } else {
if (iface->conf->vht_oper_chwidth == CHANWIDTH_USE_HT) int oper_chwidth;
oper_chwidth = hostapd_get_oper_chwidth(iface->conf);
if (oper_chwidth == CHANWIDTH_USE_HT)
break; break;
*skip_radar = 1; *skip_radar = 1;
iface->conf->vht_oper_chwidth--; hostapd_set_oper_chwidth(iface->conf, oper_chwidth - 1);
} }
} }