Skip to content

Commit 09b8cd6

Browse files
Fabio Estevamkvalo
authored andcommitted
ath10k: Fix the MTU size on QCA9377 SDIO
On an imx6dl-pico-pi board with a QCA9377 SDIO chip, simply trying to connect via ssh to another machine causes: [ 55.824159] ath10k_sdio mmc1:0001:1: failed to transmit packet, dropping: -12 [ 55.832169] ath10k_sdio mmc1:0001:1: failed to submit frame: -12 [ 55.838529] ath10k_sdio mmc1:0001:1: failed to push frame: -12 [ 55.905863] ath10k_sdio mmc1:0001:1: failed to transmit packet, dropping: -12 [ 55.913650] ath10k_sdio mmc1:0001:1: failed to submit frame: -12 [ 55.919887] ath10k_sdio mmc1:0001:1: failed to push frame: -12 , leading to an ssh connection failure. One user inspected the size of frames on Wireshark and reported the followig: "I was able to narrow the issue down to the mtu. If I set the mtu for the wlan0 device to 1486 instead of 1500, the issue does not happen. The size of frames that I see on Wireshark is exactly 1500 after setting it to 1486." Clearing the HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE avoids the problem and the ssh command works successfully after that. Introduce a 'credit_size_workaround' field to ath10k_hw_params for the QCA9377 SDIO, so that the HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE is not set in this case. Tested with QCA9377 SDIO with firmware WLAN.TF.1.1.1-00061-QCATFSWPZ-1. Fixes: 2f918ea ("ath10k: enable alt data of TX path for sdio") Signed-off-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20211124131047.713756-1-festevam@denx.de
1 parent a93789a commit 09b8cd6

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
9090
.rri_on_ddr = false,
9191
.hw_filter_reset_required = true,
9292
.fw_diag_ce_download = false,
93+
.credit_size_workaround = false,
9394
.tx_stats_over_pktlog = true,
9495
.dynamic_sar_support = false,
9596
},
@@ -125,6 +126,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
125126
.rri_on_ddr = false,
126127
.hw_filter_reset_required = true,
127128
.fw_diag_ce_download = false,
129+
.credit_size_workaround = false,
128130
.tx_stats_over_pktlog = true,
129131
.dynamic_sar_support = false,
130132
},
@@ -161,6 +163,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
161163
.rri_on_ddr = false,
162164
.hw_filter_reset_required = true,
163165
.fw_diag_ce_download = false,
166+
.credit_size_workaround = false,
164167
.tx_stats_over_pktlog = false,
165168
.dynamic_sar_support = false,
166169
},
@@ -191,6 +194,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
191194
.num_wds_entries = 0x20,
192195
.uart_pin_workaround = true,
193196
.tx_stats_over_pktlog = false,
197+
.credit_size_workaround = false,
194198
.bmi_large_size_download = true,
195199
.supports_peer_stats_info = true,
196200
.dynamic_sar_support = true,
@@ -227,6 +231,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
227231
.rri_on_ddr = false,
228232
.hw_filter_reset_required = true,
229233
.fw_diag_ce_download = false,
234+
.credit_size_workaround = false,
230235
.tx_stats_over_pktlog = false,
231236
.dynamic_sar_support = false,
232237
},
@@ -262,6 +267,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
262267
.rri_on_ddr = false,
263268
.hw_filter_reset_required = true,
264269
.fw_diag_ce_download = false,
270+
.credit_size_workaround = false,
265271
.tx_stats_over_pktlog = false,
266272
.dynamic_sar_support = false,
267273
},
@@ -297,6 +303,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
297303
.rri_on_ddr = false,
298304
.hw_filter_reset_required = true,
299305
.fw_diag_ce_download = false,
306+
.credit_size_workaround = false,
300307
.tx_stats_over_pktlog = false,
301308
.dynamic_sar_support = false,
302309
},
@@ -335,6 +342,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
335342
.rri_on_ddr = false,
336343
.hw_filter_reset_required = true,
337344
.fw_diag_ce_download = true,
345+
.credit_size_workaround = false,
338346
.tx_stats_over_pktlog = false,
339347
.supports_peer_stats_info = true,
340348
.dynamic_sar_support = true,
@@ -377,6 +385,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
377385
.rri_on_ddr = false,
378386
.hw_filter_reset_required = true,
379387
.fw_diag_ce_download = false,
388+
.credit_size_workaround = false,
380389
.tx_stats_over_pktlog = false,
381390
.dynamic_sar_support = false,
382391
},
@@ -425,6 +434,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
425434
.rri_on_ddr = false,
426435
.hw_filter_reset_required = true,
427436
.fw_diag_ce_download = false,
437+
.credit_size_workaround = false,
428438
.tx_stats_over_pktlog = false,
429439
.dynamic_sar_support = false,
430440
},
@@ -470,6 +480,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
470480
.rri_on_ddr = false,
471481
.hw_filter_reset_required = true,
472482
.fw_diag_ce_download = false,
483+
.credit_size_workaround = false,
473484
.tx_stats_over_pktlog = false,
474485
.dynamic_sar_support = false,
475486
},
@@ -505,6 +516,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
505516
.rri_on_ddr = false,
506517
.hw_filter_reset_required = true,
507518
.fw_diag_ce_download = false,
519+
.credit_size_workaround = false,
508520
.tx_stats_over_pktlog = false,
509521
.dynamic_sar_support = false,
510522
},
@@ -542,6 +554,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
542554
.rri_on_ddr = false,
543555
.hw_filter_reset_required = true,
544556
.fw_diag_ce_download = true,
557+
.credit_size_workaround = false,
545558
.tx_stats_over_pktlog = false,
546559
.dynamic_sar_support = false,
547560
},
@@ -571,6 +584,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
571584
.ast_skid_limit = 0x10,
572585
.num_wds_entries = 0x20,
573586
.uart_pin_workaround = true,
587+
.credit_size_workaround = true,
574588
.dynamic_sar_support = false,
575589
},
576590
{
@@ -612,6 +626,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
612626
.rri_on_ddr = false,
613627
.hw_filter_reset_required = true,
614628
.fw_diag_ce_download = false,
629+
.credit_size_workaround = false,
615630
.tx_stats_over_pktlog = false,
616631
.dynamic_sar_support = false,
617632
},
@@ -640,6 +655,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
640655
.rri_on_ddr = true,
641656
.hw_filter_reset_required = false,
642657
.fw_diag_ce_download = false,
658+
.credit_size_workaround = false,
643659
.tx_stats_over_pktlog = false,
644660
.dynamic_sar_support = true,
645661
},
@@ -715,6 +731,7 @@ static void ath10k_send_suspend_complete(struct ath10k *ar)
715731

716732
static int ath10k_init_sdio(struct ath10k *ar, enum ath10k_firmware_mode mode)
717733
{
734+
bool mtu_workaround = ar->hw_params.credit_size_workaround;
718735
int ret;
719736
u32 param = 0;
720737

@@ -732,7 +749,7 @@ static int ath10k_init_sdio(struct ath10k *ar, enum ath10k_firmware_mode mode)
732749

733750
param |= HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_SET;
734751

735-
if (mode == ATH10K_FIRMWARE_MODE_NORMAL)
752+
if (mode == ATH10K_FIRMWARE_MODE_NORMAL && !mtu_workaround)
736753
param |= HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE;
737754
else
738755
param &= ~HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,9 @@ struct ath10k_hw_params {
618618
*/
619619
bool uart_pin_workaround;
620620

621+
/* Workaround for the credit size calculation */
622+
bool credit_size_workaround;
623+
621624
/* tx stats support over pktlog */
622625
bool tx_stats_over_pktlog;
623626

0 commit comments

Comments
 (0)