mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
hostapd: Add support for DFS with 160 MHz channel width
Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
This commit is contained in:
parent
6de0e0c99e
commit
899cc14e10
22
src/ap/dfs.c
22
src/ap/dfs.c
@ -31,6 +31,9 @@ static int dfs_get_used_n_chans(struct hostapd_data *hapd)
|
|||||||
case VHT_CHANWIDTH_80MHZ:
|
case VHT_CHANWIDTH_80MHZ:
|
||||||
n_chans = 4;
|
n_chans = 4;
|
||||||
break;
|
break;
|
||||||
|
case VHT_CHANWIDTH_160MHZ:
|
||||||
|
n_chans = 8;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -132,8 +135,11 @@ static void dfs_adjust_vht_center_freq(struct hostapd_data *hapd,
|
|||||||
case VHT_CHANWIDTH_80MHZ:
|
case VHT_CHANWIDTH_80MHZ:
|
||||||
hapd->iconf->vht_oper_centr_freq_seg0_idx = chan->chan + 6;
|
hapd->iconf->vht_oper_centr_freq_seg0_idx = chan->chan + 6;
|
||||||
break;
|
break;
|
||||||
|
case VHT_CHANWIDTH_160MHZ:
|
||||||
|
hapd->iconf->vht_oper_centr_freq_seg0_idx =
|
||||||
|
chan->chan + 14;
|
||||||
default:
|
default:
|
||||||
wpa_printf(MSG_INFO, "DFS only VHT20/40/80 is supported now");
|
wpa_printf(MSG_INFO, "DFS only VHT20/40/80/160 is supported now");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,9 +169,13 @@ static int dfs_get_start_chan_idx(struct hostapd_data *hapd)
|
|||||||
channel_no =
|
channel_no =
|
||||||
hapd->iconf->vht_oper_centr_freq_seg0_idx - 6;
|
hapd->iconf->vht_oper_centr_freq_seg0_idx - 6;
|
||||||
break;
|
break;
|
||||||
|
case VHT_CHANWIDTH_160MHZ:
|
||||||
|
channel_no =
|
||||||
|
hapd->iconf->vht_oper_centr_freq_seg0_idx - 14;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
wpa_printf(MSG_INFO,
|
wpa_printf(MSG_INFO,
|
||||||
"DFS only VHT20/40/80 is supported now");
|
"DFS only VHT20/40/80/160 is supported now");
|
||||||
channel_no = -1;
|
channel_no = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -344,6 +354,10 @@ static int set_dfs_state(struct hostapd_data *hapd, int freq, int ht_enabled,
|
|||||||
n_chans = 4;
|
n_chans = 4;
|
||||||
frequency = cf1 - 30;
|
frequency = cf1 - 30;
|
||||||
break;
|
break;
|
||||||
|
case CHAN_WIDTH_160:
|
||||||
|
n_chans = 8;
|
||||||
|
frequency = cf1 - 70;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
wpa_printf(MSG_INFO, "DFS chan_width %d not supported",
|
wpa_printf(MSG_INFO, "DFS chan_width %d not supported",
|
||||||
chan_width);
|
chan_width);
|
||||||
@ -394,6 +408,10 @@ static int dfs_are_channels_overlapped(struct hostapd_data *hapd, int freq,
|
|||||||
radar_n_chans = 4;
|
radar_n_chans = 4;
|
||||||
frequency = cf1 - 30;
|
frequency = cf1 - 30;
|
||||||
break;
|
break;
|
||||||
|
case CHAN_WIDTH_160:
|
||||||
|
radar_n_chans = 8;
|
||||||
|
frequency = cf1 - 70;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
wpa_printf(MSG_INFO, "DFS chan_width %d not supported",
|
wpa_printf(MSG_INFO, "DFS chan_width %d not supported",
|
||||||
chan_width);
|
chan_width);
|
||||||
|
Loading…
Reference in New Issue
Block a user