Fix center segment indexes in channel switch fallback to non-5 GHz cases
Hardcoded conversion for 5 GHz band was used, but this won't work for other cases. Set the correct center segment indexes in channel switch fallback for non-5GHz band. Signed-off-by: Jurijs Soloveckis <jsoloveckis@maxlinear.com>
This commit is contained in:
parent
7cf3ceadaa
commit
2e1f7d091c
1 changed files with 3 additions and 3 deletions
|
@ -4464,15 +4464,15 @@ void
|
||||||
hostapd_switch_channel_fallback(struct hostapd_iface *iface,
|
hostapd_switch_channel_fallback(struct hostapd_iface *iface,
|
||||||
const struct hostapd_freq_params *freq_params)
|
const struct hostapd_freq_params *freq_params)
|
||||||
{
|
{
|
||||||
int seg0_idx = 0, seg1_idx = 0;
|
u8 seg0_idx = 0, seg1_idx = 0;
|
||||||
enum oper_chan_width bw = CONF_OPER_CHWIDTH_USE_HT;
|
enum oper_chan_width bw = CONF_OPER_CHWIDTH_USE_HT;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "Restarting all CSA-related BSSes");
|
wpa_printf(MSG_DEBUG, "Restarting all CSA-related BSSes");
|
||||||
|
|
||||||
if (freq_params->center_freq1)
|
if (freq_params->center_freq1)
|
||||||
seg0_idx = 36 + (freq_params->center_freq1 - 5180) / 5;
|
ieee80211_freq_to_chan(freq_params->center_freq1, &seg0_idx);
|
||||||
if (freq_params->center_freq2)
|
if (freq_params->center_freq2)
|
||||||
seg1_idx = 36 + (freq_params->center_freq2 - 5180) / 5;
|
ieee80211_freq_to_chan(freq_params->center_freq2, &seg1_idx);
|
||||||
|
|
||||||
switch (freq_params->bandwidth) {
|
switch (freq_params->bandwidth) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
Loading…
Reference in a new issue