[PATCH 2/4] hostapd: DFS adjust center freq correctly for VHT20/VHT40
Janusz Dziedzic
janusz.dziedzic
Thu Oct 24 08:40:26 PDT 2013
Setup correct seg0 when VHT and width 20/40 MHz
(VHT_CHANWIDTH_USE_HT).
Signed-hostap: Janusz Dziedzic <janusz.dziedzic at tieto.com>
---
src/ap/dfs.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/ap/dfs.c b/src/ap/dfs.c
index 70696cd..10e7e48 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -150,7 +150,13 @@ static void dfs_adjust_vht_center_freq(struct hostapd_data *hapd,
switch (hapd->iconf->vht_oper_chwidth) {
case VHT_CHANWIDTH_USE_HT:
- hapd->iconf->vht_oper_centr_freq_seg0_idx = chan->chan + 2;
+ if (hapd->iconf->secondary_channel == 1)
+ hapd->iconf->vht_oper_centr_freq_seg0_idx = chan->chan + 2;
+ else if (hapd->iconf->secondary_channel == -1)
+ hapd->iconf->vht_oper_centr_freq_seg0_idx = chan->chan - 2;
+ else
+ hapd->iconf->vht_oper_centr_freq_seg0_idx = chan->chan;
+
break;
case VHT_CHANWIDTH_80MHZ:
hapd->iconf->vht_oper_centr_freq_seg0_idx = chan->chan + 6;
--
1.7.9.5
More information about the Hostap
mailing list