Skip to content

Commit 9f2992f

Browse files
Rakesh Pillaikvalo
authored andcommitted
ath10k: wmi: get wmi init parameter values from hw params
The parameter values for skid limit, number of peers and wds entries values which are sent in wmi init cmd are hardware specific. Add support to obtain skid limit, number of peers and wds entries values from hw params which will have the hw specific values for these parameters. Signed-off-by: Rakesh Pillai <[email protected]> Signed-off-by: Govind Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent 1807da4 commit 9f2992f

File tree

3 files changed

+44
-3
lines changed

3 files changed

+44
-3
lines changed

drivers/net/wireless/ath/ath10k/core.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
7575
.vht160_mcs_rx_highest = 0,
7676
.vht160_mcs_tx_highest = 0,
7777
.n_cipher_suites = 8,
78+
.num_peers = TARGET_TLV_NUM_PEERS,
79+
.ast_skid_limit = 0x10,
80+
.num_wds_entries = 0x20,
7881
},
7982
{
8083
.id = QCA9887_HW_1_0_VERSION,
@@ -99,6 +102,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
99102
.vht160_mcs_rx_highest = 0,
100103
.vht160_mcs_tx_highest = 0,
101104
.n_cipher_suites = 8,
105+
.num_peers = TARGET_TLV_NUM_PEERS,
106+
.ast_skid_limit = 0x10,
107+
.num_wds_entries = 0x20,
102108
},
103109
{
104110
.id = QCA6174_HW_2_1_VERSION,
@@ -122,6 +128,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
122128
.vht160_mcs_rx_highest = 0,
123129
.vht160_mcs_tx_highest = 0,
124130
.n_cipher_suites = 8,
131+
.num_peers = TARGET_TLV_NUM_PEERS,
132+
.ast_skid_limit = 0x10,
133+
.num_wds_entries = 0x20,
125134
},
126135
{
127136
.id = QCA6174_HW_2_1_VERSION,
@@ -145,6 +154,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
145154
.vht160_mcs_rx_highest = 0,
146155
.vht160_mcs_tx_highest = 0,
147156
.n_cipher_suites = 8,
157+
.num_peers = TARGET_TLV_NUM_PEERS,
158+
.ast_skid_limit = 0x10,
159+
.num_wds_entries = 0x20,
148160
},
149161
{
150162
.id = QCA6174_HW_3_0_VERSION,
@@ -168,6 +180,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
168180
.vht160_mcs_rx_highest = 0,
169181
.vht160_mcs_tx_highest = 0,
170182
.n_cipher_suites = 8,
183+
.num_peers = TARGET_TLV_NUM_PEERS,
184+
.ast_skid_limit = 0x10,
185+
.num_wds_entries = 0x20,
171186
},
172187
{
173188
.id = QCA6174_HW_3_2_VERSION,
@@ -194,6 +209,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
194209
.vht160_mcs_rx_highest = 0,
195210
.vht160_mcs_tx_highest = 0,
196211
.n_cipher_suites = 8,
212+
.num_peers = TARGET_TLV_NUM_PEERS,
213+
.ast_skid_limit = 0x10,
214+
.num_wds_entries = 0x20,
197215
},
198216
{
199217
.id = QCA99X0_HW_2_0_DEV_VERSION,
@@ -223,6 +241,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
223241
.vht160_mcs_rx_highest = 0,
224242
.vht160_mcs_tx_highest = 0,
225243
.n_cipher_suites = 11,
244+
.num_peers = TARGET_TLV_NUM_PEERS,
245+
.ast_skid_limit = 0x10,
246+
.num_wds_entries = 0x20,
226247
},
227248
{
228249
.id = QCA9984_HW_1_0_DEV_VERSION,
@@ -257,6 +278,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
257278
.vht160_mcs_rx_highest = 1560,
258279
.vht160_mcs_tx_highest = 1560,
259280
.n_cipher_suites = 11,
281+
.num_peers = TARGET_TLV_NUM_PEERS,
282+
.ast_skid_limit = 0x10,
283+
.num_wds_entries = 0x20,
260284
},
261285
{
262286
.id = QCA9888_HW_2_0_DEV_VERSION,
@@ -290,6 +314,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
290314
.vht160_mcs_rx_highest = 780,
291315
.vht160_mcs_tx_highest = 780,
292316
.n_cipher_suites = 11,
317+
.num_peers = TARGET_TLV_NUM_PEERS,
318+
.ast_skid_limit = 0x10,
319+
.num_wds_entries = 0x20,
293320
},
294321
{
295322
.id = QCA9377_HW_1_0_DEV_VERSION,
@@ -313,6 +340,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
313340
.vht160_mcs_rx_highest = 0,
314341
.vht160_mcs_tx_highest = 0,
315342
.n_cipher_suites = 8,
343+
.num_peers = TARGET_TLV_NUM_PEERS,
344+
.ast_skid_limit = 0x10,
345+
.num_wds_entries = 0x20,
316346
},
317347
{
318348
.id = QCA9377_HW_1_1_DEV_VERSION,
@@ -338,6 +368,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
338368
.vht160_mcs_rx_highest = 0,
339369
.vht160_mcs_tx_highest = 0,
340370
.n_cipher_suites = 8,
371+
.num_peers = TARGET_TLV_NUM_PEERS,
372+
.ast_skid_limit = 0x10,
373+
.num_wds_entries = 0x20,
341374
},
342375
{
343376
.id = QCA4019_HW_1_0_DEV_VERSION,
@@ -368,6 +401,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
368401
.vht160_mcs_rx_highest = 0,
369402
.vht160_mcs_tx_highest = 0,
370403
.n_cipher_suites = 11,
404+
.num_peers = TARGET_TLV_NUM_PEERS,
405+
.ast_skid_limit = 0x10,
406+
.num_wds_entries = 0x20,
371407
},
372408
};
373409

drivers/net/wireless/ath/ath10k/hw.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,10 @@ struct ath10k_hw_params {
553553

554554
/* Number of ciphers supported (i.e First N) in cipher_suites array */
555555
int n_cipher_suites;
556+
557+
u32 num_peers;
558+
u32 ast_skid_limit;
559+
u32 num_wds_entries;
556560
};
557561

558562
struct htt_rx_desc;

drivers/net/wireless/ath/ath10k/wmi-tlv.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,10 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar)
14391439
cmd->num_host_mem_chunks = __cpu_to_le32(ar->wmi.num_mem_chunks);
14401440

14411441
cfg->num_vdevs = __cpu_to_le32(TARGET_TLV_NUM_VDEVS);
1442-
cfg->num_peers = __cpu_to_le32(TARGET_TLV_NUM_PEERS);
1442+
1443+
cfg->num_peers = __cpu_to_le32(ar->hw_params.num_peers);
1444+
cfg->ast_skid_limit = __cpu_to_le32(ar->hw_params.ast_skid_limit);
1445+
cfg->num_wds_entries = __cpu_to_le32(ar->hw_params.num_wds_entries);
14431446

14441447
if (test_bit(WMI_SERVICE_RX_FULL_REORDER, ar->wmi.svc_map)) {
14451448
cfg->num_offload_peers = __cpu_to_le32(TARGET_TLV_NUM_VDEVS);
@@ -1451,7 +1454,6 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar)
14511454

14521455
cfg->num_peer_keys = __cpu_to_le32(2);
14531456
cfg->num_tids = __cpu_to_le32(TARGET_TLV_NUM_TIDS);
1454-
cfg->ast_skid_limit = __cpu_to_le32(0x10);
14551457
cfg->tx_chain_mask = __cpu_to_le32(0x7);
14561458
cfg->rx_chain_mask = __cpu_to_le32(0x7);
14571459
cfg->rx_timeout_pri[0] = __cpu_to_le32(0x64);
@@ -1467,7 +1469,6 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar)
14671469
cfg->num_mcast_table_elems = __cpu_to_le32(0);
14681470
cfg->mcast2ucast_mode = __cpu_to_le32(0);
14691471
cfg->tx_dbg_log_size = __cpu_to_le32(0x400);
1470-
cfg->num_wds_entries = __cpu_to_le32(0x20);
14711472
cfg->dma_burst_size = __cpu_to_le32(0);
14721473
cfg->mac_aggr_delim = __cpu_to_le32(0);
14731474
cfg->rx_skip_defrag_timeout_dup_detection_check = __cpu_to_le32(0);

0 commit comments

Comments
 (0)