diff options
author | Venkateswara Naralasetty <quic_vnaralas@quicinc.com> | 2021-12-08 10:44:00 +0200 |
---|---|---|
committer | Kalle Valo <quic_kvalo@quicinc.com> | 2021-12-09 10:14:20 +0200 |
commit | d3d358efc553de4f9d803c889a2e91523ea90f19 (patch) | |
tree | 08f29a14bd2acbfe23a48a87175a90951df55de5 /drivers/net/wireless/ath/ath11k/dbring.h | |
parent | 7e2ea2e947046834a450295dfd328adb70a9f864 (diff) |
ath11k: add spectral/CFR buffer validation support
Currently there is no validation on the spectral/CFR report
over the db ring buffers from the hardware. Improper/incomplete
DMA by the target can result in invalid data received by host.
Due to this we may populate incorrect data to user space.
This buffer validation support fix this issues by filling some
magic value in the buffer during buffer replenish and check for
the magic value in the buffer received by the target. If host
detect magic value in the received buffer it will drop the buffer.
Tested-on: IPQ8074 WLAN.HK.2.4.0.1-01467-QCAHKSWPL_SILICONZ-1
Signed-off-by: Venkateswara Naralasetty <quic_vnaralas@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/1637312901-10279-2-git-send-email-quic_vnaralas@quicinc.com
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/dbring.h')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/dbring.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath11k/dbring.h b/drivers/net/wireless/ath/ath11k/dbring.h index 78a985faa0a1..ef906c687b8c 100644 --- a/drivers/net/wireless/ath/ath11k/dbring.h +++ b/drivers/net/wireless/ath/ath11k/dbring.h @@ -76,4 +76,6 @@ int ath11k_dbring_get_cap(struct ath11k_base *ab, struct ath11k_dbring_cap *db_cap); void ath11k_dbring_srng_cleanup(struct ath11k *ar, struct ath11k_dbring *ring); void ath11k_dbring_buf_cleanup(struct ath11k *ar, struct ath11k_dbring *ring); +int ath11k_dbring_validate_buffer(struct ath11k *ar, void *data, u32 size); + #endif /* ATH11K_DBRING_H */ |