diff options
author | Ahmad Masri <amasri@codeaurora.org> | 2019-02-28 10:34:52 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-04-03 14:34:47 +0200 |
commit | e4a29bdd8f82627d88644971235dc12b70c4150b (patch) | |
tree | 5b3389bcbfd5e47935c975083efe83a94abd30ee /drivers/net/wireless/ath/wil6210/wil6210.h | |
parent | wil6210: update WIL_MCS_MAX to 15 (diff) | |
download | linux-e4a29bdd8f82627d88644971235dc12b70c4150b.tar.xz linux-e4a29bdd8f82627d88644971235dc12b70c4150b.zip |
wil6210: check mid is valid
Check that the mid is valid and that it does not exceed the memory
size allocated to vifs array.
Signed-off-by: Ahmad Masri <amasri@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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index 1b81f3fd59a0..de724666857f 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h @@ -1061,6 +1061,7 @@ struct wil6210_priv { #define vif_to_wil(v) (v->wil) #define vif_to_ndev(v) (v->ndev) #define vif_to_wdev(v) (&v->wdev) +#define GET_MAX_VIFS(wil) min_t(int, (wil)->max_vifs, WIL_MAX_VIFS) static inline struct wil6210_vif *wdev_to_vif(struct wil6210_priv *wil, struct wireless_dev *wdev) |