mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 22:08:33 -04:00
wifi: ath12k: fix struct hal_rx_phyrx_rssi_legacy_info
Current struct hal_rx_phyrx_rssi_legacy_info in hal_rx.h is not matched with hardware descriptor definition. This hardware descriptor definition is determined by hardware. Host shall follow it. So update struct hal_rx_phyrx_rssi_legacy_info and related code. Both QCN9274 and WCN7850 need this modification. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang <quic_kangyang@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241022110831.974-5-quic_kangyang@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
This commit is contained in:
@@ -731,33 +731,20 @@ ath12k_dp_mon_rx_parse_status_tlv(struct ath12k_base *ab,
|
||||
case HAL_PHYRX_RSSI_LEGACY: {
|
||||
struct hal_rx_phyrx_rssi_legacy_info *rssi =
|
||||
(struct hal_rx_phyrx_rssi_legacy_info *)tlv_data;
|
||||
u32 reception_type = 0;
|
||||
u32 rssi_legacy_info = __le32_to_cpu(rssi->rsvd[0]);
|
||||
|
||||
info[0] = __le32_to_cpu(rssi->info0);
|
||||
info[1] = __le32_to_cpu(rssi->info1);
|
||||
|
||||
/* TODO: Please note that the combined rssi will not be accurate
|
||||
* in MU case. Rssi in MU needs to be retrieved from
|
||||
* PHYRX_OTHER_RECEIVE_INFO TLV.
|
||||
*/
|
||||
ppdu_info->rssi_comb =
|
||||
u32_get_bits(info[0],
|
||||
HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RSSI_COMB);
|
||||
reception_type =
|
||||
u32_get_bits(rssi_legacy_info,
|
||||
HAL_RX_PHYRX_RSSI_LEGACY_INFO_RSVD1_RECEPTION);
|
||||
u32_get_bits(info[1],
|
||||
HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO1_RSSI_COMB);
|
||||
|
||||
switch (reception_type) {
|
||||
case HAL_RECEPTION_TYPE_ULOFMDA:
|
||||
ppdu_info->reception_type = HAL_RX_RECEPTION_TYPE_MU_OFDMA;
|
||||
break;
|
||||
case HAL_RECEPTION_TYPE_ULMIMO:
|
||||
ppdu_info->reception_type = HAL_RX_RECEPTION_TYPE_MU_MIMO;
|
||||
break;
|
||||
default:
|
||||
ppdu_info->reception_type = HAL_RX_RECEPTION_TYPE_SU;
|
||||
break;
|
||||
}
|
||||
ppdu_info->bw = u32_get_bits(info[0],
|
||||
HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RX_BW);
|
||||
break;
|
||||
}
|
||||
case HAL_RXPCU_PPDU_END_INFO: {
|
||||
|
||||
@@ -441,12 +441,15 @@ enum hal_rx_ul_reception_type {
|
||||
HAL_RECEPTION_TYPE_FRAMELESS
|
||||
};
|
||||
|
||||
#define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RSSI_COMB GENMASK(15, 8)
|
||||
#define HAL_RX_PHYRX_RSSI_LEGACY_INFO_RSVD1_RECEPTION GENMASK(3, 0)
|
||||
#define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RECEPTION GENMASK(3, 0)
|
||||
#define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RX_BW GENMASK(7, 5)
|
||||
#define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO1_RSSI_COMB GENMASK(15, 8)
|
||||
|
||||
struct hal_rx_phyrx_rssi_legacy_info {
|
||||
__le32 rsvd[35];
|
||||
__le32 info0;
|
||||
__le32 rsvd0[39];
|
||||
__le32 info1;
|
||||
__le32 rsvd1;
|
||||
} __packed;
|
||||
|
||||
#define HAL_RX_MPDU_START_INFO0_PPDU_ID GENMASK(31, 16)
|
||||
|
||||
Reference in New Issue
Block a user