mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
To: Hangtian Zhu <hangtian.zhu@oss.qualcomm.com>, jjohnson@kernel.org
Cc: ath12k@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wifi: ath12k: allow peer_id 0 in dp peer lookup
Date: Thu, 28 May 2026 15:35:13 +0800	[thread overview]
Message-ID: <82e84f2a-8978-4b24-b355-e46d1a002a57@oss.qualcomm.com> (raw)
In-Reply-To: <20260512025732.1297849-1-hangtian.zhu@oss.qualcomm.com>



On 5/12/2026 10:57 AM, Hangtian Zhu wrote:
> For some chipsets, firmware can report HTT_T2H_MSG_TYPE_PEER_MAP2 with
> peer_id 0 as a valid value for mapping ath12k_dp_link_peer to
> ath12k_dp_peer.
> 
> ath12k_dp_peer_find_by_peerid() currently treats peer_id 0 as invalid.
> When firmware assigns peer_id 0, peer lookup fails. As a result,
> DHCP OFFER packets are dropped in __ieee80211_rx_handle_packet()
> because pubsta is NULL.
> 
> ath12k_dp_rx_deliver_msdu() <- rx_info->peer_id 0
>   ath12k_dp_peer_find_by_peerid -> peer NULL
>   ieee80211_rx_napi <- pubsta NULL
>     ieee80211_rx_list
>       __ieee80211_rx_handle_packet <- pubsta NULL, skb undelivered
> 
> The following error in the TX completion path is caused by the same issue:
> 
> ath12k_wifi7_pci 0000:04:00.0: dp_tx: failed to find the peer with peer_id 0
> 
> The error message is triggered by:
> ath12k_wifi7_dp_tx_complete_msdu
>   ath12k_dp_link_peer_find_by_peerid <- ts->peer_id 0
>     ath12k_dp_peer_find_by_peerid -> peer NULL
> 
> ath12k_dp_tx_htt_tx_complete_buf
>   ath12k_dp_link_peer_find_by_peerid <- peer_id 0
>     ath12k_dp_peer_find_by_peerid -> peer NULL
> 
> Fix this by allowing peer_id 0 in ath12k_dp_peer_find_by_peerid() and
> rejecting only values >= ATH12K_DP_PEER_ID_INVALID.
> 
> Also update peer_id 0 handling in monitor path:
> Always call ath12k_dp_link_peer_find_by_peerid() in
> ath12k_dp_rx_h_find_link_peer() to fetch the peer, including when
> peer_id is 0.
> Always store peer_id in ppdu_info->peer_id in
> ath12k_wifi7_dp_mon_rx_parse_status_tlv(), including peer_id 0.
> 
> Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0.c2-00074-QCACOLSWPL_V1_TO_SILICONZ-1
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Hangtian Zhu <hangtian.zhu@oss.qualcomm.com>

Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>


  reply	other threads:[~2026-05-28  7:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12  2:57 Hangtian Zhu
2026-05-28  7:35 ` Baochen Qiang [this message]
2026-05-30 17:18 ` Rameshkumar Sundaram
2026-06-01 17:00 ` 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=82e84f2a-8978-4b24-b355-e46d1a002a57@oss.qualcomm.com \
    --to=baochen.qiang@oss.qualcomm.com \
    --cc=ath12k@lists.infradead.org \
    --cc=hangtian.zhu@oss.qualcomm.com \
    --cc=jjohnson@kernel.org \
    --cc=linux-kernel@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 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®