From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.209 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795180226; b=TSVdMzFmsprVhPvmrP+76r50ADsEcYouHDGILdZO8Y78uXNfhaRD2HhAgYgJaIopOWDh bnSMUgCOKHG9wBqn5IarTTKe0e0jnPuwc+yBBJap/r7eDlmML5VRgVpoZAq7uAyQ2YNzE OllzQQf/TbW9z6P5mpNSTiCwE/ko98flwcrRzglgNHAxUJkTgiSxsGONyJwHU/tDtHhII pEQe489gl9ZeVK1hqPW8f6dkgb1CGgh/t+AsSlSDDNPWHgEAcw7RnoQWgmznZb3IR+xMI w6dEbC7QzwoVkOrqdpEEA6kDBMkPsgSr6ZdJVoxeFZ14UcphGvaf4h8PIeXo7WQfe+Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795180226; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:Content-Type:MIME-Version: Content-Transfer-Encoding; bh=xn1IO6yTvSHdprDu/FiOyBMJU5m8bDoeHEsv2AenIc4=; b=KLT23UHZdgWScrCOnz65BurK/dh8D7mbEGZWwYGJa6tIYIfqw0hc82AXCNEHwHFYXyNK N86l5uwp9C5UILKD+L3E8u3rcUUgO2aKJMuQsx1Ahgp9N8TiNbW+DrVFF6ccsGVzCslFE st93TlxDlmqj5fbD5YTU1baNwty+8U+prBS/UOuIE6LJ7Cofy6wDsZrPHi8rZz1qzsauc DJpjLHBIeJbnRZ/mtPNeNon1VlJha3ZFFQPOcClysFOwK41u3EcmIE3P3lDk7ArU704Jt mja4bL0dhmmTqZwFkLvPI9RbAgPIu4FP+5QYJmfYcIT5Bcqug0/g7e4ye596d2jZI0Q== 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=HWCRpDos; arc=none smtp.remote-ip=95.215.58.209 Received: from mta1.migadu.com (out-209.mta1.migadu.com [95.215.58.209]) (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 8E132606A335 for ; Fri, 20 Nov 2026 13:10:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8E132606A335 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=HWCRpDos X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=KoBbJloLNnkG9NTyYWoY5FE+8hjeV5tHp18rUKV63Mg=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1795180223; v=1; x=1795785023; b=HWCRpDosCNKt73U7lcvSyi4GbkJigFjgxoFm+/xWTLb9CqiTOlmxjHavc/n+Ri8XyWvGZUNz R+1qbsLJvw6sx1fKjwuivzap/x4K5iuQydKn1UDu14tvjNnjcULSsOjZIg6huoq/hlLdn1lPOfc aVG7Q9hpe7CfFvtzKfoPjtMI= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 7a655038b72e5eef; Fri, 20 Nov 2026 13:10:20 +0000 X-Mizu-Trace-ID: 7a655038b72e5eef X-Migadu-Flow: FLOW_OUT From: Luka Gejak To: Mehmet Fide , Ping-Ke Shih Cc: Sascha Hauer , Zong-Zhe Yang , Tzu-En Huang , Yan-Hsuan Chuang , Kalle Valo , Stanislaw Gruszka , Brian Norris , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, mehmet.fide@screeningeagle.com Subject: Re: [PATCH rtw-next v3 1/5] wifi: rtw88: free the reserved pages of an interface on firmware recovery Date: Fri, 20 Nov 2026 14:09:16 +0100 Message-ID: <20261120131000.33858-1-luka.gejak@linux.dev> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261117171003.1840491-2-mehmet.fide@gmail.com> References: <20261117171003.1840491-1-mehmet.fide@gmail.com> <20261117171003.1840491-2-mehmet.fide@gmail.com> Content-Type: text/plain; charset="us-ascii" 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-Transfer-Encoding: 8bit Hi Mehmet, Thanks for the update. Two comments below. On November 17, 2026 6:09:59 PM GMT+01:00, Mehmet Fide wrote: > @@ -1765,6 +1768,9 @@ int rtw_fw_download_rsvd_page(struct rtw_dev *rtwdev) > u32 size; > int ret; > > + if (bitmap_empty(rtwdev->hw_port, RTW_PORT_NUM)) > + return 0; > + > buf = rtw_build_rsvd_page(rtwdev, &size); Could this skip a download that WoWLAN needs? If suspend flushes the recovery work while it holds RTNL, ieee80211_restart_work() cannot add the interfaces back before rtw_wow_suspend() runs. With net detect configured, the station interface can still be picked for WoWLAN. rtw_wow_leave_no_link_ps() can power the device back up without setting the port bitmap again. So rtw_wow_config_wow_fw_rsvd_page() adds the scan pages, but the check above returns success before downloading them. rtw_wow_fw_start() then tries to enable net detect with a zero page location for the NLO and channel tables. Could we keep the skip in the beacon update paths, or have suspend fall back to the normal suspend path when a restart is pending? [ ... ] > @@ -633,6 +633,7 @@ static void rtw_reset_vif_iter(void *data, u8 *mac, struct ieee80211_vif *vif) > rtw_bf_disassoc(rtwdev, vif, NULL); > rtw_vif_assoc_changed(rtwvif, NULL); > rtw_txq_cleanup(rtwdev, vif->txq); > + rtw_remove_rsvd_page(rtwdev, rtwvif); I think the empty list warning can still happen with AP and station interfaces on the RTL8822C. If a station interface comes up after the reset clears the bitmap, rtw_ops_add_interface() sets a port before ieee80211_do_open() marks the interface running. The AP still has an empty list, and the page iterator skips the station interface until it is running. Can a TIM update from the AP run in that gap? For example, the station cleanup timer can expire a buffered frame after rtw_core_stop() cancels the beacon work. The worker can then see a port in use and still hit "Should not have an empty reserved page". Would it make sense to free the old pages before reinitializing the list when adding an interface that was already initialized, as Zong-Zhe suggested? https://lore.kernel.org/linux-wireless/96da951407ab4c39b7e229ca365950eb@realtek.com/ Best regards, Luka Gejak