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/txrx.c | |
parent | 9a874d045473f199e1a184a68be1cf4970db6cbf (diff) |
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/txrx.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/txrx.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index c5e16b2145f8..8790e5effa28 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -411,7 +411,7 @@ static int wil_rx_get_cid_by_skb(struct wil6210_priv *wil, struct sk_buff *skb) ta = hdr->addr2; } - if (max_assoc_sta <= WIL6210_RX_DESC_MAX_CID) + if (wil->max_assoc_sta <= WIL6210_RX_DESC_MAX_CID) return cid; /* assuming no concurrency between AP interfaces and STA interfaces. @@ -426,14 +426,14 @@ static int wil_rx_get_cid_by_skb(struct wil6210_priv *wil, struct sk_buff *skb) * to find the real cid, compare transmitter address with the stored * stations mac address in the driver sta array */ - for (i = cid; i < max_assoc_sta; i += WIL6210_RX_DESC_MAX_CID) { + for (i = cid; i < wil->max_assoc_sta; i += WIL6210_RX_DESC_MAX_CID) { if (wil->sta[i].status != wil_sta_unused && ether_addr_equal(wil->sta[i].addr, ta)) { cid = i; break; } } - if (i >= max_assoc_sta) { + if (i >= wil->max_assoc_sta) { wil_err_ratelimited(wil, "Could not find cid for frame with transmit addr = %pM, iftype = %d, frametype = %d, len = %d\n", ta, vif->wdev.iftype, ftype, skb->len); cid = -ENOENT; @@ -1064,7 +1064,7 @@ static int wil_vring_init_tx(struct wil6210_vif *vif, int id, int size, txdata->enabled = 0; spin_unlock_bh(&txdata->lock); wil_vring_free(wil, vring); - wil->ring2cid_tid[id][0] = max_assoc_sta; + wil->ring2cid_tid[id][0] = wil->max_assoc_sta; wil->ring2cid_tid[id][1] = 0; out: @@ -1149,7 +1149,7 @@ fail: txdata->dot1x_open = false; txdata->enabled = 0; spin_unlock_bh(&txdata->lock); - wil->ring2cid_tid[ring_id][0] = max_assoc_sta; + wil->ring2cid_tid[ring_id][0] = wil->max_assoc_sta; wil->ring2cid_tid[ring_id][1] = 0; return rc; } @@ -1196,7 +1196,7 @@ int wil_vring_init_bcast(struct wil6210_vif *vif, int id, int size) if (rc) goto out; - wil->ring2cid_tid[id][0] = max_assoc_sta; /* CID */ + wil->ring2cid_tid[id][0] = wil->max_assoc_sta; /* CID */ wil->ring2cid_tid[id][1] = 0; /* TID */ cmd.vring_cfg.tx_sw_ring.ring_mem_base = cpu_to_le64(vring->pa); @@ -1244,7 +1244,7 @@ static struct wil_ring *wil_find_tx_ucast(struct wil6210_priv *wil, cid = wil_find_cid(wil, vif->mid, da); - if (cid < 0 || cid >= max_assoc_sta) + if (cid < 0 || cid >= wil->max_assoc_sta) return NULL; /* TODO: fix for multiple TID */ @@ -1296,7 +1296,7 @@ static struct wil_ring *wil_find_tx_ring_sta(struct wil6210_priv *wil, continue; cid = wil->ring2cid_tid[i][0]; - if (cid >= max_assoc_sta) /* skip BCAST */ + if (cid >= wil->max_assoc_sta) /* skip BCAST */ continue; if (!wil->ring_tx_data[i].dot1x_open && @@ -1374,7 +1374,7 @@ static struct wil_ring *wil_find_tx_bcast_2(struct wil6210_priv *wil, continue; cid = wil->ring2cid_tid[i][0]; - if (cid >= max_assoc_sta) /* skip BCAST */ + if (cid >= wil->max_assoc_sta) /* skip BCAST */ continue; if (!wil->ring_tx_data[i].dot1x_open && skb->protocol != cpu_to_be16(ETH_P_PAE)) @@ -1402,7 +1402,7 @@ found: if (!v2->va || txdata2->mid != vif->mid) continue; cid = wil->ring2cid_tid[i][0]; - if (cid >= max_assoc_sta) /* skip BCAST */ + if (cid >= wil->max_assoc_sta) /* skip BCAST */ continue; if (!wil->ring_tx_data[i].dot1x_open && skb->protocol != cpu_to_be16(ETH_P_PAE)) @@ -2258,7 +2258,7 @@ int wil_tx_complete(struct wil6210_vif *vif, int ringid) used_before_complete = wil_ring_used_tx(vring); - if (cid < max_assoc_sta) + if (cid < wil->max_assoc_sta) stats = &wil->sta[cid].stats; while (!wil_ring_is_empty(vring)) { |