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>
This commit is contained in:
Ahmad Masri
2019-04-26 18:43:34 +03:00
committed by Kalle Valo
parent 9a874d0454
commit ddf7afdde8
8 changed files with 49 additions and 46 deletions

View File

@@ -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)