]> git.baikalelectronics.ru Git - kernel.git/commit
ath11k: add spectral/CFR buffer validation support
authorVenkateswara Naralasetty <quic_vnaralas@quicinc.com>
Wed, 8 Dec 2021 08:44:00 +0000 (10:44 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 9 Dec 2021 08:14:20 +0000 (10:14 +0200)
commitbff8682656e7e5c7adf04e0a3e767abe79d219f6
tree08f29a14bd2acbfe23a48a87175a90951df55de5
parent133a3c95fba7390cb42f1fa21cbf3d26c56ba96d
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
drivers/net/wireless/ath/ath11k/dbring.c
drivers/net/wireless/ath/ath11k/dbring.h
drivers/net/wireless/ath/ath11k/spectral.c