From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.99 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796328471; b=GfT260q/lzYKbogQkSAyYVL4g48RUw5axi4X1Jc9E3H/qgbyyHVdAYgjcFWZ3dGyp4SS hG2slrV6moM23FstN5zeiAOvG4X8OSo5fgxBE9rL9qoIW0BQMkGzdvpdENLwiuhAs8Sxd vnjG8Yc+ZmwjS5nmIMf58YDHZ59USc8JJH6BZhbiFFzeMlS+UlpEVM8VuZG2UbXNND9XA vfYOERaoE/dTLq/hVeIj1TwY8m7PqGUIqoY3WHC8XkOl0/+u4cJQA4/afbeP4Akywxdpo O6l9VxyYhEHEjOFHgRlvPfxVzR57tCLa7gkU1HWUgTeSqZ995oMbo1X8bD2tqqKJTGg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796328471; 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=xNxQ2o2MC0tb1MeGpvPZNqmqh8p7QeknmkCkUhwWmMo=; b=caK7Rh7QdOPqADjca88Eq8kljn+2FyRH8P4cXYi0e6/AYz/NadqgzzUsQdqP1jgMY6ST EqWQsrhBhY+VwU/Fk6qqB6PB6NVxyPlnVfPyYdHRLuYqXNXctPCciIPENc7KUkyImL+P7 lcJBUFE8anXiSy8KWDvdAD0zERiDFqxnStzMbM3sKCfv0hdlXL0cTmnfWyAuNsixkiWo1 EmPIhG6Icdw9QsTpLE9Ol+/zxVpXAIlnRLuQBzGkzRCvNbyHvBDI+rVf0X3lZr4a8teHB CgBAoGT02Ws7Ue1XYAn1Y+ekpzlcOqiXdaxEo0g97bpiu5Bsrs3s9l9l2soaUI6Qgjw== 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="E/j1elsG"; arc=none smtp.remote-ip=91.218.175.99 Received: from mta0.migadu.com (out-99.mta0.migadu.com [91.218.175.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 047CB606A322 for ; Thu, 3 Dec 2026 20:07:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 047CB606A322 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=E/j1elsG X-Envelope-To: linux-wireless@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=xNxQ2o2MC0tb1MeGpvPZNqmqh8p7QeknmkCkUhwWmMo=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796328469; v=1; x=1796933269; b=E/j1elsGH9IVTwr860Gmt0YgTRRV6FywbEINZFaimEvkARfTBXpn+eeowsZy8XWrajkHdoC2 /wjjiKtArinpf3rqZ00JmOTG8E3QZPCQaGEZFv84mYlhwxv5iLkooJE8OiZRYjRvJy5Zz8QfKZl Mslua5SgkQiMEhjnH2YGSjsk= X-Envelope-To: linux-wireless@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 68e23596d49dfd55; Thu, 03 Dec 2026 20:07:48 +0000 X-Mizu-Trace-ID: 68e23596d49dfd55 X-Migadu-Flow: FLOW_OUT Date: Thu, 03 Dec 2026 21:07:44 +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: <07D60311-5CE4-44D8-B666-84F247A91547@linux.dev> References: <20261203184700.3636262-1-mehmet.fide@gmail.com> <20261203184700.3636262-3-mehmet.fide@gmail.com> <07D60311-5CE4-44D8-B666-84F247A91547@linux.dev> Message-ID: <79E83EA0-4DE9-4721-AA1A-6CC062AA8FD8@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 On December 3, 2026 9:06:10 PM GMT+01:00, Luka Gejak wrote: >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 > Please ignore this email. I accidentally sent it to patch 2.