mirror of
https://github.com/optim-enterprises-bv/openwrt-ipq.git
synced 2025-10-30 01:43:02 +00:00
ath11k_nss: Fix patches for backports 6.11
deleted: (merged upstream) package/kernel/mac80211/patches/nss/ath11k/336-ath11k-skip-status-ring-entry-processing.patch Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot hif start\n");
|
||||
|
||||
+ dev_set_threaded(&ar->napi_dev, true);
|
||||
+ dev_set_threaded(ar->napi_dev, true);
|
||||
ath10k_core_napi_enable(ar);
|
||||
|
||||
ath10k_pci_irq_enable(ar);
|
||||
@@ -20,22 +20,23 @@
|
||||
/* Sleep 20 ms before HIF interrupts are disabled.
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -3722,6 +3722,9 @@ struct ath10k *ath10k_core_create(size_t
|
||||
ath10k_core_set_coverage_class_work);
|
||||
@@ -3707,6 +3707,10 @@ struct ath10k *ath10k_core_create(size_t
|
||||
if (!ar->napi_dev)
|
||||
goto err_free_tx_complete;
|
||||
|
||||
init_dummy_netdev(&ar->napi_dev);
|
||||
+ snprintf(ar->napi_dev.name, sizeof(ar->napi_dev.name), "ath10k_%s",
|
||||
+ snprintf(ar->napi_dev->name, sizeof(ar->napi_dev->name), "ath10k_%s",
|
||||
+ wiphy_name(ar->hw->wiphy));
|
||||
+ dev_set_threaded(&ar->napi_dev, true);
|
||||
|
||||
+ dev_set_threaded(ar->napi_dev, true);
|
||||
+
|
||||
ret = ath10k_coredump_create(ar);
|
||||
if (ret)
|
||||
goto err_free_netdev;
|
||||
--- a/drivers/net/wireless/ath/ath10k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
|
||||
@@ -622,6 +622,7 @@ static int ath10k_ahb_hif_start(struct a
|
||||
ath10k_core_napi_enable(ar);
|
||||
ath10k_ce_enable_interrupts(ar);
|
||||
ath10k_pci_enable_legacy_irq(ar);
|
||||
ath10k_pci_enable_intx_irq(ar);
|
||||
+ dev_set_threaded(&ar->napi_dev, true);
|
||||
|
||||
ath10k_pci_rx_post(ar);
|
||||
|
||||
@@ -411,21 +411,21 @@ Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org>
|
||||
|
||||
+static inline u32 ath11k_he_gi_to_nl80211_he_gi(u8 sgi)
|
||||
+{
|
||||
+ u32 ret = 0;
|
||||
+ u32 ret = 0;
|
||||
+
|
||||
+ switch (sgi) {
|
||||
+ case RX_MSDU_START_SGI_0_8_US:
|
||||
+ ret = NL80211_RATE_INFO_HE_GI_0_8;
|
||||
+ break;
|
||||
+ case RX_MSDU_START_SGI_1_6_US:
|
||||
+ ret = NL80211_RATE_INFO_HE_GI_1_6;
|
||||
+ break;
|
||||
+ case RX_MSDU_START_SGI_3_2_US:
|
||||
+ ret = NL80211_RATE_INFO_HE_GI_3_2;
|
||||
+ break;
|
||||
+ }
|
||||
+ switch (sgi) {
|
||||
+ case RX_MSDU_START_SGI_0_8_US:
|
||||
+ ret = NL80211_RATE_INFO_HE_GI_0_8;
|
||||
+ break;
|
||||
+ case RX_MSDU_START_SGI_1_6_US:
|
||||
+ ret = NL80211_RATE_INFO_HE_GI_1_6;
|
||||
+ break;
|
||||
+ case RX_MSDU_START_SGI_3_2_US:
|
||||
+ ret = NL80211_RATE_INFO_HE_GI_3_2;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
int ath11k_dp_rx_ampdu_start(struct ath11k *ar,
|
||||
|
||||
@@ -292,8 +292,8 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
||||
|
||||
- for (i = 0; i < ab->num_radios; i++) {
|
||||
+ for (i = 0; !nss_offload && i < ab->num_radios; i++) {
|
||||
for (j = 0; j < ab->hw_params.num_rxmda_per_pdev; j++) {
|
||||
int id = i * ab->hw_params.num_rxmda_per_pdev + j;
|
||||
for (j = 0; j < ab->hw_params.num_rxdma_per_pdev; j++) {
|
||||
int id = i * ab->hw_params.num_rxdma_per_pdev + j;
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp.h
|
||||
@@ -357,16 +357,7 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
||||
|
||||
if (ar->ab->hw_params.rxdma1_enable) {
|
||||
rx_ring = &dp->rxdma_mon_buf_ring;
|
||||
@@ -2036,7 +2039,7 @@ static void ath11k_dp_rx_h_csum_offload(
|
||||
CHECKSUM_NONE : CHECKSUM_UNNECESSARY;
|
||||
}
|
||||
|
||||
-static int ath11k_dp_rx_crypto_mic_len(struct ath11k *ar,
|
||||
+int ath11k_dp_rx_crypto_mic_len(struct ath11k *ar,
|
||||
enum hal_encrypt_type enctype)
|
||||
{
|
||||
switch (enctype) {
|
||||
@@ -2063,7 +2066,7 @@ static int ath11k_dp_rx_crypto_mic_len(s
|
||||
@@ -2062,7 +2065,7 @@ int ath11k_dp_rx_crypto_mic_len(struct a
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -462,12 +453,10 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
||||
ath11k_dp_rx_update_peer_mu_stats(ar, ppdu_info);
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.h
|
||||
@@ -145,4 +145,18 @@ int ath11k_peer_rx_frag_setup(struct ath
|
||||
int ath11k_dp_rx_pktlog_start(struct ath11k_base *ab);
|
||||
int ath11k_dp_rx_pktlog_stop(struct ath11k_base *ab, bool stop_timer);
|
||||
@@ -148,4 +148,16 @@ int ath11k_dp_rx_pktlog_stop(struct ath1
|
||||
|
||||
int ath11k_dp_rx_crypto_mic_len(struct ath11k *ar, enum hal_encrypt_type enctype);
|
||||
|
||||
+int ath11k_dp_rx_crypto_mic_len(struct ath11k *ar,
|
||||
+ enum hal_encrypt_type enctype);
|
||||
+int ath11k_dp_rx_crypto_param_len(struct ath11k *ar,
|
||||
+ enum hal_encrypt_type enctype);
|
||||
+int ath11k_dp_rx_crypto_icv_len(struct ath11k *ar,
|
||||
@@ -740,16 +729,16 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
||||
}
|
||||
|
||||
/* Restart the internal monitor vdev on new channel */
|
||||
@@ -8982,6 +9087,8 @@ static void ath11k_mac_op_sta_statistics
|
||||
sinfo->signal_avg = ewma_avg_rssi_read(&arsta->avg_rssi) +
|
||||
ATH11K_DEFAULT_NOISE_FLOOR;
|
||||
@@ -9014,6 +9119,8 @@ static void ath11k_mac_op_sta_statistics
|
||||
sinfo->signal_avg += ATH11K_DEFAULT_NOISE_FLOOR;
|
||||
|
||||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG);
|
||||
+
|
||||
+ ath11k_nss_update_sta_stats(sinfo, sta, arsta);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
@@ -9674,6 +9781,7 @@ static const struct ieee80211_ops ath11k
|
||||
@@ -9711,6 +9818,7 @@ static const struct ieee80211_ops ath11k
|
||||
.update_vif_offload = ath11k_mac_op_update_vif_offload,
|
||||
.config = ath11k_mac_op_config,
|
||||
.bss_info_changed = ath11k_mac_op_bss_info_changed,
|
||||
@@ -1195,8 +1184,8 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
||||
ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_3,
|
||||
--- a/drivers/net/wireless/ath/ath11k/pcic.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pcic.c
|
||||
@@ -582,6 +582,12 @@ static int ath11k_pcic_ext_irq_config(st
|
||||
netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
|
||||
@@ -589,6 +589,12 @@ static int ath11k_pcic_ext_irq_config(st
|
||||
netif_napi_add(irq_grp->napi_ndev, &irq_grp->napi,
|
||||
ath11k_pcic_ext_grp_napi_poll);
|
||||
|
||||
+ /* tcl, reo, rx_err, wbm release, rxdma rings are offloaded to nss. */
|
||||
|
||||
@@ -776,16 +776,16 @@ Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
|
||||
#endif /* _PEER_H_ */
|
||||
--- a/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
@@ -156,6 +156,8 @@ static const struct wmi_tlv_policy wmi_t
|
||||
.min_len = sizeof(struct wmi_per_chain_rssi_stats) },
|
||||
[WMI_TAG_TWT_ADD_DIALOG_COMPLETE_EVENT] = {
|
||||
.min_len = sizeof(struct wmi_twt_add_dialog_event) },
|
||||
@@ -161,6 +161,8 @@ static const struct wmi_tlv_policy wmi_t
|
||||
.min_len = sizeof(struct ath11k_wmi_p2p_noa_info) },
|
||||
[WMI_TAG_P2P_NOA_EVENT] = {
|
||||
.min_len = sizeof(struct wmi_p2p_noa_event) },
|
||||
+ [WMI_TAG_WDS_ADDR_EVENT] = {
|
||||
+ .min_len = sizeof(struct wmi_wds_addr_event) },
|
||||
};
|
||||
|
||||
#define PRIMAP(_hw_mode_) \
|
||||
@@ -1126,6 +1128,51 @@ int ath11k_wmi_send_peer_delete_cmd(stru
|
||||
@@ -1131,6 +1133,51 @@ int ath11k_wmi_send_peer_delete_cmd(stru
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -905,9 +905,9 @@ Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
|
||||
static void ath11k_wmi_tlv_op_rx(struct ath11k_base *ab, struct sk_buff *skb)
|
||||
{
|
||||
struct wmi_cmd_hdr *cmd_hdr;
|
||||
@@ -8908,6 +9002,9 @@ static void ath11k_wmi_tlv_op_rx(struct
|
||||
case WMI_GTK_OFFLOAD_STATUS_EVENTID:
|
||||
ath11k_wmi_gtk_offload_status_event(ab, skb);
|
||||
@@ -9008,6 +9102,9 @@ static void ath11k_wmi_tlv_op_rx(struct
|
||||
case WMI_P2P_NOA_EVENTID:
|
||||
ath11k_wmi_p2p_noa_event(ab, skb);
|
||||
break;
|
||||
+ case WMI_WDS_PEER_EVENTID:
|
||||
+ ath11k_wmi_wds_peer_event(ab, skb);
|
||||
|
||||
@@ -378,13 +378,13 @@ Signed-off-by: Sowmiya Sree Elavalagan <ssreeela@codeaurora.org>
|
||||
+ u32 tx_params_valid;
|
||||
+} __packed;
|
||||
+
|
||||
#define WMI_MAX_MEM_REQS 32
|
||||
|
||||
#define MAX_RADIOS 3
|
||||
@@ -6422,6 +6451,8 @@ int ath11k_wmi_cmd_send(struct ath11k_pd
|
||||
struct sk_buff *ath11k_wmi_alloc_skb(struct ath11k_wmi_base *wmi_sc, u32 len);
|
||||
int ath11k_wmi_mgmt_send(struct ath11k *ar, u32 vdev_id, u32 buf_id,
|
||||
|
||||
#define WMI_SERVICE_READY_TIMEOUT_HZ (5 * HZ)
|
||||
@@ -6428,6 +6457,8 @@ int ath11k_wmi_mgmt_send(struct ath11k *
|
||||
struct sk_buff *frame);
|
||||
int ath11k_wmi_p2p_go_bcn_ie(struct ath11k *ar, u32 vdev_id,
|
||||
const u8 *p2p_ie);
|
||||
+int ath11k_wmi_qos_null_send(struct ath11k *ar, u32 vdev_id, u32 buf_id,
|
||||
+ struct sk_buff *frame);
|
||||
int ath11k_wmi_bcn_tmpl(struct ath11k *ar, u32 vdev_id,
|
||||
|
||||
@@ -263,14 +263,14 @@ Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
|
||||
INIT_DELAYED_WORK(&arvif->connection_loss_work,
|
||||
ath11k_mac_vif_sta_connection_loss_work);
|
||||
|
||||
@@ -6689,6 +6839,7 @@ static int ath11k_mac_op_add_interface(s
|
||||
@@ -6788,6 +6938,7 @@ static int ath11k_mac_op_add_interface(s
|
||||
fallthrough;
|
||||
case NL80211_IFTYPE_AP:
|
||||
arvif->vdev_type = WMI_VDEV_TYPE_AP;
|
||||
+ INIT_LIST_HEAD(&arvif->ap_vlan_arvifs);
|
||||
if (vif->p2p)
|
||||
arvif->vdev_subtype = WMI_VDEV_SUBTYPE_P2P_GO;
|
||||
break;
|
||||
case NL80211_IFTYPE_MONITOR:
|
||||
arvif->vdev_type = WMI_VDEV_TYPE_MONITOR;
|
||||
@@ -6917,13 +7068,30 @@ static void ath11k_mac_op_remove_interfa
|
||||
struct ath11k *ar = hw->priv;
|
||||
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
+ if (enable)
|
||||
+ tlv_filter = ath11k_mac_mon_status_filter_default;
|
||||
+
|
||||
+ for (i = 0; i < ab->hw_params.num_rxmda_per_pdev; i++) {
|
||||
+ for (i = 0; i < ab->hw_params.num_rxdma_per_pdev; i++) {
|
||||
+ ring_id = ar->dp.rx_mon_status_refill_ring[i].refill_buf_ring.ring_id;
|
||||
+ ath11k_dp_tx_htt_rx_filter_setup(ar->ab, ring_id,
|
||||
+ ar->dp.mac_id + i,
|
||||
|
||||
@@ -95,7 +95,7 @@ Signed-off-by: Venkateswara Naralasetty <quic_vnaralas@quicinc.com>
|
||||
if (unlikely(!rcu_access_pointer(ab->pdevs_active[ar->pdev_idx]))) {
|
||||
ieee80211_free_txskb(ar->hw, msdu);
|
||||
return;
|
||||
@@ -704,48 +743,48 @@ static void ath11k_dp_tx_complete_msdu(s
|
||||
@@ -704,10 +743,10 @@ static void ath11k_dp_tx_complete_msdu(s
|
||||
/* skip tx rate update from ieee80211_status*/
|
||||
info->status.rates[0].idx = -1;
|
||||
|
||||
@@ -103,9 +103,12 @@ Signed-off-by: Venkateswara Naralasetty <quic_vnaralas@quicinc.com>
|
||||
+ if (ts.status == HAL_WBM_TQM_REL_REASON_FRAME_ACKED &&
|
||||
!(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
|
||||
info->flags |= IEEE80211_TX_STAT_ACK;
|
||||
info->status.ack_signal = ATH11K_DEFAULT_NOISE_FLOOR +
|
||||
- ts->ack_rssi;
|
||||
+ ts.ack_rssi;
|
||||
- info->status.ack_signal = ts->ack_rssi;
|
||||
+ info->status.ack_signal = ts.ack_rssi;
|
||||
|
||||
if (!test_bit(WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT,
|
||||
ab->wmi_ab.svc_map))
|
||||
@@ -720,40 +759,40 @@ static void ath11k_dp_tx_complete_msdu(s
|
||||
info->status.flags |= IEEE80211_TX_STATUS_ACK_SIGNAL_VALID;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,220 +0,0 @@
|
||||
From: Venkateswara Naralasetty <quic_vnaralas@quicinc.com>
|
||||
Date: Mon, 29 Apr 2024 13:06:24 +0530
|
||||
Subject: [PATCHv5] 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().
|
||||
|
||||
Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Venkateswara Naralasetty <quic_vnaralas@quicinc.com>
|
||||
Co-developed-by: Tamizh Chelvam Raja <quic_tamizhr@quicinc.com>
|
||||
Signed-off-by: Tamizh Chelvam Raja <quic_tamizhr@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
v5:
|
||||
* Updated copyright info in dp_rx.c and hal.c
|
||||
v4:
|
||||
* Removed kernel reported compilation warning from Signed off place
|
||||
v3:
|
||||
* Rebased on top of ToT
|
||||
v2:
|
||||
* Fixed compilation warning Reported-by: kernel test robot <lkp@intel.com>
|
||||
|
||||
drivers/net/wireless/ath/ath11k/dp_rx.c | 90 ++++++++++++++++++++++---
|
||||
drivers/net/wireless/ath/ath11k/hal.c | 16 ++++-
|
||||
drivers/net/wireless/ath/ath11k/hal.h | 2 +
|
||||
3 files changed, 96 insertions(+), 12 deletions(-)
|
||||
|
||||
|
||||
base-commit: bf99bc7423e18aa3475ef00a7a6fb773c31ce6df
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/ieee80211.h>
|
||||
@@ -3662,11 +3662,52 @@ ath11k_dp_rx_mon_update_status_buf_state
|
||||
}
|
||||
}
|
||||
|
||||
+static enum dp_mon_status_buf_state
|
||||
+ath11k_dp_rx_mon_handle_status_buf_done(struct ath11k_base *ab, struct hal_srng *srng,
|
||||
+ struct dp_rxdma_ring *rx_ring)
|
||||
+{
|
||||
+ struct ath11k_skb_rxcb *rxcb;
|
||||
+ struct hal_tlv_hdr *tlv;
|
||||
+ struct sk_buff *skb;
|
||||
+ void *status_desc;
|
||||
+ dma_addr_t paddr;
|
||||
+ u32 cookie;
|
||||
+ int buf_id;
|
||||
+ u8 rbm;
|
||||
+
|
||||
+ status_desc = ath11k_hal_srng_src_next_peek(ab, srng);
|
||||
+ if (!status_desc)
|
||||
+ return DP_MON_STATUS_NO_DMA;
|
||||
+
|
||||
+ ath11k_hal_rx_buf_addr_info_get(status_desc, &paddr, &cookie, &rbm);
|
||||
+
|
||||
+ buf_id = FIELD_GET(DP_RXDMA_BUF_COOKIE_BUF_ID, cookie);
|
||||
+
|
||||
+ spin_lock_bh(&rx_ring->idr_lock);
|
||||
+ skb = idr_find(&rx_ring->bufs_idr, buf_id);
|
||||
+ spin_unlock_bh(&rx_ring->idr_lock);
|
||||
+
|
||||
+ if (!skb)
|
||||
+ return DP_MON_STATUS_NO_DMA;
|
||||
+
|
||||
+ rxcb = ATH11K_SKB_RXCB(skb);
|
||||
+ dma_sync_single_for_cpu(ab->dev, rxcb->paddr,
|
||||
+ skb->len + skb_tailroom(skb),
|
||||
+ DMA_FROM_DEVICE);
|
||||
+
|
||||
+ tlv = (struct hal_tlv_hdr *)skb->data;
|
||||
+ if (FIELD_GET(HAL_TLV_HDR_TAG, tlv->tl) != HAL_RX_STATUS_BUFFER_DONE)
|
||||
+ return DP_MON_STATUS_NO_DMA;
|
||||
+
|
||||
+ return DP_MON_STATUS_REPLINISH;
|
||||
+}
|
||||
+
|
||||
static int ath11k_dp_rx_reap_mon_status_ring(struct ath11k_base *ab, int mac_id,
|
||||
int *budget, struct sk_buff_head *skb_list)
|
||||
{
|
||||
struct ath11k *ar;
|
||||
const struct ath11k_hw_hal_params *hal_params;
|
||||
+ enum dp_mon_status_buf_state reap_status;
|
||||
struct ath11k_pdev_dp *dp;
|
||||
struct dp_rxdma_ring *rx_ring;
|
||||
struct ath11k_mon_data *pmon;
|
||||
@@ -3694,8 +3735,7 @@ static int ath11k_dp_rx_reap_mon_status_
|
||||
ath11k_hal_srng_access_begin(ab, srng);
|
||||
while (*budget) {
|
||||
*budget -= 1;
|
||||
- rx_mon_status_desc =
|
||||
- ath11k_hal_srng_src_peek(ab, srng);
|
||||
+ rx_mon_status_desc = ath11k_hal_srng_src_peek(ab, srng);
|
||||
if (!rx_mon_status_desc) {
|
||||
pmon->buf_state = DP_MON_STATUS_REPLINISH;
|
||||
break;
|
||||
@@ -3729,15 +3769,43 @@ static int ath11k_dp_rx_reap_mon_status_
|
||||
ath11k_warn(ab, "mon status DONE not set %lx, buf_id %d\n",
|
||||
FIELD_GET(HAL_TLV_HDR_TAG,
|
||||
tlv->tl), buf_id);
|
||||
- /* If done status is missing, hold onto status
|
||||
- * ring until status is done for this status
|
||||
- * ring buffer.
|
||||
- * Keep HP in mon_status_ring unchanged,
|
||||
- * and break from here.
|
||||
- * Check status for same buffer for next time
|
||||
+ /* RxDMA status done bit might not be set even
|
||||
+ * though tp is moved by HW.
|
||||
*/
|
||||
- pmon->buf_state = DP_MON_STATUS_NO_DMA;
|
||||
- break;
|
||||
+
|
||||
+ /* If done status is missing:
|
||||
+ * 1. As per MAC team's suggestion,
|
||||
+ * when HP + 1 entry is peeked and if DMA
|
||||
+ * is not done and if HP + 2 entry's DMA done
|
||||
+ * is set. skip HP + 1 entry and
|
||||
+ * start processing in next interrupt.
|
||||
+ * 2. If HP + 2 entry's DMA done is not set,
|
||||
+ * poll onto HP + 1 entry DMA done to be set.
|
||||
+ * Check status for same buffer for next time
|
||||
+ * dp_rx_mon_status_srng_process
|
||||
+ */
|
||||
+
|
||||
+ reap_status = ath11k_dp_rx_mon_handle_status_buf_done(ab, srng,
|
||||
+ rx_ring);
|
||||
+ if (reap_status == DP_MON_STATUS_NO_DMA) {
|
||||
+ continue;
|
||||
+ } 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);
|
||||
+
|
||||
+ spin_lock_bh(&rx_ring->idr_lock);
|
||||
+ idr_remove(&rx_ring->bufs_idr, buf_id);
|
||||
+ spin_unlock_bh(&rx_ring->idr_lock);
|
||||
+
|
||||
+ dma_unmap_single(ab->dev, rxcb->paddr,
|
||||
+ skb->len + skb_tailroom(skb),
|
||||
+ DMA_FROM_DEVICE);
|
||||
+
|
||||
+ dev_kfree_skb_any(skb);
|
||||
+ pmon->buf_state = DP_MON_STATUS_REPLINISH;
|
||||
+ goto move_next;
|
||||
+ }
|
||||
}
|
||||
|
||||
spin_lock_bh(&rx_ring->idr_lock);
|
||||
--- a/drivers/net/wireless/ath/ath11k/hal.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/hal.c
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
#include <linux/dma-mapping.h>
|
||||
#include "hal_tx.h"
|
||||
@@ -852,6 +852,20 @@ u32 *ath11k_hal_srng_src_get_next_reaped
|
||||
return desc;
|
||||
}
|
||||
|
||||
+u32 *ath11k_hal_srng_src_next_peek(struct ath11k_base *ab, struct hal_srng *srng)
|
||||
+{
|
||||
+ u32 next_hp;
|
||||
+
|
||||
+ lockdep_assert_held(&srng->lock);
|
||||
+
|
||||
+ next_hp = (srng->u.src_ring.hp + srng->entry_size) % srng->ring_size;
|
||||
+
|
||||
+ if (next_hp != srng->u.src_ring.cached_tp)
|
||||
+ return srng->ring_base_vaddr + next_hp;
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
u32 *ath11k_hal_srng_src_peek(struct ath11k_base *ab, struct hal_srng *srng)
|
||||
{
|
||||
lockdep_assert_held(&srng->lock);
|
||||
--- a/drivers/net/wireless/ath/ath11k/hal.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/hal.h
|
||||
@@ -953,6 +953,8 @@ int ath11k_hal_srng_dst_num_free(struct
|
||||
void ath11k_hal_srng_dst_invalidate_entry(struct ath11k_base *ab,
|
||||
struct hal_srng *srng, int entries);
|
||||
u32 *ath11k_hal_srng_src_peek(struct ath11k_base *ab, struct hal_srng *srng);
|
||||
+u32 *ath11k_hal_srng_src_next_peek(struct ath11k_base *ab,
|
||||
+ struct hal_srng *srng);
|
||||
u32 *ath11k_hal_srng_src_get_next_reaped(struct ath11k_base *ab,
|
||||
struct hal_srng *srng);
|
||||
u32 *ath11k_hal_srng_src_reap_next(struct ath11k_base *ab,
|
||||
@@ -18,14 +18,14 @@ Signed-off-by: Ramya Gnanasekar <rgnanase@codeaurora.org>
|
||||
ar->debug.rx_filter = tlv_filter.rx_filter;
|
||||
+ tlv_filter.offset_valid = false;
|
||||
|
||||
for (i = 0; i < ab->hw_params.num_rxmda_per_pdev; i++) {
|
||||
for (i = 0; i < ab->hw_params.num_rxdma_per_pdev; i++) {
|
||||
ring_id = ar->dp.rx_mon_status_refill_ring[i].refill_buf_ring.ring_id;
|
||||
@@ -1229,6 +1230,7 @@ static ssize_t ath11k_write_pktlog_filte
|
||||
}
|
||||
|
||||
/* Clear rx filter set for monitor mode and rx status */
|
||||
+ tlv_filter.offset_valid = false;
|
||||
for (i = 0; i < ab->hw_params.num_rxmda_per_pdev; i++) {
|
||||
for (i = 0; i < ab->hw_params.num_rxdma_per_pdev; i++) {
|
||||
ring_id = ar->dp.rx_mon_status_refill_ring[i].refill_buf_ring.ring_id;
|
||||
ret = ath11k_dp_tx_htt_rx_filter_setup(ar->ab, ring_id, ar->dp.mac_id,
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp.h
|
||||
@@ -933,12 +933,12 @@ Signed-off-by: Ramya Gnanasekar <rgnanase@codeaurora.org>
|
||||
extern const struct ath11k_hw_ops ipq8074_ops;
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6438,6 +6438,7 @@ static int ath11k_mac_config_mon_status_
|
||||
@@ -6535,6 +6535,7 @@ static int ath11k_mac_config_mon_status_
|
||||
tlv_filter.rx_filter = ath11k_debugfs_rx_filter(ar);
|
||||
}
|
||||
|
||||
+ tlv_filter.offset_valid = false;
|
||||
for (i = 0; i < ab->hw_params.num_rxmda_per_pdev; i++) {
|
||||
for (i = 0; i < ab->hw_params.num_rxdma_per_pdev; i++) {
|
||||
ring_id = ar->dp.rx_mon_status_refill_ring[i].refill_buf_ring.ring_id;
|
||||
ret = ath11k_dp_tx_htt_rx_filter_setup(ar->ab, ring_id,
|
||||
--- a/drivers/net/wireless/ath/ath11k/rx_desc.h
|
||||
|
||||
@@ -20,7 +20,7 @@ Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -1594,27 +1594,6 @@ static int ath11k_mac_setup_bcn_tmpl(str
|
||||
@@ -1681,27 +1681,6 @@ static int ath11k_mac_setup_bcn_tmpl(str
|
||||
return ath11k_mac_setup_bcn_tmpl_mbssid(arvif);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
|
||||
- if (vif->bss_conf.color_change_active &&
|
||||
- ieee80211_beacon_cntdwn_is_complete(vif, 0)) {
|
||||
- arvif->bcca_zero_sent = true;
|
||||
- ieee80211_color_change_finish(vif);
|
||||
- ieee80211_color_change_finish(vif, 0);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
@@ -107,7 +107,7 @@ Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
|
||||
+ ieee80211_beacon_update_cntdwn(arvif->vif, 0);
|
||||
+ } else {
|
||||
+ if (bss_conf->color_change_active)
|
||||
+ ieee80211_color_change_finish(arvif->vif);
|
||||
+ ieee80211_color_change_finish(arvif->vif, 0);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
@@ -495,8 +495,7 @@ static int ath11k_ahb_ext_grp_napi_poll(
|
||||
@@ -496,8 +496,7 @@ static int ath11k_ahb_ext_grp_napi_poll(
|
||||
int work_done;
|
||||
|
||||
work_done = ath11k_dp_service_srng(ab, irq_grp, budget);
|
||||
@@ -10,7 +10,7 @@
|
||||
ath11k_ahb_ext_grp_enable(irq_grp);
|
||||
}
|
||||
|
||||
@@ -527,6 +526,7 @@ static int ath11k_ahb_config_ext_irq(str
|
||||
@@ -528,6 +527,7 @@ static int ath11k_ahb_config_ext_irq(str
|
||||
int irq;
|
||||
int ret;
|
||||
bool nss_offload;
|
||||
@@ -18,20 +18,22 @@
|
||||
|
||||
/* TCL Completion, REO Dest, ERR, Exception and h2rxdma rings are offloaded
|
||||
* to nss when its enabled, hence don't enable these interrupts
|
||||
@@ -540,8 +540,12 @@ static int ath11k_ahb_config_ext_irq(str
|
||||
irq_grp->ab = ab;
|
||||
irq_grp->grp_id = i;
|
||||
init_dummy_netdev(&irq_grp->napi_ndev);
|
||||
+ snprintf(irq_grp->napi_ndev.name, sizeof(irq_grp->napi_ndev.name), "%s%d:%d",
|
||||
@@ -545,9 +545,14 @@ static int ath11k_ahb_config_ext_irq(str
|
||||
if (!irq_grp->napi_ndev)
|
||||
return -ENOMEM;
|
||||
|
||||
+ snprintf(irq_grp->napi_ndev->name, sizeof(irq_grp->napi_ndev->name), "%s%d:%d",
|
||||
+ "ath11k_ahb", devidx, i);
|
||||
+
|
||||
netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
|
||||
netif_napi_add(irq_grp->napi_ndev, &irq_grp->napi,
|
||||
ath11k_ahb_ext_grp_napi_poll);
|
||||
+ dev_set_threaded(&irq_grp->napi_ndev, true);
|
||||
|
||||
+ dev_set_threaded(irq_grp->napi_ndev, true);
|
||||
+
|
||||
for (j = 0; j < ATH11K_EXT_IRQ_NUM_MAX; j++) {
|
||||
if (!nss_offload && ab->hw_params.ring_mask->tx[i] & BIT(j)) {
|
||||
@@ -605,6 +609,8 @@ static int ath11k_ahb_config_ext_irq(str
|
||||
irq_grp->irqs[num_irq++] =
|
||||
@@ -610,6 +615,8 @@ static int ath11k_ahb_config_ext_irq(str
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +44,7 @@
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/pcic.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pcic.c
|
||||
@@ -516,8 +516,7 @@ static int ath11k_pcic_ext_grp_napi_poll
|
||||
@@ -517,8 +517,7 @@ static int ath11k_pcic_ext_grp_napi_poll
|
||||
int i;
|
||||
|
||||
work_done = ath11k_dp_service_srng(ab, irq_grp, budget);
|
||||
@@ -52,33 +54,35 @@
|
||||
for (i = 0; i < irq_grp->num_irq; i++)
|
||||
enable_irq(irq_grp->ab->irq_num[irq_grp->irqs[i]]);
|
||||
}
|
||||
@@ -561,6 +560,7 @@ static int ath11k_pcic_ext_irq_config(st
|
||||
int i, j, ret, num_vectors = 0;
|
||||
@@ -563,6 +562,7 @@ static int ath11k_pcic_ext_irq_config(st
|
||||
u32 user_base_data = 0, base_vector = 0;
|
||||
struct ath11k_ext_irq_grp *irq_grp;
|
||||
unsigned long irq_flags;
|
||||
+ static int devidx = 0;
|
||||
|
||||
ret = ath11k_pcic_get_user_msi_assignment(ab, "DP", &num_vectors,
|
||||
&user_base_data,
|
||||
@@ -579,8 +579,12 @@ static int ath11k_pcic_ext_irq_config(st
|
||||
irq_grp->ab = ab;
|
||||
irq_grp->grp_id = i;
|
||||
init_dummy_netdev(&irq_grp->napi_ndev);
|
||||
+ snprintf(irq_grp->napi_ndev.name, sizeof(irq_grp->napi_ndev.name), "%s%d:%d",
|
||||
@@ -586,9 +586,14 @@ static int ath11k_pcic_ext_irq_config(st
|
||||
goto fail_allocate;
|
||||
}
|
||||
|
||||
+ snprintf(irq_grp->napi_ndev->name, sizeof(irq_grp->napi_ndev->name), "%s%d:%d",
|
||||
+ "ath11k_pci", devidx, i);
|
||||
+
|
||||
netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
|
||||
netif_napi_add(irq_grp->napi_ndev, &irq_grp->napi,
|
||||
ath11k_pcic_ext_grp_napi_poll);
|
||||
+ dev_set_threaded(&irq_grp->napi_ndev, true);
|
||||
|
||||
+ dev_set_threaded(irq_grp->napi_ndev, true);
|
||||
+
|
||||
/* tcl, reo, rx_err, wbm release, rxdma rings are offloaded to nss. */
|
||||
if (ab->nss.enabled &&
|
||||
@@ -627,6 +631,8 @@ static int ath11k_pcic_ext_irq_config(st
|
||||
!(ab->hw_params.ring_mask->reo_status[i] ||
|
||||
@@ -640,6 +645,8 @@ static int ath11k_pcic_ext_irq_config(st
|
||||
ath11k_pcic_ext_grp_disable(irq_grp);
|
||||
}
|
||||
|
||||
+ devidx++;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
fail_irq:
|
||||
/* i ->napi_ndev was properly allocated. Free it also */
|
||||
|
||||
@@ -48,23 +48,23 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
||||
/*
|
||||
* The maximum number of IPv4 addresses listed for ARP filtering. If the number
|
||||
* of addresses for an interface increase beyond this value, hardware ARP
|
||||
@@ -703,6 +717,7 @@ struct ieee80211_fils_discovery {
|
||||
* beamformee
|
||||
* @eht_mu_beamformer: in AP-mode, does this BSS enable operation as an EHT MU
|
||||
* beamformer
|
||||
@@ -740,6 +754,7 @@ struct ieee80211_parsed_tpe {
|
||||
* @eht_80mhz_full_bw_ul_mumimo: in AP-mode, does this BSS support the
|
||||
* reception of an EHT TB PPDU on an RU that spans the entire PPDU
|
||||
* bandwidth
|
||||
+ * @nss_ap_isolate: Used for notifying the NSS host about AP isolate feature
|
||||
*/
|
||||
struct ieee80211_bss_conf {
|
||||
struct ieee80211_vif *vif;
|
||||
@@ -795,6 +810,7 @@ struct ieee80211_bss_conf {
|
||||
bool eht_su_beamformer;
|
||||
@@ -834,6 +849,7 @@ struct ieee80211_bss_conf {
|
||||
bool eht_su_beamformee;
|
||||
bool eht_mu_beamformer;
|
||||
bool eht_80mhz_full_bw_ul_mumimo;
|
||||
+ bool nss_ap_isolate;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1445,7 +1461,7 @@ ieee80211_tx_info_clear_status(struct ie
|
||||
@@ -1484,7 +1500,7 @@ ieee80211_tx_info_clear_status(struct ie
|
||||
* @RX_FLAG_AMPDU_EOF_BIT_KNOWN: The EOF value is known
|
||||
* @RX_FLAG_RADIOTAP_HE: HE radiotap data is present
|
||||
* (&struct ieee80211_radiotap_he, mac80211 will fill in
|
||||
@@ -108,15 +108,15 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
||||
* @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
|
||||
*/
|
||||
enum ieee80211_hw_flags {
|
||||
@@ -2847,6 +2875,7 @@ enum ieee80211_hw_flags {
|
||||
IEEE80211_HW_MLO_MCAST_MULTI_LINK_TX,
|
||||
@@ -2884,6 +2912,7 @@ enum ieee80211_hw_flags {
|
||||
IEEE80211_HW_DISALLOW_PUNCTURING,
|
||||
IEEE80211_HW_DISALLOW_PUNCTURING_5GHZ,
|
||||
IEEE80211_HW_HANDLES_QUIET_CSA,
|
||||
+ IEEE80211_HW_SUPPORTS_NSS_OFFLOAD,
|
||||
|
||||
/* keep last, obviously */
|
||||
NUM_IEEE80211_HW_FLAGS
|
||||
@@ -3860,6 +3889,10 @@ struct ieee80211_prep_tx_info {
|
||||
@@ -3899,6 +3928,10 @@ struct ieee80211_prep_tx_info {
|
||||
* non-MLO connections.
|
||||
* The callback can sleep.
|
||||
*
|
||||
@@ -150,8 +150,8 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
||||
--- a/net/mac80211/debugfs.c
|
||||
+++ b/net/mac80211/debugfs.c
|
||||
@@ -508,6 +508,7 @@ static const char *hw_flag_names[] = {
|
||||
FLAG(MLO_MCAST_MULTI_LINK_TX),
|
||||
FLAG(DISALLOW_PUNCTURING),
|
||||
FLAG(DISALLOW_PUNCTURING_5GHZ),
|
||||
FLAG(HANDLES_QUIET_CSA),
|
||||
+ FLAG(SUPPORTS_NSS_OFFLOAD),
|
||||
#undef FLAG
|
||||
|
||||
@@ -70,7 +70,7 @@ Signed-off-by: Yuvasree Sivasankaran <quic_ysivasan@quicinc.com>
|
||||
+ if (ieee80211_hw_check(&local->hw, HAS_TX_QUEUE))
|
||||
+ return;
|
||||
+
|
||||
kfree(local->cvars);
|
||||
kvfree(local->cvars);
|
||||
local->cvars = NULL;
|
||||
|
||||
@@ -1664,7 +1670,8 @@ static bool ieee80211_queue_skb(struct i
|
||||
|
||||
Reference in New Issue
Block a user