This series contains patches from the OpenWrt project which add support for running an AP and an STA on the same radio and still be able to switch channels. A test for it has also been added. Note that there is a major difference from the version in OpenWrt: the CSA count that is passed to hostapd was originally set to the counter the STA receives minus 1 ("count - 1"), while it has now been changed to be the same as the counter the STA receives ("count"). When testing the OpenWrt version with hwsim, the following kernel warning is triggered: """ /* the counter should never reach 0 */ WARN_ON_ONCE(!beacon->cntdwn_current_counter); """ It is triggered because by sending "count - 1", the AP is ready to switch channels - and reaches a count of 1 - one beacon interval sooner than the STA. As a consequence, the AP has to wait and send one more beacon, reaching a count of 0 (which should not happen, as the comment in the kernel code states). By sending the AP the same counter the STA receives, we make sure this doesn't happen. It has to be noted that what can *still* happen, is the AP receiving a counter that is "out of date". Indeed, if the supplicant takes time to give the AP the counter, we could end up in a situation where the station is ready to switch before the AP is (the reverse of the issue described above). From a quick test with hwsim however, this latter case does not seem to cause any problem with the channel switch (other than it taking more time). The 3 corresponding patches in OpenWrt are: package/network/services/hostapd/patches/340-reload_freq_change.patch package/network/services/hostapd/patches/360-ctrl_iface_reload.patch package/network/services/hostapd/patches/370-ap_sta_support.patch Arnout Vandecappelle (Essensium/Mind) (1): tests: AP+STA on same radio Felix Fietkau (3): hostapd: ctrl_iface: add UPDATE command Add support for AP+STA on a single radio hostapd_reload_config: allow update of mode and frequency hostapd/ctrl_iface.c | 67 +++++++++++++++++ src/ap/beacon.c | 5 -- src/ap/ctrl_iface_ap.c | 8 +- src/ap/hostapd.c | 50 +++++++++---- src/drivers/driver.h | 2 + src/drivers/driver_nl80211_event.c | 6 +- tests/hwsim/test_ap_csa.py | 115 +++++++++++++++++++++++++++++ wpa_supplicant/Makefile | 2 + wpa_supplicant/bss.c | 10 +++ wpa_supplicant/bss.h | 2 + wpa_supplicant/events.c | 44 ++++++++++- wpa_supplicant/main.c | 8 +- wpa_supplicant/wpa_supplicant.c | 70 ++++++++++++++++++ wpa_supplicant/wpa_supplicant_i.h | 7 ++ 14 files changed, 371 insertions(+), 25 deletions(-) -- 2.37.3 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap