From: "Nicolas Escande" <nico.escande@gmail.com>
To: "Baochen Qiang" <baochen.qiang@oss.qualcomm.com>,
"Nicolas Escande" <nico.escande@gmail.com>,
<ath11k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH ath-current v2] wifi: ath11k: reset ar->num_station on hardware start
Date: Fri, 31 Jul 2026 16:25:24 +0200 [thread overview]
Message-ID: <DKCTQGTORU5H.H4ANSP32B0PU@gmail.com> (raw)
In-Reply-To: <4160b5e1-c82f-4083-aa36-18e4a42f909a@oss.qualcomm.com>
On Fri Jul 31, 2026 at 7:41 AM CEST, Baochen Qiang wrote:
> s/ar->num_station/ar->num_stations/ in subject
>
>
> On 7/30/2026 10:03 PM, Nicolas Escande wrote:
>> When (multiple) hw restart occurs, we end up in a situation where we
>
> by hw restart do you mean firmware crash and then recovers ?
Yes firmware crash indeed.
>
>> cannot accept new stations / mesh peers. This seems to be the
>> 'num_stations' in 'struct ath11k' that did not get reset properly in
>> this case. In ath11k_mac_op_start(), it was indeed the only accounting var
>> that did not get reset so let's clear it too.
>
> the root cause description looks confused to me: if it is firmware crash and recover, we
> should run the path ath11k_core_reset() -> ath11k_core_post_reconfigure_recovery() ->
> ath11k_core_halt() -> ath11k_mac_peer_cleanup_all() and in that function ar->num_stations
> is cleared.
So about how I came up to this fix:
When I first saw it I though I would be able to reproduce it using the
debugfs simulate firmware crash feature, but I was not. Then from the logs
I had at the time I noticed that there were multiple crashes back to back,
sometimes while still recovering from the first one. I think thats why I was
not able to properly simulate it and find the race condition leading to this.
In the meantime I wondered why we hit the num_station checks and not the
others like num_peers for example, and found that it was missing in
ath11k_mac_op_start(). So I made this change as I do not see how it hurts,
and I've never hit the issue again.
>>
>> This avaoids problems like those:
>
> s/avaoids/avoids/
>
[...]
>>
>> Tested-on: QCN9074 PCI WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1
>>
>> Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
>> Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
[...]
I'll spin a new revision with all the feedback taken into account at some point
next prev parent reply other threads:[~2026-07-31 14:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 14:03 [PATCH ath-current v2] wifi: ath11k: reset ar->num_station on hardware start Nicolas Escande
2026-07-31 5:41 ` Baochen Qiang
2026-07-31 14:25 ` Nicolas Escande [this message]
2026-07-31 5:42 ` Baochen Qiang
2026-07-31 16:35 ` Jeff Johnson
2026-07-31 21:54 ` Jeff Johnson
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=DKCTQGTORU5H.H4ANSP32B0PU@gmail.com \
--to=nico.escande@gmail.com \
--cc=ath11k@lists.infradead.org \
--cc=baochen.qiang@oss.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.