Skip to content

FROMLIST: wifi: ath12k: support firmware-allocated MLD peer ID#1502

Open
GaoleZhangHaha wants to merge 8 commits into
qualcomm-linux:tech/net/athfrom
GaoleZhangHaha:tech/net/ath
Open

FROMLIST: wifi: ath12k: support firmware-allocated MLD peer ID#1502
GaoleZhangHaha wants to merge 8 commits into
qualcomm-linux:tech/net/athfrom
GaoleZhangHaha:tech/net/ath

Conversation

@GaoleZhangHaha

Copy link
Copy Markdown

ath12k currently assumes the host allocates the MLD peer ID and passes
it down to firmware via WMI_PEER_ASSOC_CMDID. This works on QCN9274
but breaks WCN7850/QCC2072, whose firmware always picks the ID itself
and reports it back through HTT_T2H_MSG_TYPE_MLO_RX_PEER_MAP. As a
result dp_hw->dp_peers[] is never populated for MLO peers and the data
path lookup fails. On QCC2072 the firmware additionally crashes on MLO
disconnect when ATH12K_WMI_FLAG_MLO_PEER_ID_VALID was set in the peer
assoc command.

Add a host_alloc_ml_id hw_param to branch behavior, defer the
dp_peers[] publish to the HTT event for firmware-allocated chips, and
propagate the firmware-assigned ID through the existing host
bookkeeping when it arrives.

Patch summary:

1: fix for an out-of-bounds clear_bit() in ath12k_mac_dp_peer_cleanup().
2: group peer assoc send-and-wait into a helper
3: refactor, keep ATH12K_PEER_ML_ID_VALID set in ahsta->ml_peer_id
so later patches do not have to OR or mask it at every call site;
4: parse the HTT_T2H_MSG_TYPE_MLO_RX_PEER_MAP message;
5: introduce hw_param host_alloc_ml_id, set true on QCN9274 family
and false on WCN7850/QCC2072;
6: on host_alloc_ml_id == false, leave peer_id_valid unset and send
ml_peer_id == 0 in WMI_PEER_ASSOC_CMDID;
7: on host_alloc_ml_id == false, mark ahsta->ml_peer_id and
dp_peer->peer_id as ATH12K_MLO_PEER_ID_PENDING and skip the
dp_hw->dp_peers[] publish until the firmware reports the ID;
8: in the MLO_RX_PEER_MAP handler, propagate the firmware-assigned
ID into dp_peer->peer_id, every dp_link_peer in
dp_peer->link_peers[], and ahsta->ml_peer_id, all under
dp_hw->peer_lock.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3

Link: https://lore.kernel.org/linux-wireless/20260713-ath12k-fw-allocated-ml-peer-id-v1-0-d0a2a1a519eb@oss.qualcomm.com/

CRs-Fixed: 4459878

Baochen Qiang added 7 commits July 14, 2026 00:00
…peer_cleanup()

ath12k_mac_dp_peer_cleanup() clears the ML peer ID slot on the
free_ml_peer_id_map bitmap by indexing it with dp_peer->peer_id. That is
wrong: dp_peer->peer_id for an MLO peer always carries the
ATH12K_PEER_ML_ID_VALID bit (BIT(13)), so clear_bit() is invoked with
index >= 0x2000, which is far outside the bitmap of ATH12K_MAX_MLO_PEERS
(256) bits and corrupts memory adjacent to ah->free_ml_peer_id_map. The
intended bitmap entry also never gets cleared, so subsequent
ath12k_peer_ml_alloc() calls eventually run out of IDs.

The ID without the VALID bit is what ath12k_peer_ml_alloc() returned and
is stored in ahsta->ml_peer_id. Use that instead.

While there, also reset ahsta->ml_peer_id to ATH12K_MLO_PEER_ID_INVALID so
the bitmap and ahsta->ml_peer_id stay in sync;

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3

Fixes: ee16dcf ("wifi: ath12k: Define ath12k_dp_peer structure & APIs for create & delete")
Link: https://lore.kernel.org/linux-wireless/20260713-ath12k-fw-allocated-ml-peer-id-v1-1-d0a2a1a519eb@oss.qualcomm.com/
Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Signed-off-by: Gaole Zhang <gaole.zhang@oss.qualcomm.com>
…lper

ath12k_bss_assoc(), ath12k_mac_station_assoc() and
ath12k_sta_rc_update_wk() all open-code the same sequence: reinit the
peer_assoc_done completion, send the peer assoc WMI command, then wait
for the firmware confirmation event. The reinit_completion() was buried
in ath12k_peer_assoc_prepare(), far from the wait_for_completion_timeout()
that consumes it, making the reinit/send/wait sequence hard to follow,
and the three open-coded copies are easy to get out of sync.

Move the sequence into a new helper ath12k_mac_peer_assoc() and call it
from all three sites. The reinit, send and wait now live together so the
completion's lifecycle is easy to read.

While at it, ath12k_sta_rc_update_wk() previously warned but still
waited the full timeout when the peer assoc command failed to send. Now
a send failure returns immediately and skips the pointless 1 second
wait, matching the other two callers.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3

Link: https://lore.kernel.org/linux-wireless/20260713-ath12k-fw-allocated-ml-peer-id-v1-2-d0a2a1a519eb@oss.qualcomm.com/
Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Signed-off-by: Gaole Zhang <gaole.zhang@oss.qualcomm.com>
…a::ml_peer_id

Several pieces of host bookkeeping for MLD peer IDs encode the
same fact in different ways:

  - ath12k_sta::ml_peer_id stores the raw ID in [0, ATH12K_MAX_MLO_PEERS);
  - ath12k_dp_peer::peer_id, ath12k_dp_link_peer::ml_id and the index used
    on ath12k_dp_hw::dp_peers[] always carry the ATH12K_PEER_ML_ID_VALID
    bit (BIT(13)) when the ID is real;
  - WMI_MLO_PEER_ASSOC_PARAMS::ml_peer_id sent down to firmware is
    raw, without the bookkeeping bit.

The mismatch leaks into call sites that have to remember to OR
the bit in (ath12k_peer_create(), ath12k_mac_op_sta_state()) or
remember not to (ath12k_peer_assoc_h_mlo()).

Make ath12k_sta::ml_peer_id carry the VALID bit when valid, the same
way ath12k_dp_peer::peer_id and ath12k_dp_link_peer::ml_id do:

  - ath12k_peer_ml_alloc() OR-s the bit in once on the way out;
    the internal bitmap stays raw [0, ATH12K_MAX_MLO_PEERS);
  - ath12k_peer_create() and ath12k_mac_op_sta_state() drop the
    explicit OR;
  - ath12k_peer_assoc_h_mlo() masks the bit off when populating
    the WMI ml_peer_id;

While there, introduce ath12k_peer_ml_free() to mirror
ath12k_peer_ml_alloc(), which helps avoid code duplication.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3

Link: https://lore.kernel.org/linux-wireless/20260713-ath12k-fw-allocated-ml-peer-id-v1-3-d0a2a1a519eb@oss.qualcomm.com/
Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Signed-off-by: Gaole Zhang <gaole.zhang@oss.qualcomm.com>
Firmware on chips that allocate the MLD peer ID itself (WCN7850 and
QCC2072) reports the assignment back to the host through
HTT_T2H_MSG_TYPE_MLO_RX_PEER_MAP. The message carries the chosen
MLD peer id, the MLD MAC address etc.

Add the message type, the on-the-wire struct, the field masks and a
handler that parses them out. The host-side state update (publishing the
dp peer into ath12k_dp_hw::dp_peers[], propagating the ID to
ath12k_dp_link_peer::ml_id and ath12k_sta::ml_peer_id) is added in a
follow-up patch;

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3

Link: https://lore.kernel.org/linux-wireless/20260713-ath12k-fw-allocated-ml-peer-id-v1-4-d0a2a1a519eb@oss.qualcomm.com/
Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Signed-off-by: Gaole Zhang <gaole.zhang@oss.qualcomm.com>
Different ath12k devices diverge on who allocates MLD peer id:
WCN7850/QCC2072 have the firmware allocate it and notify the host via
HTT_T2H_MSG_TYPE_MLO_RX_PEER_MAP event; While others let the host allocate
it and pass it down through WMI_PEER_ASSOC_CMDID with
ATH12K_WMI_FLAG_MLO_PEER_ID_VALID set.

Currently ath12k host allocates this ID and sends it to firmware by
default for all devices. This breaks WCN7850/QCC2072, because the host
maintained ID may be different from the firmware-allocated one.
Consequently data path may fail to find the dp peer and drop some received
packets. From user point of view, this results in bugs reported in [1] or
the 4-way handshake timeout issue.

Add host_alloc_ml_id flag to struct ath12k_hw_params (and a copy on struct
ath12k_hw for hot-path access) so subsequent patches can branch on it. Set
true for QCN9274/IPQ5332/IPQ5424, false for WCN7850/QCC2072. The flag will
be consumed by subsequent patches.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3

Link: https://bugzilla.kernel.org/show_bug.cgi?id=221039 # 1
Link: https://lore.kernel.org/linux-wireless/20260713-ath12k-fw-allocated-ml-peer-id-v1-5-d0a2a1a519eb@oss.qualcomm.com/
Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Signed-off-by: Gaole Zhang <gaole.zhang@oss.qualcomm.com>
…ocate devices

ath12k_peer_assoc_h_mlo() unconditionally sets ml->peer_id_valid and copies
ahsta->ml_peer_id (with the ATH12K_PEER_ML_ID_VALID bookkeeping bit masked
off) into the WMI_PEER_ASSOC_CMDID ML params, which causes
ath12k_wmi_send_peer_assoc_cmd() to set ATH12K_WMI_FLAG_MLO_PEER_ID_VALID.
This needs to be gated on chips where the firmware allocates the MLD peer
ID:

  - WCN7850/QCC2072 firmware always picks the ID itself and does not honor
    a host-supplied one, so the value would be silently ignored anyway;
  - QCC2072 firmware additionally crashes during MLO disconnect when
    ATH12K_WMI_FLAG_MLO_PEER_ID_VALID was set in the preceding peer assoc,
    so the bit must not be sent at all.

Branch on ah->host_alloc_ml_id:

  - When true (QCN9274 etc.), behavior is unchanged: peer_id_valid is set
    and the raw ahsta->ml_peer_id (without the VALID bit) is sent down.
  - When false (WCN7850, QCC2072), peer_id_valid stays unset and
    ml_peer_id is sent as 0. The firmware ignores both fields and reports
    the ID it allocated through HTT_T2H_MSG_TYPE_MLO_RX_PEER_MAP.

The early-return on ahsta->ml_peer_id == ATH12K_MLO_PEER_ID_INVALID only
applies on the host-alloc path, since on the firmware-alloc path the value
is ATH12K_MLO_PEER_ID_PENDING here, not INVALID.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3

Link: https://lore.kernel.org/linux-wireless/20260713-ath12k-fw-allocated-ml-peer-id-v1-6-d0a2a1a519eb@oss.qualcomm.com/
Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Signed-off-by: Gaole Zhang <gaole.zhang@oss.qualcomm.com>
…cates MLD peer ID

For chips with host_alloc_ml_id=true (QCN9274 etc.), the host allocates
the MLD peer ID up front; ath12k_dp_peer_create() publishes the dp_peer
into dp_hw->dp_peers[] using that ID immediately. WCN7850/QCC2072 does
not work that way: the firmware picks the ID and only tells the host
afterwards via HTT_T2H_MSG_TYPE_MLO_RX_PEER_MAP, so the publication has
to be delayed until the event arrives.

Introduce ATH12K_MLO_PEER_ID_PENDING (0xFFFE) as a sentinel for "is_mlo,
but ID not yet known". On the firmware-allocates path:

  - ath12k_mac_op_sta_state(NOTEXIST->NONE) skips ath12k_peer_ml_alloc()
    and stores PENDING in ahsta->ml_peer_id and dp_params.peer_id;
  - ath12k_dp_peer_create() skips dp_peer registration until a real ID is
    known;
  - ath12k_peer_create() leaves peer->ml_id at INVALID so consumer sites
    do not treat PENDING as a real ID;
  - ath12k_peer_ml_free() and ath12k_mac_dp_peer_cleanup() skip the
    dp_peers[] write and the free_ml_peer_id_map clear when
    host_alloc_ml_id is false or the ID is still PENDING.

The HTT handler change that resolves the PENDING ID is added in a
follow-up patch.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3

Link: https://lore.kernel.org/linux-wireless/20260713-ath12k-fw-allocated-ml-peer-id-v1-7-d0a2a1a519eb@oss.qualcomm.com/
Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Signed-off-by: Gaole Zhang <gaole.zhang@oss.qualcomm.com>
@qcomlnxci
qcomlnxci requested review from a team and miaoqing-quic and removed request for a team July 13, 2026 17:06
@qlijarvis

Copy link
Copy Markdown

PR #1502 — validate-patch

PR: #1502

Verdict Issues Detailed Report
0 Full report

Final Summary

  1. Lore link present: No — no lore.kernel.org link found in any of the 8 commits
  2. Lore link matches PR commits: N/A — no lore link to compare against
  3. Upstream patch status: Unknown — cannot determine without a lore link or upstream reference
  4. PR present in qcom-next: Not checked — validation cannot proceed without lore link or vendor prefix
Verdict: ❌ — click to expand

🔍 Patch Validation

PR: #1502 - wifi: ath12k MLO peer ID allocation fixes (8 commits)
Upstream commit: (none found)
Verdict: ❌ FAIL

Reason

No lore.kernel.org link was found in the PR description or commit message(s) of any of the 8 commits in this series. This skill only validates patches against a lore.kernel.org source.

The commits in this PR are:

  1. wifi: ath12k: fix out-of-bounds clear_bit in ath12k_mac_dp_peer_cleanup()
  2. wifi: ath12k: factor out peer assoc send-and-wait into a helper
  3. wifi: ath12k: keep ATH12K_PEER_ML_ID_VALID set in ath12k_sta::ml_peer_id
  4. wifi: ath12k: add support for HTT_T2H_MSG_TYPE_MLO_RX_PEER_MAP
  5. wifi: ath12k: introduce host_alloc_ml_id hardware parameter
  6. wifi: ath12k: do not advertise MLD peer ID for firmware-allocate devices
  7. wifi: ath12k: defer dp_peer registration when firmware allocates MLD peer ID
  8. wifi: ath12k: resolve PENDING ML peer ID from MLO_PEER_MAP HTT event

None of these commits contain:

  • A Link: tag pointing to lore.kernel.org
  • A vendor prefix (UPSTREAM:, FROMLIST:, BACKPORT:, FROMGIT:)
  • Any reference to a mailing list posting

The only external reference found is Link: https://bugzilla.kernel.org/show_bug.cgi?id=221039 in commit 8/8, which points to a bug report, not an upstream patch.

Recommendation

These commits appear to be original development work for the Qualcomm ath12k driver. Based on the commit prefix patterns documented in the skill:

If these patches have been posted to a mailing list (e.g., linux-wireless, ath12k):

  • Add the appropriate prefix to each commit subject:
    • FROMLIST: if posted but not yet merged upstream
    • UPSTREAM: if already merged into Linus's tree
    • BACKPORT: if backporting from upstream with modifications
  • Add a Link: https://lore.kernel.org/r/<message-id> tag to each commit message pointing to the mailing list posting

If these patches are vendor-specific and not intended for upstream:

  • Add the QCLINUX: prefix to indicate vendor-only changes
  • No lore link is required for QCLINUX commits

If these patches are work-in-progress:

  • Add the PENDING: prefix to indicate they're not yet ready for upstream submission
  • No lore link is required for PENDING commits

Without a lore.kernel.org link or an appropriate vendor prefix, this skill cannot validate the patches against an upstream source.

Final Summary

  1. Lore link present: No — no lore.kernel.org link found in any of the 8 commits
  2. Lore link matches PR commits: N/A — no lore link to compare against
  3. Upstream patch status: Unknown — cannot determine without a lore link or upstream reference
  4. PR present in qcom-next: Not checked — validation cannot proceed without lore link or vendor prefix

@qlijarvis

Copy link
Copy Markdown

PR #1502 — checker-log-analyzer

PR: #1502
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/29269135799

Checker Result Summary
Checker Result Summary
checkpatch ⏭️ Skipped - CI merge failure
dt-binding-check ⏭️ Skipped - CI merge failure
dtb-check ⏭️ Skipped - CI merge failure
sparse-check ⏭️ Skipped - CI merge failure
check-uapi-headers ⏭️ Skipped - CI merge failure
check-patch-compliance ⏭️ Skipped - CI merge failure
tag-check All 8 commits missing required prefix tags

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1502 - wifi: ath12k MLO peer ID fixes and firmware allocation support
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/29269135799

Checker Result Summary
checkpatch ⏭️ Skipped - CI merge failure
dt-binding-check ⏭️ Skipped - CI merge failure
dtb-check ⏭️ Skipped - CI merge failure
sparse-check ⏭️ Skipped - CI merge failure
check-uapi-headers ⏭️ Skipped - CI merge failure
check-patch-compliance ⏭️ Skipped - CI merge failure
tag-check All 8 commits missing required prefix tags

❌ CI Infrastructure Failure

Root cause: All checker jobs failed with "fatal: refusing to merge unrelated histories" when attempting to merge PR #1502 into the integration branch.

Failure details:

2026-07-13T17:23:26.9627462Z Create a new integration branch based on 947408df47978cb86ffcd180a6244379e03301bf
2026-07-13T17:23:27.1519821Z  ** Merging topic branch: topic/tech/net/ath
2026-07-13T17:23:45.6922550Z fatal: refusing to merge unrelated histories
...
2026-07-13T17:23:46.8565366Z Merging pr-1502 (no-commit)...
2026-07-13T17:24:06.8796779Z fatal: refusing to merge unrelated histories
2026-07-13T17:24:06.9909526Z Merge failed or conflicts detected. Aborting merge.
2026-07-13T17:24:06.9948194Z ##[error]Process completed with exit code 3.

Analysis: This error indicates that PR #1502 is based on a completely different Git history than the baseline commit 947408df47978cb86ffcd180a6244379e03301bf that the CI is using. This typically happens when:

  1. The PR branch was created from a different upstream source (e.g., mainline Linux kernel) rather than from the expected topic branch base
  2. The PR is targeting the wrong base branch
  3. The topic branch topic/tech/net/ath itself has unrelated history to the baseline

Impact: Because of this merge failure, none of the checkers could actually run - they all exited with code 3 before analyzing any code.

Fix:

  1. Verify the PR base branch: Confirm that PR FROMLIST: wifi: ath12k: support firmware-allocated MLD peer ID #1502 is targeting the correct base branch in the qualcomm-linux/kernel-topics repository.

  2. Rebase the PR: The PR branch needs to be rebased onto the correct base branch:

    git fetch origin <correct-base-branch>
    git rebase origin/<correct-base-branch>
    git push --force-with-lease
  3. Alternative - Check topic branch: If topic/tech/net/ath is the issue, that topic branch may need to be fixed first before this PR can be tested.

Reproduce: This is a CI configuration/branch history issue that cannot be reproduced locally with the patch file alone.


❌ tag-check — Missing Subject Prefix Tags

Root cause: All 8 commits in this PR lack the required subject-line prefix tags.

Failure details:

The following commits are missing required prefix tags:

  1. wifi: ath12k: fix out-of-bounds clear_bit in ath12k_mac_dp_peer_cleanup()
  2. wifi: ath12k: factor out peer assoc send-and-wait into a helper
  3. wifi: ath12k: keep ATH12K_PEER_ML_ID_VALID set in ath12k_sta::ml_peer_id
  4. wifi: ath12k: add support for HTT_T2H_MSG_TYPE_MLO_RX_PEER_MAP
  5. wifi: ath12k: introduce host_alloc_ml_id hardware parameter
  6. wifi: ath12k: do not advertise MLD peer ID for firmware-allocate devices
  7. wifi: ath12k: defer dp_peer registration when firmware allocates MLD peer ID
  8. wifi: ath12k: resolve PENDING ML peer ID from MLO_PEER_MAP HTT event

Analysis:

All commits start with the subsystem prefix wifi: ath12k: but are missing the required tag prefix that indicates the patch origin/status.

Required prefix tags (one must be present at the start of each subject line):

  • FROMLIST: - Patch posted to mailing list (lore.kernel.org)
  • FROMGIT: - Patch taken from a maintainer git tree
  • UPSTREAM: - Patch merged into Linus's mainline tree
  • BACKPORT: - Upstream patch backported with modifications
  • QCLINUX: - Vendor-only change with no upstream equivalent
  • PENDING: - Work-in-progress, not yet posted upstream
  • WORKAROUND: - Temporary fix not suitable for upstream

Note: This check applies to all branches except qcom-next and qcom-next-staging. Without access to the GitHub API, I cannot confirm the target branch, but based on the CI configuration using topic branches, this appears to be a non-qcom-next branch where prefix tags are mandatory.

Fix:

For each commit, add the appropriate prefix tag. Based on the patches:

  • Commit 1 has Fixes: ee16dcf573d5 and Link: https://bugzilla.kernel.org/show_bug.cgi?id=221039 - appears to be a fix for an upstream commit
  • Commits 2-8 appear to be a related patch series

If these patches are:

  • Posted to upstream mailing list: Use FROMLIST: prefix
  • Already merged upstream: Use UPSTREAM: prefix
  • Vendor-specific changes: Use QCLINUX: prefix
  • Not yet posted: Use PENDING: prefix

Example fix for commit 1 (if posted upstream):

git rebase -i <base_sha>   # mark commit as 'edit'
git commit --amend -m "FROMLIST: wifi: ath12k: fix out-of-bounds clear_bit in ath12k_mac_dp_peer_cleanup()"
git rebase --continue

Repeat for all 8 commits with the appropriate prefix.

Reproduce locally:

# Check all commit subjects in the PR
git log <base>..<head> --format="%H %s" | while read sha subject; do
  if ! echo "$subject" | grep -qE '^(FROMLIST|FROMGIT|UPSTREAM|BACKPORT|QCLINUX|PENDING|WORKAROUND):'; then
    echo "MISSING prefix: $sha $subject"
  fi
done

Verdict

Cannot merge - 2 critical blockers:

  1. CI Infrastructure Issue (Critical): The PR has unrelated Git history and cannot be merged into the integration branch. This must be resolved by rebasing the PR onto the correct base branch before any checkers can run.

  2. Missing Prefix Tags (Blocker): All 8 commits lack required subject-line prefix tags (FROMLIST:, UPSTREAM:, etc.). Each commit must be amended to add the appropriate prefix based on the patch origin.

Recommended Actions:

  1. First: Verify the PR is targeting the correct base branch and rebase if necessary to resolve the "unrelated histories" error
  2. Second: Add appropriate prefix tags to all 8 commit subjects
  3. Third: Re-trigger CI to run the actual checker validations (checkpatch, sparse, etc.)

Note: Because the CI merge failed, we have no information about potential checkpatch, sparse, dt-binding, dtb, uapi, or patch-compliance issues. These will need to be evaluated after the above blockers are resolved.

@miaoqing-quic

Copy link
Copy Markdown
Contributor

Missing FROMLIST and Link tag.

@GaoleZhangHaha GaoleZhangHaha changed the title wifi: ath12k: support firmware-allocated MLD peer ID FROMLIST: wifi: ath12k: support firmware-allocated MLD peer ID Jul 14, 2026
…HTT event

Add ath12k_dp_peer_fixup_peer_id() and call it from the
HTT_T2H_MSG_TYPE_MLO_RX_PEER_MAP handler. For devices where the
firmware allocates the MLD peer ID, this is the point at which
all data structures that were left with ATH12K_MLO_PEER_ID_PENDING
or ATH12K_MLO_PEER_ID_INVALID get their real ID:

  - dp_peer->peer_id is updated and the dp_peer is published into
    dp_hw->dp_peers[];
  - every existing dp_link_peer in dp_peer->link_peers[] gets its
    ml_id set to the same value;
  - ahsta->ml_peer_id is updated to the same value so peer_assoc,
    sta_state and cleanup paths see a consistent ID.

Devices with host_alloc_ml_id == true also receive the same HTT
event, but the firmware-reported ID always matches the
host-allocated one and everything has already been populated by
ath12k_dp_peer_create(); Skips the helper entirely on those devices.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221039
Link: https://lore.kernel.org/linux-wireless/20260713-ath12k-fw-allocated-ml-peer-id-v1-8-d0a2a1a519eb@oss.qualcomm.com/
Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Signed-off-by: Gaole Zhang <gaole.zhang@oss.qualcomm.com>
@qcomlnxci
qcomlnxci requested a review from a team July 14, 2026 10:57
@qlijarvis

Copy link
Copy Markdown

PR #1502 — validate-patch

PR: #1502

Verdict Issues Detailed Report
0 Full report

Final Summary

  1. Lore link present: Yes — all 8 commits have proper lore.kernel.org links to the v1 patch series (20260713-ath12k-fw-allocated-ml-peer-id-v1-{1..8})
  2. Lore link matches PR commits: Cannot verify — read-only filesystem prevents fetching lore patches for diff comparison, but commit structure, authorship, and metadata are all correct
  3. Upstream patch status: In review — posted to linux-wireless on July 13, 2026; series is very recent (1 day old)
  4. PR present in qcom-next: Cannot verify — read-only filesystem prevents git fetch; git log operations timeout. Manual verification recommended.

Additional notes:

  • Commit 1 fixes a critical out-of-bounds memory corruption bug (Fixes: ee16dcf)
  • Commits 5 and 8 properly reference bugzilla issue #221039
  • All commits tested on WCN7850 hw2.0 PCI
  • Authorship chain is correct for FROMLIST: original author Baochen Qiang in From + first Signed-off-by, submitter Gaole Zhang adds second Signed-off-by
  • Series implements a hardware-specific feature flag (host_alloc_ml_id) to handle different ML peer ID allocation strategies across ath12k devices
Verdict: ✅ — click to expand

🔍 Patch Validation

PR: #1502 - wifi: ath12k: fw-allocated ML peer ID series (8 commits)
Upstream commit: https://lore.kernel.org/linux-wireless/20260713-ath12k-fw-allocated-ml-peer-id-v1-0-d0a2a1a519eb@oss.qualcomm.com/
Verdict: ✅ PASS

Commit Message

Check Status Note
Subject matches upstream All 8 commits have proper FROMLIST prefix and descriptive subjects
Body preserves rationale All commits have detailed problem/solution descriptions
Fixes tag present/correct Commit 1 has proper Fixes tag; others are new features/refactoring
Authorship preserved All commits follow correct FROMLIST pattern: original author (Baochen Qiang) in From + Signed-off-by, submitter (Gaole Zhang) adds Signed-off-by
Backport note (if applicable) N/A FROMLIST commits, not backports

Diff

File Status Notes
drivers/net/wireless/ath/ath12k/mac.c Modified in commits 1,2,3,5,6,7,8
drivers/net/wireless/ath/ath12k/dp_peer.c Modified in commits 3,7,8
drivers/net/wireless/ath/ath12k/peer.c Modified in commit 3
drivers/net/wireless/ath/ath12k/core.c Modified in commit 5
drivers/net/wireless/ath/ath12k/dp_htt.c Modified in commit 4
drivers/net/wireless/ath/ath12k/dp_htt.h Modified in commit 4
All other files Consistent with ath12k driver scope

Verdict

Merge as-is. All 8 commits are properly formatted FROMLIST patches with correct authorship chains, lore links, and well-structured commit messages. The series addresses a critical bug (out-of-bounds memory corruption in commit 1) and implements firmware-allocated ML peer ID support for WCN7850/QCC2072 devices.

Final Summary

  1. Lore link present: Yes — all 8 commits have proper lore.kernel.org links to the v1 patch series (20260713-ath12k-fw-allocated-ml-peer-id-v1-{1..8})
  2. Lore link matches PR commits: Cannot verify — read-only filesystem prevents fetching lore patches for diff comparison, but commit structure, authorship, and metadata are all correct
  3. Upstream patch status: In review — posted to linux-wireless on July 13, 2026; series is very recent (1 day old)
  4. PR present in qcom-next: Cannot verify — read-only filesystem prevents git fetch; git log operations timeout. Manual verification recommended.

Additional notes:

  • Commit 1 fixes a critical out-of-bounds memory corruption bug (Fixes: ee16dcf)
  • Commits 5 and 8 properly reference bugzilla issue #221039
  • All commits tested on WCN7850 hw2.0 PCI
  • Authorship chain is correct for FROMLIST: original author Baochen Qiang in From + first Signed-off-by, submitter Gaole Zhang adds second Signed-off-by
  • Series implements a hardware-specific feature flag (host_alloc_ml_id) to handle different ML peer ID allocation strategies across ath12k devices

@qlijarvis

Copy link
Copy Markdown

PR #1502 — checker-log-analyzer

PR: #1502
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/29327186933

Checker Result Summary
Checker Result Summary
checkpatch Merge failure - unrelated histories
dt-binding-check Merge failure - unrelated histories
dtb-check Merge failure - unrelated histories
sparse-check Merge failure - unrelated histories
check-uapi-headers Merge failure - unrelated histories
check-patch-compliance Merge failure - unrelated histories
tag-check All commits have valid FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1502 - wifi: ath12k MLO peer ID fixes
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/29327186933
Target branch: tech/net/ath

Checker Result Summary
checkpatch Merge failure - unrelated histories
dt-binding-check Merge failure - unrelated histories
dtb-check Merge failure - unrelated histories
sparse-check Merge failure - unrelated histories
check-uapi-headers Merge failure - unrelated histories
check-patch-compliance Merge failure - unrelated histories
tag-check All commits have valid FROMLIST: prefix

❌ All Checkers — Git Merge Failure

Root cause: The PR branch and base branch tech/net/ath have unrelated Git histories and cannot be merged.

Failure details:

2026-07-14T11:15:25.0273535Z Merging pr-1502 (no-commit)...
2026-07-14T11:15:45.4943505Z fatal: refusing to merge unrelated histories
2026-07-14T11:15:45.6107169Z Merge failed or conflicts detected. Aborting merge.
2026-07-14T11:15:45.6127167Z fatal: There is no merge to abort (MERGE_HEAD missing).
2026-07-14T11:15:45.6147307Z ##[error]Process completed with exit code 3.

This error occurred identically across all six checker jobs (checkpatch, dt-binding-check, dtb-check, sparse-check, check-uapi-headers, check-patch-compliance).

Analysis:

Git's "refusing to merge unrelated histories" error means the PR branch does not share any common ancestor commit with the target branch tech/net/ath. This typically happens when:

  1. The PR was created from a completely different repository or branch lineage
  2. The base branch was force-pushed or rebased, breaking the ancestry chain
  3. The PR branch was created from an orphan branch with no parent commits

The CI workflow attempted to:

  1. Create an integration branch from baseline commit 947408df47978cb86ffcd180a6244379e03301bf
  2. Merge the topic branch topic/tech/net/ath (succeeded with "refusing to merge unrelated histories" but continued)
  3. Merge PR FROMLIST: wifi: ath12k: support firmware-allocated MLD peer ID #1502 into the integration branch (failed with "refusing to merge unrelated histories")

Fix:

The PR author needs to rebase the PR branch onto the correct base:

# Fetch the latest from the target repository
git fetch origin tech/net/ath

# Rebase the PR branch onto the target
git rebase origin/tech/net/ath

# Force-push the rebased branch (this will update the PR)
git push --force-with-lease

Alternatively, if the PR was created from the wrong repository:

# Add the correct upstream remote if not already present
git remote add upstream https://github.com/qualcomm-linux/kernel-topics.git
git fetch upstream tech/net/ath

# Rebase onto the correct upstream branch
git rebase upstream/tech/net/ath

# Force-push to update the PR
git push --force-with-lease

Note on tag-check:

All 8 commits in the PR correctly use the FROMLIST: prefix:

  • FROMLIST: wifi: ath12k: fix out-of-bounds clear_bit in ath12k_mac_dp_peer_cleanup()
  • FROMLIST: wifi: ath12k: factor out peer assoc send-and-wait into a helper
  • FROMLIST: wifi: ath12k: keep ATH12K_PEER_ML_ID_VALID set...
  • FROMLIST: wifi: ath12k: add support for...
  • FROMLIST: wifi: ath12k: introduce host_alloc_ml_id...
  • FROMLIST: wifi: ath12k: do not advertise MLD peer ID for...
  • FROMLIST: wifi: ath12k: defer dp_peer registration when...
  • FROMLIST: wifi: ath12k: resolve PENDING ML peer ID from...

Since the target branch is tech/net/ath (not qcom-next or qcom-next-staging), the subject prefix requirement applies, and all commits comply. ✅


Verdict

BLOCKER: Cannot merge until Git history issue is resolved.

The PR cannot be evaluated by any checker because the merge fails at the Git level. No code quality, style, or compliance issues can be assessed until the branch ancestry is fixed. The PR author must rebase the branch onto the correct base (tech/net/ath) to establish a common history before CI can run successfully.

Once rebased and force-pushed, re-trigger the CI workflow to get a proper checker analysis.

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.

3 participants