In hostapd_set_freq_params(), if center_segment0 is 2, call
ieee80211_chan_to_freq() with operating class 136 instead of 131.
This is needed because, channel 2 is an exception in the 6 GHz band. It
comes before channel 1 and is part of operating class 136.
Channels order in 6 GHz:
2 (Operating Class 136)
1 5 9 .... (Operating Class 131)
Signed-off-by: Thirusenthil Kumaran J <quic_thirusen@quicinc.com>
} else {
int freq1, freq2 = 0;
int bw = center_idx_to_bw_6ghz(center_segment0);
+ int opclass;
if (bw < 0) {
wpa_printf(MSG_ERROR,
return -1;
}
- freq1 = ieee80211_chan_to_freq(NULL, 131,
+ /* The 6 GHz channel 2 uses a different operating class
+ */
+ opclass = center_segment0 == 2 ? 136 : 131;
+ freq1 = ieee80211_chan_to_freq(NULL, opclass,
center_segment0);
if (freq1 < 0) {
wpa_printf(MSG_ERROR,