Derive seg0_idx and seg1_idx for 6 GHz when processing channel switch
The function hostapd_event_ch_switch() derived the seg0_idx and seg1_idx values only for the 5 GHz and 2.4 GHz bands and the 6 GHz case ended up using incorrect calculation based on the 5 GHz channel definitions. Fix this by adding support for 6 GHz frequencies. Signed-off-by: Rohan <drohan@codeaurora.org>
This commit is contained in:
parent
5644b23de1
commit
0fa274d2bf
1 changed files with 11 additions and 2 deletions
|
@ -893,9 +893,18 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
|
||||||
|
|
||||||
switch (hapd->iface->current_mode->mode) {
|
switch (hapd->iface->current_mode->mode) {
|
||||||
case HOSTAPD_MODE_IEEE80211A:
|
case HOSTAPD_MODE_IEEE80211A:
|
||||||
if (cf1 > 5000)
|
if (cf1 == 5935)
|
||||||
|
seg0_idx = (cf1 - 5925) / 5;
|
||||||
|
else if (cf1 > 5950)
|
||||||
|
seg0_idx = (cf1 - 5950) / 5;
|
||||||
|
else if (cf1 > 5000)
|
||||||
seg0_idx = (cf1 - 5000) / 5;
|
seg0_idx = (cf1 - 5000) / 5;
|
||||||
if (cf2 > 5000)
|
|
||||||
|
if (cf2 == 5935)
|
||||||
|
seg1_idx = (cf2 - 5925) / 5;
|
||||||
|
else if (cf2 > 5950)
|
||||||
|
seg1_idx = (cf2 - 5950) / 5;
|
||||||
|
else if (cf2 > 5000)
|
||||||
seg1_idx = (cf2 - 5000) / 5;
|
seg1_idx = (cf2 - 5000) / 5;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue