mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mehmet Fide <mehmet.fide@gmail.com>
To: Luka Gejak <luka.gejak@linux.dev>,
	Zong-Zhe Yang <kevin_yang@realtek.com>
Cc: Ping-Ke Shih <pkshih@realtek.com>,
	Tzu-En Huang <tehuang@realtek.com>,
	Yan-Hsuan Chuang <yhchuang@realtek.com>,
	Kalle Valo <kvalo@kernel.org>,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	Brian Norris <briannorris@chromium.org>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	mehmet.fide@screeningeagle.com
Subject: Re: [PATCH rtw-next v2 1/3] wifi: rtw88: free the reserved pages of an interface on firmware recovery
Date: Tue, 17 Nov 2026 18:05:18 +0100	[thread overview]
Message-ID: <20261117170518.1838786-1-mehmet.fide@gmail.com> (raw)
In-Reply-To: <5285DA11-651F-4286-A0FD-52A6051B3A88@linux.dev>

Hi Luka,

> Could a skipped TIM update be retried at reconfig_complete()? After
> reconfig's last beacon download, sta_info_cleanup() can still expire a
> buffered frame and queue this work. If it runs before the flag clears,
> the beacon keeps the old TIM bit.

Yes, that update was lost. v3 drops the RTW_FLAG_RESTARTING test from
the work. Instead rtw_fw_download_rsvd_page() and
rtw_send_rsvd_page_h2c() do nothing while no port is in use: the
recovery clears the ports with the pages, and rtw_ops_add_interface()
sets them again. With a test build that queues the work during the
reconfiguration, v2 skipped the download and v3 did it.

> Also, if the last interface closes before restart work takes the wiphy
> lock, open_count is zero and reconfig_complete() is skipped. The flag
> survives normal reopening, so the worker still skips TIM updates.
> Could that exit be covered too?

With the interface closed in that window, the flag stayed set after
reopening, and writing fw_crash returned -EINPROGRESS; rtw_fw_recovery()
would ignore a real crash the same way. The pages no longer depend on
the flag in v3, and a new patch clears it in rtw_ops_stop().

> As far as I can see, rtw_core_stop() drops the driver mutex without
> holding wiphy. A concurrent beacon change can then reach:
>
>         ieee80211_change_beacon()
>           rtw_ops_bss_info_changed()
>             rtw_fw_download_rsvd_page()

Two hostapd update_beacon calls in that window warned twice with v2.
The port test covers this path as well, and v3 did not warn.

Mehmet

  reply	other threads:[~2026-11-17 17:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  7:20 [PATCH rtw-next v2 0/3] wifi: rtw88: three fixes around the " Mehmet Fide
2026-11-16  7:20 ` [PATCH rtw-next v2 1/3] wifi: rtw88: free the reserved pages of an interface on " Mehmet Fide
2026-11-16 16:02   ` Luka Gejak
2026-11-17 17:05     ` Mehmet Fide [this message]
2026-11-16  7:20 ` [PATCH rtw-next v2 2/3] wifi: rtw88: report the frames purged from the TX report queue Mehmet Fide
2026-11-16  7:20 ` [PATCH rtw-next v2 3/3] wifi: rtw88: reset the stations outside of RCU on firmware recovery Mehmet Fide
2026-11-16 15:55   ` Luka Gejak
2026-11-17 17:05     ` Mehmet Fide

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261117170518.1838786-1-mehmet.fide@gmail.com \
    --to=mehmet.fide@gmail.com \
    --cc=briannorris@chromium.org \
    --cc=kevin_yang@realtek.com \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luka.gejak@linux.dev \
    --cc=mehmet.fide@screeningeagle.com \
    --cc=pkshih@realtek.com \
    --cc=sgruszka@redhat.com \
    --cc=tehuang@realtek.com \
    --cc=yhchuang@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®