Commit a23d7f5b authored by Michael Lee's avatar Michael Lee Committed by Johannes Berg
Browse files

wifi: mac80211: Abort running color change when stopping the AP



When stopping the AP, there might be a color change in progress. It
should be deactivated here, or the driver might later finalize a color
change on a stopped AP.

Fixes: 5f9404ab (mac80211: add support for BSS color change)
Signed-off-by: default avatarMichael Lee <michael-cy.lee@mediatek.com>
Link: https://lore.kernel.org/r/20230504080441.22958-1-michael-cy.lee@mediatek.com


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 248e4776
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1578,9 +1578,10 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev,
		sdata_dereference(link->u.ap.unsol_bcast_probe_resp,
				  sdata);

	/* abort any running channel switch */
	/* abort any running channel switch or color change */
	mutex_lock(&local->mtx);
	link_conf->csa_active = false;
	link_conf->color_change_active = false;
	if (link->csa_block_tx) {
		ieee80211_wake_vif_queues(local, sdata,
					  IEEE80211_QUEUE_STOP_REASON_CSA);