From patchwork Thu May 4 08:04:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael-CY Lee X-Patchwork-Id: 13230896 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B632EC7EE21 for ; Thu, 4 May 2023 08:05:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=xI/iag2niQ/d5sOhpBmw/fAzfR/Xoql4du0mBm4cXLQ=; b=saeTHlTnULK2LSrZ8Fw+sOPrR2 rXXm6RnbITPPteemBDkxTop5j9kdqB86+pF2s068f3dlXYK0zwgi60uqfmbtTqsgPA0kKceKXsHi/ QRFdUQ0H/SDaKlnIkgd/2RuL7dKh0NEqpZLgwUNv1lgVaFQ2EM+g/9wHSck7oeXNtLRMDpBPiONSu e/QW7VqRLtbgPrvYbpUeCgMAD9Kf9nHIG7ot91Y44GUN+BCgzCDh0qIYP5f4enB3DIzu/GLP4RJYE oFVs3elriFkdNx7EjZHFYVdawhpySA2sgS/G3ZZ66vNSgztaUR5Kji7o52oY8ugnnwhbJQyURTDnz tC2cTwhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1puTxR-0071LH-2D; Thu, 04 May 2023 08:04:57 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1puTxO-0071KW-34 for linux-mediatek@lists.infradead.org; Thu, 04 May 2023 08:04:56 +0000 X-UUID: 58a1314eea5211ed912e1518a6540028-20230504 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=xI/iag2niQ/d5sOhpBmw/fAzfR/Xoql4du0mBm4cXLQ=; b=NtlTfSwQKPnFPV9soBl2s59w+uzM2HxbFiAy6Bfz3gMQoHiHZo+ciQS80X64HgpeRsdRl3q3QnRYCfYMDi8mZWxmTofU2OZ5t7LBEgslLqifXaU3uyShBUFNO0DdubEROXbJWfpZtX8kwWYe4J/PevCs3cj9Pxxxr0/AP3oW7Wk=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.23,REQID:495fe88c-5f65-4564-8155-58785a49011a,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:697ab71,CLOUDID:3cf9b630-6935-4eab-a959-f84f8da15543,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: 58a1314eea5211ed912e1518a6540028-20230504 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1678737822; Thu, 04 May 2023 01:04:51 -0700 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Thu, 4 May 2023 16:04:49 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 4 May 2023 16:04:49 +0800 From: Michael-CY Lee To: linux-wireless CC: Johannes Berg , Felix Fietkau , Lorenzo Bianconi , Evelyn Tsai , Money Wang , linux-mediatek , Michael-CY Lee Subject: [PATCH v2] wifi: mac80211: Abort running color change when stopping the AP Date: Thu, 4 May 2023 16:04:41 +0800 Message-ID: <20230504080441.22958-1-michael-cy.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230504_010454_999313_88AE1B2E X-CRM114-Status: UNSURE ( 9.55 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Michael Lee 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: 5f9404abdf2a (mac80211: add support for BSS color change) Signed-off-by: Michael Lee --- net/mac80211/cfg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 343ce2b..e6df30d 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1537,9 +1537,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);