Skip to content

FROMLIST: wifi: ath12k: allow peer_id 0 in dp peer lookup#565

Merged
sgaud-quic merged 1 commit into
qualcomm-linux:qcom-6.18.yfrom
zhuhangtian:qcom-6.18.y
May 13, 2026
Merged

FROMLIST: wifi: ath12k: allow peer_id 0 in dp peer lookup#565
sgaud-quic merged 1 commit into
qualcomm-linux:qcom-6.18.yfrom
zhuhangtian:qcom-6.18.y

Conversation

@zhuhangtian
Copy link
Copy Markdown

@zhuhangtian zhuhangtian commented May 12, 2026

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

Link: https://lore.kernel.org/all/20260512025732.1297849-1-hangtian.zhu@oss.qualcomm.com/
CRs-Fixed: 4476943

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>
Link: https://lore.kernel.org/all/20260512025732.1297849-1-hangtian.zhu@oss.qualcomm.com/
@zhuhangtian zhuhangtian requested review from a team, idlethread, knaveen-qc and quicAspratap May 12, 2026 05:49
@qswat-orbit-external
Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

@qswat-orbit-external
Copy link
Copy Markdown

Merge Check Failed: No Change Task Found

No associated change tasks found for CR 4476943 on any of the following entities:

Entities:

  • kernel.qli.2.0

CR: 4476943

Please ensure the CR has a change task associated with at least one of the entities for this branch.

@qcomlnxci
Copy link
Copy Markdown

Test Matrix

Test Case glymur-crd kaanapali-mtp lemans-evk monaco-evk qcs615-ride qcs6490-rb3gen2 qcs8300-ride qcs9100-ride-r3 sm8750-mtp x1e80100-crd
0_qcom-next-ci-premerge-tests ◻️ ◻️ ❌ Fail ◻️ ❌ Fail ❌ Fail ◻️ ❌ Fail ◻️ ◻️
BT_FW_KMD_Service ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
BT_ON_OFF ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
BT_SCAN ◻️ ◻️ ✅ Pass ❌ Fail ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
CPUFreq_Validation ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
CPU_affinity ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
DSP_AudioPD ◻️ ◻️ ✅ Pass ✅ Pass ⚠️ skip ✅ Pass ◻️ ⚠️ skip ◻️ ◻️
Ethernet ◻️ ◻️ ⚠️ skip ✅ Pass ⚠️ skip ⚠️ skip ◻️ ⚠️ skip ◻️ ◻️
Freq_Scaling ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
GIC ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
IPA ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
Interrupts ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
OpenCV ◻️ ◻️ ✅ Pass ⚠️ skip ◻️ ✅ Pass ◻️ ✅ Pass ◻️ ◻️
PCIe ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
Probe_Failure_Check ◻️ ◻️ ❌ Fail ❌ Fail ❌ Fail ❌ Fail ◻️ ❌ Fail ◻️ ◻️
RMNET ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
UFS_Validation ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
USBHost ◻️ ◻️ ❌ Fail ✅ Pass ❌ Fail ❌ Fail ◻️ ❌ Fail ◻️ ◻️
WiFi_Firmware_Driver ◻️ ◻️ ❌ Fail ⚠️ skip ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
WiFi_OnOff ◻️ ◻️ ✅ Pass ❌ Fail ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
adsp_remoteproc ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ❌ Fail ◻️ ◻️
cdsp_remoteproc ◻️ ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ❌ Fail ◻️ ◻️
gpdsp_remoteproc ◻️ ◻️ ✅ Pass ✅ Pass ⚠️ skip ⚠️ skip ◻️ ❌ Fail ◻️ ◻️
hotplug ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
irq ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
kaslr ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
pinctrl ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
qcom_hwrng ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
remoteproc ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ❌ Fail ◻️ ◻️
rngtest ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
shmbridge ◻️ ◻️ ❌ Fail ✅ Pass ❌ Fail ❌ Fail ◻️ ❌ Fail ◻️ ◻️
smmu ◻️ ◻️ ❌ Fail ✅ Pass ❌ Fail ✅ Pass ◻️ ❌ Fail ◻️ ◻️
watchdog ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
wpss_remoteproc ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️

@qcomlnxci
Copy link
Copy Markdown

Test Matrix

Test Case glymur-crd kaanapali-mtp lemans-evk monaco-evk qcs615-ride qcs6490-rb3gen2 qcs8300-ride qcs9100-ride-r3 sm8750-mtp x1e80100-crd
0_qcom-next-ci-premerge-tests ◻️ ◻️ ❌ Fail ◻️ ❌ Fail ❌ Fail ◻️ ❌ Fail ◻️ ◻️
BT_FW_KMD_Service ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
BT_ON_OFF ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
BT_SCAN ◻️ ◻️ ✅ Pass ❌ Fail ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
CPUFreq_Validation ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
CPU_affinity ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
DSP_AudioPD ◻️ ◻️ ✅ Pass ✅ Pass ⚠️ skip ✅ Pass ◻️ ⚠️ skip ◻️ ◻️
Ethernet ◻️ ◻️ ⚠️ skip ✅ Pass ⚠️ skip ⚠️ skip ◻️ ⚠️ skip ◻️ ◻️
Freq_Scaling ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
GIC ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
IPA ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
Interrupts ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
OpenCV ◻️ ◻️ ✅ Pass ⚠️ skip ◻️ ✅ Pass ◻️ ✅ Pass ◻️ ◻️
PCIe ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
Probe_Failure_Check ◻️ ◻️ ❌ Fail ❌ Fail ❌ Fail ❌ Fail ◻️ ❌ Fail ◻️ ◻️
RMNET ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
UFS_Validation ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
USBHost ◻️ ◻️ ❌ Fail ✅ Pass ❌ Fail ❌ Fail ◻️ ❌ Fail ◻️ ◻️
WiFi_Firmware_Driver ◻️ ◻️ ❌ Fail ⚠️ skip ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
WiFi_OnOff ◻️ ◻️ ✅ Pass ❌ Fail ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
adsp_remoteproc ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ❌ Fail ◻️ ◻️
cdsp_remoteproc ◻️ ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ❌ Fail ◻️ ◻️
gpdsp_remoteproc ◻️ ◻️ ✅ Pass ✅ Pass ⚠️ skip ⚠️ skip ◻️ ❌ Fail ◻️ ◻️
hotplug ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
irq ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
kaslr ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
pinctrl ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
qcom_hwrng ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
remoteproc ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ❌ Fail ◻️ ◻️
rngtest ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
shmbridge ◻️ ◻️ ❌ Fail ✅ Pass ❌ Fail ❌ Fail ◻️ ❌ Fail ◻️ ◻️
smmu ◻️ ◻️ ❌ Fail ✅ Pass ❌ Fail ✅ Pass ◻️ ❌ Fail ◻️ ◻️
watchdog ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️
wpss_remoteproc ◻️ ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ◻️ ◻️

@sgaud-quic sgaud-quic merged commit 7fd6011 into qualcomm-linux:qcom-6.18.y May 13, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants