From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.100 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796328341; b=32OSD3Y3nRH5UaFfrQWhMs2MMInmDgxYTuVYFMWkBBW8WT6Ac6YQzx64JXEe4tDSTwTD fSGuNbMMAG9hSjeTC/kviHh1Cho+ri8uA3zgHnMVbpL0zk+LhcQQFc+rGO/cDA3S9RS8J HsE+l89StouT+xe9z+ilPtiGqgc2/lwKxYxCYhGnmGT4t7mYjUINCoazJvfcgQ0SFaxmP IWgWlpLLakANkFl9ntb17u8O29JpdHn9sHjhrhoglmDwifRJCzPlsuBjqVXr/AO8ESG+l rXyXZp1q3SkiE4gMkhYCMt70MgCsZfOCgh1EUhcwO1r2lR1gVa/d0+LluFO5kXXJSCQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796328341; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:CC:Subject:In-Reply-To: References:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=wxprzd8F0EKwjMcKUVHiLuy9MNzLGw+zPAQpncJyn80=; b=hkTl9r03YOtpCvHf2Bi77JNJDW2M9eA8ollQUlLx+/aZ4rIJk6McKjl1zsU0XB+0Tzn9 MwWng27d7akkj9fn5tjqzXtiz5bZbbrA+/cH2ct5JtUfKffePtvxKbqmaNoNOH9XKNcW0 cVO37T11ZWNpNhKyPtHqMNgx2ZUWpXxUs8fOZGhXuhyUa1k9WjxGsqUiWIVrPKElLQ2SS Fu3GlUugrHH1SD0yzEHljfqfH/gOKW4mq+08jKUhMUEtTdP0+UMayQphNDAMrSfaGyWs/ w1xwcZdlMMEnV4uVcJS3y+o0AtI+Il284qsAJLtQeb1MhpsmG3dgRCAFHZUecy5BWNQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=Fo7Iwel8; arc=none smtp.remote-ip=95.215.58.100 Received: from mta1.migadu.com (out-100.mta1.migadu.com [95.215.58.100]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63BFA606A339 for ; Thu, 3 Dec 2026 20:05:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 63BFA606A339 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=Fo7Iwel8 X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=wxprzd8F0EKwjMcKUVHiLuy9MNzLGw+zPAQpncJyn80=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796328338; v=1; x=1796933138; b=Fo7Iwel8/ptIr1XGsmdaULKxxGmilAChQd+JWDyRI6gFxS9d4k9NiyhcJCAyKLuvPb0oFmTj F4CiBNn9fSf2PMIDt2rvb5hodk6UzL13eG9INN6eUc9a4QK5zB5pQLZKK40THSaS0lJY/k0TXy/ 3YXkKreLYddQi91i7nHBCOTo= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 88ac3cab647e7d9c; Thu, 03 Dec 2026 20:05:37 +0000 X-Mizu-Trace-ID: 88ac3cab647e7d9c X-Migadu-Flow: FLOW_OUT Date: Thu, 03 Dec 2026 21:05:32 +0100 From: Luka Gejak To: Mehmet Fide , Ping-Ke Shih CC: Bitterblue Smith , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, mehmet.fide@screeningeagle.com Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_rtw-next_v17_2/3=5D_wifi=3A_rt?= =?US-ASCII?Q?w88=3A_support_channel_switch_in_AP_mode?= In-Reply-To: <20261203184700.3636262-3-mehmet.fide@gmail.com> References: <20261203184700.3636262-1-mehmet.fide@gmail.com> <20261203184700.3636262-3-mehmet.fide@gmail.com> Message-ID: <00DE6122-F299-41E4-ABC3-3C2989A2584D@linux.dev> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi Mehmet, Thank you for your patience and persistence across 17 version. On December 3, 2026 7:46:59 PM GMT+01:00, Mehmet Fide wrote: >From: Mehmet Fide > >The driver does not set WIPHY_FLAG_HAS_CHANNEL_SWITCH, so hostapd's >CHAN_SWITCH is refused and an rtw88 AP can only change its channel by >restarting. > >The firmware repeats the beacon of the first reserved page, so the >driver has to step the countdown. Set the flag, and when >BSS_CHANGED_BEACON brings a beacon with CSA, start a delayed work that >advances the count with ieee80211_beacon_update_cntdwn() and downloads >the page once per beacon interval. It calls ieee80211_csa_finish() one >interval after the count of 1 was downloaded, and repeats a failed >download with the same count. IBSS uses the same page and work. > >The countdown stops when the AP stops, the interface is removed, >beaconing is disabled, on WoWLAN suspend and in rtw_core_stop(). It >starts again when beaconing is enabled and when a hardware restart >replays the beacon. The CSA state and work are under the driver mutex, >and only the stop paths clear csa.vif. > >During a countdown the page beacon is fetched with >ieee80211_beacon_get_template(), which leaves the count alone, so any >other download carries the current count. The TIM update, the PG backup >and the download on association are left to the next step. An AP that >stops with a station interface left downloads the page once more. >Scans are refused, as they would take the AP off its channel. > >A channel change outside a scan and outside an off-channel period, >while an AP is up or a station is associated, runs the calibration that >start_ap and the association run. This also covers a count of 0 or 1, >which mac80211 finalizes without a countdown, and a station that >follows the switch of its AP. On the RTL8822C the calibration includes >the GAPK and the DPK, which take about 0.2 s over PCIe and up to 1.7 s >over USB. mac80211 replaces the beacon only after the channel change, >so until then the firmware repeats the beacon with the count of 1 on >the new channel. A switch is refused while a second interface is up: >that interface keeps the shared channel, and mac80211 would stop the AP >at the end of the countdown. > >Signed-off-by: Mehmet Fide >--- > One nit: this commit message is rather extensive, and could be shortened significantly. I don't have a strong preference for long or short commit messages so I will leave to Ping-Ke to decide whether it needs to be shortened or if he will take it as is. Either way, the code looks good to me, Reviewed-by: Luka Gejak Best regards, Luka Gejak