Some of the DFS channel change operations seemed to fail when moving to
new channel based on radar detection without updating the op_class
configuration to match the new channel. Address these by updating
op_class in addition to the channel number in this additional fallback
case.
Fixes: 3bc01a901803 ("Update conf->op_class in hostapd_change_config_freq()")
Signed-off-by: Jouni Malinen <jouni.malinen@oss.qualcomm.com>
oper_centr_freq_seg0_idx);
hostapd_set_oper_centr_freq_seg1_idx(iface->conf,
oper_centr_freq_seg1_idx);
+ if (ieee80211_freq_to_channel_ext(freq, secondary_channel,
+ new_vht_oper_chwidth,
+ &op_class, &chan) !=
+ NUM_HOSTAPD_MODES) {
+ wpa_printf(MSG_DEBUG, "Update op_class %d->%d",
+ iface->conf->op_class, op_class);
+ iface->conf->op_class = op_class;
+ }
hostapd_disable_iface(iface);
hostapd_enable_iface(iface);