[][MAC80211][hostapd][Avoid color switch when beacon is not set]

Fix the beacon set failure caused by a color switch during AP CAC.

After an AP interface is disabled then enabled by hostapd_cli, when it
is doing CAC, a color collision event might happen and then trigger a
color change request.
A color change request leads to a beacon asignment in MAC80211, which
hostapd is not aware of.
After the CAC, hsotapd tries to set beacon but gets a -EINVAL since the
beacon is already set in MAC80211.

This patch avoids a color switch diring AP CAC.


Change-Id: I3c9f030abd540598ff4b61e2ab6eff506ff056d5
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7958049
2 files changed