wifi: ath12k: report TX status for broadcast and multicast frames
PATCH 1/1 wifi: ath12k: report TX status for broadcast and multicast frames
From: Vitor Soares <[email protected]>
In AP mode, once a station is associated, broadcast and multicast frames sent by the AP log:
ath12k_wifi7_pci 0003:01:00.0: dp_tx: failed to find the peer with peer_id 2
These frames complete against the AP's own peer. That peer has no station, and since commit 981050b918fc ("wifi: ath12k: Fix TX status reporting to mac80211 when offload is enabled") a missing station is treated as a missing peer: the frame is dropped and an error is logged. Before that commit, the TX status of these frames was reported without a station.
Report the TX status without a station when the peer has none, and add rate information only when a station is present. Only drop the frame when the peer is not found, and log that case at debug level, as the HTT completion path does.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
---
This conflicts with c752394249f8 ("wifi: ath12k: store station pointer only in dp_peer") in ath-next; the resolution uses ath12k_dp_link_peer_get_sta(peer) in place of peer->sta.
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-)
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c +13 -10
@@ -856,24 +856,27 @@ static void ath12k_wifi7_dp_tx_complete_msdu(struct ath12k_pdev_dp *dp_pdev,ath12k_wifi7_dp_tx_update_txcompl (dp_pdev, ts); peer =ath12k_dp_link_peer_find_by_peerid (dp_pdev, ts->peer_id); -if (!peer || !peer->sta) { -ath12k_err (ab, +if (!peer) { +ath12k_dbg (ab,ATH12K_DBG_DATA ,"dp_tx: failed to find the peer with peer_id %d\n" , ts->peer_id);ieee80211_free_txskb (ath12k_pdev_dp_to_hw (dp_pdev), msdu); goto exit; } - status.sta = peer->sta; - status.info = info; - status.skb = msdu; - rate = peer->last_txrate; +if (peer->sta) { + status.sta = peer->sta; + rate = peer->last_txrate; - status_rate.rate_idx = rate; - status_rate.try_count =1 ; + status_rate.rate_idx = rate; + status_rate.try_count =1 ; - status.rates = &status_rate; - status.n_rates =1 ; + status.rates = &status_rate; + status.n_rates =1 ; + } + + status.info = info; + status.skb = msdu;ieee80211_tx_status_ext (ath12k_pdev_dp_to_hw (dp_pdev), &status); exit:
Signature · 1 line
2.53.0
Quoted 36 lines · Vitor Soares
From: Vitor Soares <[email protected]>
In AP mode, once a station is associated, broadcast and multicast frames sent by the AP log:
ath12k_wifi7_pci 0003:01:00.0: dp_tx: failed to find the peer with peer_id 2These frames complete against the AP's own peer. That peer has no station, and since commit
981050b918fc("wifi: ath12k: Fix TX status reporting to mac80211 when offload is enabled") a missing station is treated as a missing peer: the frame is dropped and an error is logged. Before that commit, the TX status of these frames was reported without a station.Report the TX status without a station when the peer has none, and add rate information only when a station is present. Only drop the frame when the peer is not found, and log that case at debug level, as the HTT completion path does.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
Fixes 981050b918fc ("wifi: ath12k: Fix TX status reporting to mac80211 when offload is enabled")Signed-off-by Vitor Soares <[email protected]>---
This conflicts withc752394249f8("wifi: ath12k: store station pointer only indp_peer") in ath-next; the resolution usesath12k_dp_link_peer_get_sta(peer)in place ofpeer->sta.drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-)drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c +0
-0
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c static void ath12k_wifi7_dp_tx_complete_msdu(struct ath12k_pdev_dp *dp_pdev, · line 862
Quoted 9 lines
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c +2
-2@@ -856,24 +856,27 @@ static void ath12k_wifi7_dp_tx_complete_msdu(struct ath12k_pdev_dp *dp_pdev,ath12k_wifi7_dp_tx_update_txcompl (dp_pdev, ts); peer =ath12k_dp_link_peer_find_by_peerid (dp_pdev, ts->peer_id); -if (!peer || !peer->sta) { -ath12k_err (ab, +if (!peer) { +ath12k_dbg (ab,ATH12K_DBG_DATA ,"dp_tx: failed to find the peer with peer_id %d\n" , ts->peer_id);
I'd still keep this in ath12k_err to catch the frames that get TX completion without a valid peer.
Quoted 28 lines
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c +11
-8ieee80211_free_txskb (ath12k_pdev_dp_to_hw (dp_pdev), msdu); goto exit; } - status.sta = peer->sta; - status.info = info; - status.skb = msdu; - rate = peer->last_txrate; +if (peer->sta) { + status.sta = peer->sta; + rate = peer->last_txrate; - status_rate.rate_idx = rate; - status_rate.try_count =1 ; + status_rate.rate_idx = rate; + status_rate.try_count =1 ; - status.rates = &status_rate; - status.n_rates =1 ; + status.rates = &status_rate; + status.n_rates =1 ; + } + + status.info = info; + status.skb = msdu;ieee80211_tx_status_ext (ath12k_pdev_dp_to_hw (dp_pdev), &status); exit:
Signature · 1 line
Ramesh