There is a chance that the driver has switched the channel width so we
should update the bandwidth, too, when receiving a channel switch event.
Otherwise, this may cause out of sync for bandwidth between i802_link
and hostapd_config.
Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
mld_link = nl80211_get_link(bss,
data.ch_switch.link_id);
mld_link->freq = data.ch_switch.freq;
+ if (bw)
+ mld_link->bandwidth = channel_width_to_int(
+ data.ch_switch.ch_width);
} else {
bss->flink->freq = data.ch_switch.freq;
+ if (bw)
+ bss->flink->bandwidth = channel_width_to_int(
+ data.ch_switch.ch_width);
}
}