0066-wifi-ath11k-Fix-incorrect-update-of-radiotap-fields.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From 2f0c9ac8362da09c80f1cd422ef7fd6fa9b252b9 Mon Sep 17 00:00:00 2001
  2. From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
  3. Date: Mon, 17 Apr 2023 13:35:02 +0300
  4. Subject: [PATCH] wifi: ath11k: Fix incorrect update of radiotap fields
  5. Fix incorrect update of ppdu stats causing incorrect radiotap
  6. fields.
  7. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
  8. Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
  9. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  10. Link: https://lore.kernel.org/r/20230403195738.25367-3-quic_pradeepc@quicinc.com
  11. ---
  12. drivers/net/wireless/ath/ath11k/hal_rx.c | 4 ++--
  13. drivers/net/wireless/ath/ath11k/hal_rx.h | 2 +-
  14. 2 files changed, 3 insertions(+), 3 deletions(-)
  15. --- a/drivers/net/wireless/ath/ath11k/hal_rx.c
  16. +++ b/drivers/net/wireless/ath/ath11k/hal_rx.c
  17. @@ -1029,7 +1029,7 @@ ath11k_hal_rx_parse_mon_status_tlv(struc
  18. info1 = __le32_to_cpu(vht_sig->info1);
  19. ppdu_info->ldpc = FIELD_GET(HAL_RX_VHT_SIG_A_INFO_INFO1_SU_MU_CODING,
  20. - info0);
  21. + info1);
  22. ppdu_info->mcs = FIELD_GET(HAL_RX_VHT_SIG_A_INFO_INFO1_MCS,
  23. info1);
  24. gi_setting = FIELD_GET(HAL_RX_VHT_SIG_A_INFO_INFO1_GI_SETTING,
  25. @@ -1452,7 +1452,7 @@ ath11k_hal_rx_parse_mon_status_tlv(struc
  26. * PHYRX_OTHER_RECEIVE_INFO TLV.
  27. */
  28. ppdu_info->rssi_comb =
  29. - FIELD_GET(HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO1_RSSI_COMB,
  30. + FIELD_GET(HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RSSI_COMB,
  31. __le32_to_cpu(rssi->info0));
  32. if (db2dbm) {
  33. --- a/drivers/net/wireless/ath/ath11k/hal_rx.h
  34. +++ b/drivers/net/wireless/ath/ath11k/hal_rx.h
  35. @@ -385,7 +385,7 @@ struct hal_rx_he_sig_b2_ofdma_info {
  36. __le32 info0;
  37. } __packed;
  38. -#define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO1_RSSI_COMB GENMASK(15, 8)
  39. +#define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RSSI_COMB GENMASK(15, 8)
  40. #define HAL_RX_PHYRX_RSSI_PREAMBLE_PRI20 GENMASK(7, 0)