From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.99 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796328341; b=C4vOVl7LCoUL54f0vITHSDTVSp3vmGst/0wJQjAO05+0NQwdBPHtdmg8lZ0/3nxZgWeE +4usHtoYEcT074JFu7DLIOHiPLTwOEFZe/mf40PQ4FQFSzRNzV+knvRtYGOoLVT8fP5l7 fzCPxo82WTL27Kszo75jfedngufzcfT727eTawMUFOO0/l7R9omQst1uE1X8X2YJyarVr zseMtzlxRIDEBNFKmLLmT407O73y19bN8sArQQDkXPf0kgwxlZ7ar8piNROfTjxml+L+i CHfi8HUZyyaOf0fO+3poZiYFknv4w9sVFaC2f6L8OjpXd9U/jAC4KAS64fepYj786cQ== 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=v+NdNeC1yzPlc8bVc9HdgchOnZHd8i+Ri0sCnsXbuzVrIzM3QhmKp+1mtQxt5a4cur36 wdLODfCgxMpGVufKlGsBtrLY8kDDCkzih5/TqqpUQ2gaW/yPjXvFB5XKTOJhh3ckmeycJ b2X2VaIEOrr41Vusax7fdPhRoBi6LfDdSev02w6A3u6SaC1S42ylqWMMvQP1xC0IYyzZU FyuAQF9QY0OTDTsf8hWcWu3sf5W0m7M7jD5noxuZIoHKcTEX2mF3j92tkUI7cIahv2NH1 okf4L1P3bSbXPME1UmJbf//Wc0yFPkPIRZqagfMhFoNcfOxebEXUr+vciRfo/IbYgjQ== 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.99 Received: from mta1.migadu.com (out-99.mta1.migadu.com [95.215.58.99]) (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 62292606A333 for ; Thu, 3 Dec 2026 20:05:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 62292606A333 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-wireless@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-wireless@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-wireless@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