summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath11k/hal_rx.c
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2020-02-04 16:11:33 +0100
committerKalle Valo <kvalo@codeaurora.org>2020-02-11 20:28:33 +0200
commit6a0c370259c76c439d75114def0a40ac03bcd829 (patch)
tree3e4ebba72249861c3e4cfffdf4a86ee208cc3b4b /drivers/net/wireless/ath/ath11k/hal_rx.c
parentbe43ce646b93899b23eaac55aea695397db2f35f (diff)
ath11k: add HE rate accounting to driver
Parse and store the out-of-band rates reported by the FW. Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/hal_rx.c')
-rw-r--r--drivers/net/wireless/ath/ath11k/hal_rx.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.c b/drivers/net/wireless/ath/ath11k/hal_rx.c
index 9e0f8064e427..58c57f91b672 100644
--- a/drivers/net/wireless/ath/ath11k/hal_rx.c
+++ b/drivers/net/wireless/ath/ath11k/hal_rx.c
@@ -1001,6 +1001,7 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab,
}
ppdu_info->nss = nsts + 1;
+ ppdu_info->dcm = dcm;
ppdu_info->reception_type = HAL_RX_RECEPTION_TYPE_SU;
break;
}
@@ -1038,9 +1039,15 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab,
break;
}
case HAL_PHYRX_HE_SIG_B1_MU: {
- /* TODO: Check if resource unit(RU) allocation stats
- * are required
- */
+ struct hal_rx_he_sig_b1_mu_info *he_sig_b1_mu =
+ (struct hal_rx_he_sig_b1_mu_info *)tlv_data;
+ u16 ru_tones;
+
+ info0 = __le32_to_cpu(he_sig_b1_mu->info0);
+
+ ru_tones = FIELD_GET(HAL_RX_HE_SIG_B1_MU_INFO_INFO0_RU_ALLOCATION,
+ info0);
+ ppdu_info->ru_alloc = ath11k_he_ru_tones_to_nl80211_he_ru_alloc(ru_tones);
ppdu_info->reception_type = HAL_RX_RECEPTION_TYPE_MU_MIMO;
break;
}