mirror of
https://github.com/openwrt/openwrt.git
synced 2026-11-28 23:03:53 +04:00
switch_channel() takes the width from oper_chwidth and falls back to the current width of the interface. freq_info() did not return it, so a config change of the width alone made a channel switch with the old width and the new centre frequency, which the kernel refuses, and the radio restarted instead. Return oper_chwidth from freq_info(). start() reads the same field, so a start with a frequency from wpa_supplicant now also takes the width of the config, which matches the centre frequency that freq_info() computes for it. switch_channel() also returned the result of the last BSS only. mac80211 does not finalise a channel switch that only part of the BSSes of a radio take part in, so stop at the first BSS that fails and let the caller restart the radio. Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>