Commit b9269a07 authored by Venkateswara Naralasetty's avatar Venkateswara Naralasetty Committed by Kalle Valo

ath11k: Skip update peer stats for management packets

Currently HTT_PPDU_STATS_TAG_USR_COMPLTN_ACK_BA_STATUS tag of PPDU stats
doesn't have valid success bytes info of management frames.
So skip update peer stats for management packets.
Signed-off-by: default avatarVenkateswara Naralasetty <vnaralas@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent a9e945ea
......@@ -1176,7 +1176,9 @@ struct htt_ppdu_stats_usr_cmpltn_cmn {
#define HTT_PPDU_STATS_ACK_BA_INFO_NUM_MPDU_M GENMASK(8, 0)
#define HTT_PPDU_STATS_ACK_BA_INFO_NUM_MSDU_M GENMASK(24, 9)
#define HTT_PPDU_STATS_ACK_BA_INFO_TID_NUM GENMASK(3, 0)
#define HTT_PPDU_STATS_ACK_BA_INFO_TID_NUM GENMASK(31, 25)
#define HTT_PPDU_STATS_NON_QOS_TID 16
struct htt_ppdu_stats_usr_cmpltn_ack_ba_status {
u32 ppdu_id;
......
......@@ -1034,6 +1034,7 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar,
u32 succ_bytes = 0;
u16 rate = 0, succ_pkts = 0;
u32 tx_duration = 0;
u8 tid = HTT_PPDU_STATS_NON_QOS_TID;
bool is_ampdu = false;
if (!usr_stats)
......@@ -1051,6 +1052,8 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar,
succ_bytes = usr_stats->ack_ba.success_bytes;
succ_pkts = FIELD_GET(HTT_PPDU_STATS_ACK_BA_INFO_NUM_MSDU_M,
usr_stats->ack_ba.info);
tid = FIELD_GET(HTT_PPDU_STATS_ACK_BA_INFO_TID_NUM,
usr_stats->ack_ba.info);
}
if (common->fes_duration_us)
......@@ -1156,8 +1159,11 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar,
ieee80211_tx_rate_update(ar->hw, sta, &arsta->tx_info);
}
/* PPDU stats reported for mgmt packet doesn't have valid tx bytes.
* So skip peer stats update for mgmt packets.
*/
if (tid < HTT_PPDU_STATS_NON_QOS_TID) {
memset(peer_stats, 0, sizeof(*peer_stats));
peer_stats->succ_pkts = succ_pkts;
peer_stats->succ_bytes = succ_bytes;
peer_stats->is_ampdu = is_ampdu;
......@@ -1169,6 +1175,7 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar,
if (ath11k_debug_is_extd_tx_stats_enabled(ar))
ath11k_accumulate_per_peer_tx_stats(arsta,
peer_stats, rate_idx);
}
spin_unlock_bh(&ab->base_lock);
rcu_read_unlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment