qosmio / openwrt-ipq

This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
Other
118 stars 40 forks source link

ath11k_nss: Fix patches for backports 6.11 #9

Closed zxlhhyccc closed 2 weeks ago

zxlhhyccc commented 2 weeks ago

Fix: 1, The wireless display rate is 0;

  1. The network is abnormal;
  2. The kernel crashes, as shown by unresponsive routing.
qosmio commented 2 weeks ago

Thanks for the PR, however I'm afraid I can't merge this.

1.) You're using an older commit meant for 6.9.9. Tri-band devices like MX5300 and AX3600 have ath10k and ath11k radios so it fails compilation.

../mac80211-regular/backports-6.11/drivers/net/wireless/ath/ath10k/core.c: In function 'ath10k_core_create':
../mac80211-regular/backports-6.11/drivers/net/wireless/ath/ath10k/core.c:3731:30: error: 'ar->napi_dev' is a pointer; did you mean to use '->'?
 3731 |         snprintf(ar->napi_dev.name, sizeof(ar->napi_dev.name), "ath10k_%s",
      |                              ^
      |                              ->
../mac80211-regular/backports-6.11/drivers/net/wireless/ath/ath10k/core.c:3731:56: error: 'ar->napi_dev' is a pointer; did you mean to use '->'?
 3731 |         snprintf(ar->napi_dev.name, sizeof(ar->napi_dev.name), "ath10k_%s",
      |                                                        ^
      |                                                        ->

2.) I removed package/kernel/mac80211/patches/nss/ath11k/336-ath11k-skip-status-ring-entry-processing.patch because it's already merged upstream.

commit 4c2b796be3a12a11ab611917fafdabc9d3862a1d
Author:     Venkateswara Naralasetty <quic_vnaralas@quicinc.com>
AuthorDate: Fri May 3 16:24:16 2024 +0300
Commit:     Kalle Valo <quic_kvalo@quicinc.com>
CommitDate: Tue May 7 13:00:01 2024 +0300

    wifi: ath11k: skip status ring entry processing

    If STATUS_BUFFER_DONE is not set for a monitor status ring entry,
    we don't process the status ring until STATUS_BUFFER_DONE set
    for that status ring entry.

    During LMAC reset it may happen that hardware will not write
    STATUS_BUFFER_DONE tlv in status buffer, in that case we end up
    waiting for STATUS_BUFFER_DONE leading to backpressure on monitor
    status ring.

    To fix the issue, when HP (Head Pointer) + 1 entry is peeked and if DMA is not
    done and if HP + 2 entry's DMA done is set, replenish HP + 1 entry and start
    processing in next interrupt. If HP + 2 entry's DMA done is not set, poll onto
    HP + 1 entry DMA done to be set.

    Also, during monitor attach HP points to the end of the ring and TP (Tail
    Pointer) points to the start of the ring.  Using ath11k_hal_srng_src_peek() may
    result in processing invalid buffer for the very first interrupt. Since, HW
    starts writing buffer from TP.

    To avoid this issue call ath11k_hal_srng_src_next_peek() instead of
    calling ath11k_hal_srng_src_peek().

This patch is an older version of the patch. It is now essentially only adding a warning message that is not necessary.

+               } else if (reap_status == DP_MON_STATUS_REPLINISH) {
+                   ath11k_warn(ab, "mon status DONE not set %lx, buf_id %d\n",
+                           FIELD_GET(HAL_TLV_HDR_TAG, tlv->tl),
+                           buf_id);

3.) Sebastian's (@BrainSlayer) patch nss/ath11k/999-902-ath11k-fix-wds-ap-and-sta-mode-issues.patch needs to be properly accredited to him as a separate commit. I have to confirm this works before merging in. Have you tested this in a WDS setup?

Please test with just reverting 83f66350152b570efaeb903a55f508c5995d41f9 "ath11k_nss: Revert patch for 512M + 2KB RX header", as that is likely the cause for your issues.