]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DFS: Use helper functions for VHT/HE parameters
authorMarkus Theil <markus.theil@tu-ilmenau.de>
Tue, 30 Jun 2020 11:53:23 +0000 (13:53 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 14 Oct 2020 10:05:11 +0000 (13:05 +0300)
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>
src/ap/dfs.c

index f62da49a78b8cf7dcff909909c2ba155e26af8f3..f04a00af0ed4a92ef1f21b672d30cfba035b8715 100644 (file)
@@ -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);
                }
        }