mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 02:44:03 -05:00
ACS: Fix VHT20
The center segment0 calculation for VHT20 ACS was incorrect. This caused ACS to fail with: "Could not set channel for kernel driver". Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
This commit is contained in:
parent
c1cec68b93
commit
c3722e1241
13
src/ap/acs.c
13
src/ap/acs.c
@ -639,23 +639,26 @@ acs_find_ideal_chan(struct hostapd_iface *iface)
|
|||||||
|
|
||||||
static void acs_adjust_vht_center_freq(struct hostapd_iface *iface)
|
static void acs_adjust_vht_center_freq(struct hostapd_iface *iface)
|
||||||
{
|
{
|
||||||
|
int offset;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "ACS: Adjusting VHT center frequency");
|
wpa_printf(MSG_DEBUG, "ACS: Adjusting VHT center frequency");
|
||||||
|
|
||||||
switch (iface->conf->vht_oper_chwidth) {
|
switch (iface->conf->vht_oper_chwidth) {
|
||||||
case VHT_CHANWIDTH_USE_HT:
|
case VHT_CHANWIDTH_USE_HT:
|
||||||
iface->conf->vht_oper_centr_freq_seg0_idx =
|
offset = 2 * iface->conf->secondary_channel;
|
||||||
iface->conf->channel + 2;
|
|
||||||
break;
|
break;
|
||||||
case VHT_CHANWIDTH_80MHZ:
|
case VHT_CHANWIDTH_80MHZ:
|
||||||
iface->conf->vht_oper_centr_freq_seg0_idx =
|
offset = 6;
|
||||||
iface->conf->channel + 6;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* TODO: How can this be calculated? Adjust
|
/* TODO: How can this be calculated? Adjust
|
||||||
* acs_find_ideal_chan() */
|
* acs_find_ideal_chan() */
|
||||||
wpa_printf(MSG_INFO, "ACS: Only VHT20/40/80 is supported now");
|
wpa_printf(MSG_INFO, "ACS: Only VHT20/40/80 is supported now");
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iface->conf->vht_oper_centr_freq_seg0_idx =
|
||||||
|
iface->conf->channel + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user