diff options
author | Ahmad Masri <amasri@codeaurora.org> | 2019-04-26 18:43:34 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-05-03 08:04:26 +0300 |
commit | ddf7afdde824545680dafba2c91f6b218c45de3a (patch) | |
tree | dd20bf8cfc0f9ee4d2da06531bb5f75d842ba635 /drivers/net/wireless/ath/wil6210/wil6210.h | |
parent | wil6210: enhancements for descriptor and status ring debugfs (diff) | |
download | linux-dev-ddf7afdde824545680dafba2c91f6b218c45de3a.tar.xz linux-dev-ddf7afdde824545680dafba2c91f6b218c45de3a.zip |
wil6210: fix overwriting max_assoc_sta module param
Save the parameter of max_assoc_sta per device.
On fw_ready event calculate the max_assoc_sta and save it per device,
do not overwrite the max_assoc_sta module param.
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 | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index 1f0175d8399c..44984031ce54 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h @@ -461,15 +461,6 @@ static inline void parse_cidxtid(u8 cidxtid, u8 *cid, u8 *tid) *tid = (cidxtid >> 4) & 0xf; } -/** - * wil_cid_valid - check cid is valid - * @cid: CID value - */ -static inline bool wil_cid_valid(u8 cid) -{ - return (cid >= 0 && cid < max_assoc_sta); -} - struct wil6210_mbox_ring { u32 base; u16 entry_size; /* max. size of mbox entry, incl. all headers */ @@ -950,6 +941,8 @@ struct wil6210_priv { struct wil6210_vif *vifs[WIL_MAX_VIFS]; struct mutex vif_mutex; /* protects access to VIF entries */ atomic_t connected_vifs; + u32 max_assoc_sta; /* max sta's supported by the driver and the FW */ + /* profile */ struct cfg80211_chan_def monitor_chandef; u32 monitor_flags; @@ -1147,6 +1140,14 @@ static inline void wil_c(struct wil6210_priv *wil, u32 reg, u32 val) wil_w(wil, reg, wil_r(wil, reg) & ~val); } +/** + * wil_cid_valid - check cid is valid + */ +static inline bool wil_cid_valid(struct wil6210_priv *wil, u8 cid) +{ + return (cid >= 0 && cid < wil->max_assoc_sta); +} + void wil_get_board_file(struct wil6210_priv *wil, char *buf, size_t len); #if defined(CONFIG_DYNAMIC_DEBUG) |