From: Markus Theil Date: Tue, 30 Jun 2020 11:53:23 +0000 (+0200) Subject: DFS: Use helper functions for VHT/HE parameters X-Git-Tag: hostap_2_10~820 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3f37c35f0ef02bd88ce4faf25a466e52e7a64f8;p=thirdparty%2Fhostap.git 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 --- diff --git a/src/ap/dfs.c b/src/ap/dfs.c index f62da49a7..f04a00af0 100644 --- a/src/ap/dfs.c +++ b/src/ap/dfs.c @@ -955,10 +955,13 @@ dfs_downgrade_bandwidth(struct hostapd_iface *iface, int *secondary_channel, if (*skip_radar) { *skip_radar = 0; } 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; *skip_radar = 1; - iface->conf->vht_oper_chwidth--; + hostapd_set_oper_chwidth(iface->conf, oper_chwidth - 1); } }