diff options
author | Alexei Avshalom Lazar <ailizaro@codeaurora.org> | 2019-12-18 20:10:13 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-12-19 18:16:07 +0200 |
commit | 5c5d88a29dd4fe8154c8d262163a96d0add70917 (patch) | |
tree | 9629731ff2642779d13352b45a3fb12c6615c60d /drivers/net/wireless/ath/wil6210/wil6210.h | |
parent | c715b38473c842db34c408ede2d5727d2b50cf1c (diff) | |
download | linux-5c5d88a29dd4fe8154c8d262163a96d0add70917.tar.gz linux-5c5d88a29dd4fe8154c8d262163a96d0add70917.tar.bz2 linux-5c5d88a29dd4fe8154c8d262163a96d0add70917.zip |
wil6210: add verification for cid upper bound
max_assoc_sta can receive values (from the user or from the FW)
that are higher than WIL6210_MAX_CID.
Verify that cid doesn't exceed the upper bound of WIL6210_MAX_CID.
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/wil6210.h')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wil6210.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index 97626bfd4dac..bf00f0693a3d 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h @@ -1148,7 +1148,7 @@ static inline void wil_c(struct wil6210_priv *wil, u32 reg, u32 val) */ static inline bool wil_cid_valid(struct wil6210_priv *wil, int cid) { - return (cid >= 0 && cid < wil->max_assoc_sta); + return (cid >= 0 && cid < wil->max_assoc_sta && cid < WIL6210_MAX_CID); } void wil_get_board_file(struct wil6210_priv *wil, char *buf, size_t len); |