mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kang Yang <kang.yang@oss.qualcomm.com>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>
Cc: Jeff Johnson <jjohnson@kernel.org>,
	Baochen Qiang <baochen.qiang@oss.qualcomm.com>,
	Jeff Johnson <jeff.johnson@oss.qualcomm.com>,
	linux-wireless@vger.kernel.org, ath10k@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH ath-next v4 04/10] wifi: ath10k: also wake remaining blocked waiters
Date: Thu, 26 Nov 2026 15:07:20 +0800	[thread overview]
Message-ID: <0bf83f69-f069-444b-a45f-b4582b544405@oss.qualcomm.com> (raw)
In-Reply-To: <CAFEp6-3zK1=Fsrkmtmuq7Q3xnNMuCE1R0J8Pe-rAJun9igCcJg@mail.gmail.com>



On 11/25/2026 6:35 PM, Loic Poulain wrote:
> On Fri, Nov 20, 2026 at 9:42 AM Kang Yang <kang.yang@oss.qualcomm.com> wrote:
>>
>> ath10k_core_wake_all_waiters() still misses several completions,
>> leaving their callers blocked after the driver has given up on the
>> device.
>>
>> In particular, callers waiting on peer_delete_done, target_suspend,
>> wow.wakeup_completed, peer_stats_info_complete or wmi.radar_confirm
>> continue sleeping until their individual timeouts expire even though
>> no further progress is possible. The WoW and suspend waits are on the
>> suspend and resume paths, where these delays consume watchdog budget.
>>
>> Add the missing completions to ath10k_core_wake_all_waiters() so the
>> callers are released immediately.
>>
>> peer_delete_done is not otherwise reinitialized before every wait.
>> A completion left signaled by recovery would therefore make a later
>> peer-delete wait return immediately. Reinitialize it before sending
>> each peer-delete command.
>>
>> Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00288-QCARMSWPZ-1
>> Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00189
>>
>> Signed-off-by: Kang Yang <kang.yang@oss.qualcomm.com>
>> ---
>>   drivers/net/wireless/ath/ath10k/core.c | 5 +++++
>>   drivers/net/wireless/ath/ath10k/mac.c  | 3 +++
>>   2 files changed, 8 insertions(+)
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
>> index 3bb4d2742c30..99960f12dc66 100644
>> --- a/drivers/net/wireless/ath/ath10k/core.c
>> +++ b/drivers/net/wireless/ath/ath10k/core.c
>> @@ -2542,7 +2542,12 @@ static void ath10k_core_wake_all_waiters(struct ath10k *ar)
>>          complete(&ar->install_key_done);
>>          complete(&ar->vdev_setup_done);
>>          complete(&ar->vdev_delete_done);
>> +       complete(&ar->peer_delete_done);
>> +       complete(&ar->target_suspend);
>> +       complete(&ar->wow.wakeup_completed);
>> +       complete(&ar->peer_stats_info_complete);
>>          complete(&ar->thermal.wmi_sync);
>> +       complete(&ar->wmi.radar_confirm);
>>          complete(&ar->bss_survey_done);
>>          wake_up(&ar->htt.empty_tx_wq);
>>          wake_up(&ar->wmi.tx_credits_wq);
>> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
>> index 74aca0af11c8..695df1821e5c 100644
>> --- a/drivers/net/wireless/ath/ath10k/mac.c
>> +++ b/drivers/net/wireless/ath/ath10k/mac.c
>> @@ -843,6 +843,7 @@ static int ath10k_peer_delete(struct ath10k *ar, u32 vdev_id, const u8 *addr)
>>
>>          lockdep_assert_held(&ar->conf_mutex);
>>
>> +       reinit_completion(&ar->peer_delete_done);
>>          ret = ath10k_wmi_peer_delete(ar, vdev_id, addr);
>>          if (ret)
>>                  return ret;
>> @@ -5897,6 +5898,7 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
>>   err_peer_delete:
>>          if (arvif->vdev_type == WMI_VDEV_TYPE_AP ||
>>              arvif->vdev_type == WMI_VDEV_TYPE_IBSS) {
>> +               reinit_completion(&ar->peer_delete_done);
>>                  ath10k_wmi_peer_delete(ar, arvif->vdev_id, vif->addr);
>>                  ath10k_wait_for_peer_delete_done(ar, arvif->vdev_id,
>>                                                   vif->addr);
>> @@ -5959,6 +5961,7 @@ static void ath10k_remove_interface(struct ieee80211_hw *hw,
>>
>>          if (arvif->vdev_type == WMI_VDEV_TYPE_AP ||
>>              arvif->vdev_type == WMI_VDEV_TYPE_IBSS) {
>> +               reinit_completion(&ar->peer_delete_done);
>>                  ret = ath10k_wmi_peer_delete(arvif->ar, arvif->vdev_id,
>>                                               vif->addr);
> 
> So it would probably be cleaner to have a helper such as
> __ath10k_peer_delete() that performs both the reinit_completion() and
> the ath10k_wmi_peer_delete() call. Avoiding duplication.


Will change in next serion


> 
>>                  if (ret)
>>
>> --
>> 2.34.1
>>


  reply	other threads:[~2026-11-26  7:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  8:41 [PATCH ath-next v4 00/10] wifi: ath10k: fix recovery and WEDGED failure handling Kang Yang
2026-11-20  8:41 ` [PATCH ath-next v4 01/10] wifi: ath10k: fix SDIO aux workqueue starvation in recovery detection Kang Yang
2026-11-25 10:26   ` Loic Poulain
2026-11-26  8:16   ` Baochen Qiang
2026-11-26 16:01     ` Loic Poulain
2026-11-20  8:41 ` [PATCH ath-next v4 02/10] wifi: ath10k: shorten the recovery timeout to 10 seconds Kang Yang
2026-11-20  8:41 ` [PATCH ath-next v4 03/10] wifi: ath10k: wake blocked waiters when entering WEDGED state Kang Yang
2026-11-25 10:29   ` Loic Poulain
2026-11-26  7:05     ` Kang Yang
2026-11-20  8:41 ` [PATCH ath-next v4 04/10] wifi: ath10k: also wake remaining blocked waiters Kang Yang
2026-11-25 10:35   ` Loic Poulain
2026-11-26  7:07     ` Kang Yang [this message]
2026-11-20  8:41 ` [PATCH ath-next v4 05/10] wifi: ath10k: hard-block the radio when entering WEDGED state Kang Yang
2026-11-20  8:41 ` [PATCH ath-next v4 06/10] wifi: ath10k: remove now-unused driver_recovery completion Kang Yang
2026-11-20  8:41 ` [PATCH ath-next v4 07/10] wifi: ath10k: trigger recovery on PCIe MMIO wake-up failures Kang Yang
2026-11-20  8:41 ` [PATCH ath-next v4 08/10] wifi: ath10k: trigger recovery on corrupted HTC bundle lookahead Kang Yang
2026-11-25 10:48   ` Loic Poulain
2026-11-26  8:20   ` Baochen Qiang
2026-11-20  8:41 ` [PATCH ath-next v4 09/10] wifi: ath10k: reject scan requests while the device is not running Kang Yang
2026-11-20  8:41 ` [PATCH ath-next v4 10/10] wifi: ath10k: drop async writes and sleep timer across power cycles Kang Yang
2026-11-26  8:37   ` Baochen Qiang
2026-11-26 10:01     ` Kang Yang

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=0bf83f69-f069-444b-a45f-b4582b544405@oss.qualcomm.com \
    --to=kang.yang@oss.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=baochen.qiang@oss.qualcomm.com \
    --cc=jeff.johnson@oss.qualcomm.com \
    --cc=jjohnson@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.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®