Change the get_ring_selector hw_ops callback signature from get_ring_selector(struct sk_buff *skb) to get_ring_selector(u8 ac), removing the dependency on the skb. All ath12k get_ring_selector implementations fall into two categories: - smp_processor_id(): ignores the skb entirely - skb_get_queue_mapping(): only reads the AC value from the skb Since the AC is the only information extracted from the skb, pass it directly as a u8 parameter instead. Callers in the dp_tx path now pass skb_get_queue_mapping(skb), which preserves the exact same behavior. This change enables a subsequent patch to call get_ring_selector() from wake_tx_queue using txq->ac, without needing access to the skb. mac80211 guarantees that skb_get_queue_mapping(skb) == txq->ac for any skb dequeued from a given txq, since both values are derived from the same skb->priority through the same AC mapping. No functional change. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3 Signed-off-by: Jose Ignacio Tornos Martinez --- v8: Split ath11k and ath12k into separate series to avoid conflict with Julius's airtime queue limits series (ath11k only) and help to unblock both No code changes from v7 v7: https://lore.kernel.org/all/20260917064825.12747-3-jtornosm@redhat.com/ drivers/net/wireless/ath/ath12k/hw.h | 2 +- drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c | 2 +- drivers/net/wireless/ath/ath12k/wifi7/hw.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/hw.h b/drivers/net/wireless/ath/ath12k/hw.h index 86fb8b719613..65caa7a2349f 100644 --- a/drivers/net/wireless/ath/ath12k/hw.h +++ b/drivers/net/wireless/ath/ath12k/hw.h @@ -243,7 +243,7 @@ struct ath12k_hw_ops { int (*mac_id_to_pdev_id)(const struct ath12k_hw_params *hw, int mac_id); int (*mac_id_to_srng_id)(const struct ath12k_hw_params *hw, int mac_id); int (*rxdma_ring_sel_config)(struct ath12k_base *ab); - u8 (*get_ring_selector)(struct sk_buff *skb); + u8 (*get_ring_selector)(u8 ac); bool (*dp_srng_is_tx_comp_ring)(int ring_num); bool (*is_frame_link_agnostic)(struct ath12k_link_vif *arvif, struct ieee80211_mgmt *mgmt); diff --git a/drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c b/drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c index d2749de44553..74359e8eea47 100644 --- a/drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c +++ b/drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c @@ -111,7 +111,7 @@ int ath12k_wifi7_dp_tx(struct ath12k_pdev_dp *dp_pdev, struct ath12k_link_vif *a * If all rings are full, we drop the packet. * TODO: Add throttling logic when all rings are full */ - ring_selector = dp->hw_params->hw_ops->get_ring_selector(skb); + ring_selector = dp->hw_params->hw_ops->get_ring_selector(skb_get_queue_mapping(skb)); tcl_ring_sel: tcl_ring_retry = false; diff --git a/drivers/net/wireless/ath/ath12k/wifi7/hw.c b/drivers/net/wireless/ath/ath12k/wifi7/hw.c index d9fdd2fc8298..7436cf70925a 100644 --- a/drivers/net/wireless/ath/ath12k/wifi7/hw.c +++ b/drivers/net/wireless/ath/ath12k/wifi7/hw.c @@ -49,7 +49,7 @@ ath12k_wifi7_hw_mac_id_to_srng_id_qcn9274(const struct ath12k_hw_params *hw, return 0; } -static u8 ath12k_wifi7_hw_get_ring_selector_qcn9274(struct sk_buff *skb) +static u8 ath12k_wifi7_hw_get_ring_selector_qcn9274(u8 ac) { return smp_processor_id(); } @@ -83,9 +83,9 @@ ath12k_wifi7_hw_mac_id_to_srng_id_wcn7850(const struct ath12k_hw_params *hw, return mac_id; } -static u8 ath12k_wifi7_hw_get_ring_selector_wcn7850(struct sk_buff *skb) +static u8 ath12k_wifi7_hw_get_ring_selector_wcn7850(u8 ac) { - return skb_get_queue_mapping(skb); + return ac; } static bool ath12k_wifi7_dp_srng_is_comp_ring_wcn7850(int ring_num) -- 2.54.0