DFS: Adjust center freq correctly for VHT20/VHT40

Setup correct seg0 for VHT with 20/40 MHz width (VHT_CHANWIDTH_USE_HT).

Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
This commit is contained in:
Janusz Dziedzic 2013-10-26 16:28:45 +03:00 committed by Jouni Malinen
parent 1dc17db34a
commit 345276a6b5

View file

@ -154,7 +154,14 @@ 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;