ath11k_nss: fix null chanctx warning for NSS dynamic VLAN

Patch is updated to match closer to QSDK's implementation for
ath11k/12k. The null chanctx warning is likely due to the way NSS is
managing the interface. This patch (for now) is a workaround to prevent
the BUG_ON() from triggering for dynamic VLANs.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
Sean Khan
2025-02-28 11:07:23 -05:00
parent 0da9714059
commit 323025844f
2 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -275,6 +275,7 @@ tcl_ring_sel:
ti.data_len = skb->len - ti.pkt_offset;
skb_cb->pkt_offset = ti.pkt_offset;
+ skb_cb->paddr = ti.paddr;
skb_cb->vif = arvif->vif;
skb_cb->ar = ar;
@@ -283,11 +284,9 @@ tcl_ring_sel:
atomic_inc(&ab->soc_stats.tx_err.misc_fail);
ath11k_warn(ab, "failed to DMA map data Tx buffer\n");
ret = -ENOMEM;
- goto fail_remove_idr;
+ goto fail_pull_skb;
}
- skb_cb->paddr = ti.paddr;
-
if (ring_id == DP_TCL_NUM_RING_MAX)
hal_ring_id = dp->tcl_cmd_ring.ring_id;
else
@@ -343,10 +342,11 @@ tcl_ring_sel:
fail_unmap_dma:
dma_unmap_single(ab->dev, ti.paddr, ti.data_len, DMA_TO_DEVICE);
-fail_remove_idr:
+fail_pull_skb:
if (ti.pkt_offset)
skb_pull(skb, ti.pkt_offset);
+fail_remove_idr:
spin_lock_bh(&tx_ring->tx_idr_lock);
tx_ring->idr_pool[idr].id = -1;
clear_bit(idr, tx_ring->idrs);

View File

@@ -0,0 +1,21 @@
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -6323,13 +6323,17 @@ void ieee80211_tx_skb_tid(struct ieee802
{
struct ieee80211_chanctx_conf *chanctx_conf;
enum nl80211_band band;
+ struct ieee80211_local *local = sdata->local;
rcu_read_lock();
if (!ieee80211_vif_is_mld(&sdata->vif)) {
WARN_ON(link_id >= 0);
chanctx_conf =
rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
- if (WARN_ON(!chanctx_conf)) {
+ if (!chanctx_conf) {
+ if (!ieee80211_hw_check(&local->hw, SUPPORTS_NSS_OFFLOAD)) {
+ WARN_ON(1);
+ }
rcu_read_unlock();
kfree_skb(skb);
return;