All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
To: 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: Mon, 3 Aug 2026 10:19:13 +0800	[thread overview]
Message-ID: <fbf43d4e-9e59-4bbd-b1ac-aa3a9e2fc123@oss.qualcomm.com> (raw)
In-Reply-To: <DKCTQGTORU5H.H4ANSP32B0PU@gmail.com>



On 7/31/2026 10:25 PM, Nicolas Escande wrote:
> 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.
> 

do you still have the complete logs? especially the time when you saw the back-to-back crash?

> 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.

Yeah, the code change seems safe to me. Just the commit log we need a second thought.

> 
>>>
>>> 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



  reply	other threads:[~2026-08-03  2:19 UTC|newest]

Thread overview: 7+ 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
2026-08-03  2:19     ` Baochen Qiang [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=fbf43d4e-9e59-4bbd-b1ac-aa3a9e2fc123@oss.qualcomm.com \
    --to=baochen.qiang@oss.qualcomm.com \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nico.escande@gmail.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 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.