diff options
author | Kang Yang <quic_kangyang@quicinc.com> | 2024-02-05 19:03:27 +0200 |
---|---|---|
committer | Kalle Valo <quic_kvalo@quicinc.com> | 2024-02-07 17:06:58 +0200 |
commit | 019b58dcb6ed267e17b7efd03ec8575c1b67d942 (patch) | |
tree | 70ed4d1bb8868812fd032dc92143df0f3bd2540e /net/unix/af_unix.c | |
parent | 4f684533afe2317b5338209cbad4551bae7949a2 (diff) | |
download | linux-019b58dcb6ed267e17b7efd03ec8575c1b67d942.tar.gz linux-019b58dcb6ed267e17b7efd03ec8575c1b67d942.tar.bz2 linux-019b58dcb6ed267e17b7efd03ec8575c1b67d942.zip |
wifi: ath12k: fix incorrect logic of calculating vdev_stats_id
During calculate vdev_stats_id, will compare vdev_stats_id with
ATH12K_INVAL_VDEV_STATS_ID by '<='. If vdev_stats_id is relatively
small, then assign ATH12K_INVAL_VDEV_STATS_ID to vdev_stats_id.
This logic is incorrect. Firstly, should use '>=' instead of '<=' to
check if this u8 variable exceeds the max valid range.
Secondly, should use the maximum value as comparison value.
Correct comparison symbols and use the maximum value
ATH12K_MAX_VDEV_STATS_ID for comparison.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240130040303.370590-3-quic_kangyang@quicinc.com
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions