From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.113 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796328374; b=sAkfsqsFlTU5KI1aSSpuZFpWBRl/z4bqMbW/yi3bQOKcQ0Ak9REfX4MpFA+sYejwi+J+ CkzyDY7nBL78SyS1JqfPaNJM5oU+JCUhK2XwzbGuO7eMQ+0X/jjyM3CHY+muPthhnAe+m EIZ6Zlx6YVLOQwUFBIIB5zFUiMYM9dMWJxQ+ZWWvBcHoDI+W69ad6NcLR9g+OaLnCx1p+ hoWdqXMkSL06G4BrFkFKzn/8VlBSebqHw2Nf82en20kxJGKV1plE33zYY0kSO5Ax+60uo nPMpeug3Lx30j5HfmcVbJSQxRbnQ6hYJXwzWG697EOSYa7OwhSQ3hIY2TW0DV4YX/AA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796328374; 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=2xNTl2b9LPo0/V0Nk+UcUCrznrNVTHImWmignsBLtW0=; b=g+Fu8JBwcOT5H01K6TmzqKK+Y1Frva5rvUTpuoWHL+MQ1J+MVv1E9V/nXicvOdgXG2jG lkewXHZqELrgIBKUR3ndOx5Pg8St9qhe8BO5OmH1cf7hgcUAk36bSwmYgEiOA1GO/J8kb SrmBTYwsRJL5/zRqtoWV3gXPr3ugtfNBlVFWkH8N+KUEFCWncAEkjxogtCAJQv5CjJcMr veWxfSCpP/lZNuTCT1Q0Gt6UrBIoQQYcNB7vgworE1g+0MEEUAo9BZV5UlUgmQZoGzdfp 6tB/vizNAOwBs748CdPsfbAgLPwnHg6rDTvCOGORZqb5cQp1NysuW+G5UQPrZUHuLOg== 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=J1LqvpR1; arc=none smtp.remote-ip=95.215.58.113 Received: from mta1.migadu.com (out-113.mta1.migadu.com [95.215.58.113]) (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 69025606A334 for ; Thu, 3 Dec 2026 20:06:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 69025606A334 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=J1LqvpR1 X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=2xNTl2b9LPo0/V0Nk+UcUCrznrNVTHImWmignsBLtW0=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796328371; v=1; x=1796933171; b=J1LqvpR1hJTGS3f+H1ixzSaKN2wXkZ+2Q84lsZOPE+lYSO8OSHxuvGDwhR4p2ny29O/uUT32 P8Sp9ycgNh20vVSZfcuV32uVz0opUUbgkkIUTWJALkwChomTK+u7+hs4VWkBPRj1kRzH7FdPpkT T5qyghmYvgHppyHPTkp8Sw9g= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 87bfbff25ff99e2c; Thu, 03 Dec 2026 20:06:11 +0000 X-Mizu-Trace-ID: 87bfbff25ff99e2c X-Migadu-Flow: FLOW_OUT Date: Thu, 03 Dec 2026 21:06:10 +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: <07D60311-5CE4-44D8-B666-84F247A91547@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 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 >--- > Same nit as for patch 1. Reviewed-by: Luka Gejak Best regards, Luka Gejak