Skip to content

Commit 15ce932

Browse files
Fabio Estevamgregkh
authored andcommitted
ath10k: Fix the MTU size on QCA9377 SDIO
commit 09b8cd6 upstream. 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 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 25b1a6d commit 15ce932

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
@@ -89,6 +89,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
8989
.rri_on_ddr = false,
9090
.hw_filter_reset_required = true,
9191
.fw_diag_ce_download = false,
92+
.credit_size_workaround = false,
9293
.tx_stats_over_pktlog = true,
9394
},
9495
{
@@ -123,6 +124,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
123124
.rri_on_ddr = false,
124125
.hw_filter_reset_required = true,
125126
.fw_diag_ce_download = false,
127+
.credit_size_workaround = false,
126128
.tx_stats_over_pktlog = true,
127129
},
128130
{
@@ -158,6 +160,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
158160
.rri_on_ddr = false,
159161
.hw_filter_reset_required = true,
160162
.fw_diag_ce_download = false,
163+
.credit_size_workaround = false,
161164
.tx_stats_over_pktlog = false,
162165
},
163166
{
@@ -187,6 +190,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
187190
.num_wds_entries = 0x20,
188191
.uart_pin_workaround = true,
189192
.tx_stats_over_pktlog = false,
193+
.credit_size_workaround = false,
190194
.bmi_large_size_download = true,
191195
.supports_peer_stats_info = true,
192196
},
@@ -222,6 +226,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
222226
.rri_on_ddr = false,
223227
.hw_filter_reset_required = true,
224228
.fw_diag_ce_download = false,
229+
.credit_size_workaround = false,
225230
.tx_stats_over_pktlog = false,
226231
},
227232
{
@@ -256,6 +261,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
256261
.rri_on_ddr = false,
257262
.hw_filter_reset_required = true,
258263
.fw_diag_ce_download = false,
264+
.credit_size_workaround = false,
259265
.tx_stats_over_pktlog = false,
260266
},
261267
{
@@ -290,6 +296,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
290296
.rri_on_ddr = false,
291297
.hw_filter_reset_required = true,
292298
.fw_diag_ce_download = false,
299+
.credit_size_workaround = false,
293300
.tx_stats_over_pktlog = false,
294301
},
295302
{
@@ -327,6 +334,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
327334
.rri_on_ddr = false,
328335
.hw_filter_reset_required = true,
329336
.fw_diag_ce_download = true,
337+
.credit_size_workaround = false,
330338
.tx_stats_over_pktlog = false,
331339
.supports_peer_stats_info = true,
332340
},
@@ -368,6 +376,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
368376
.rri_on_ddr = false,
369377
.hw_filter_reset_required = true,
370378
.fw_diag_ce_download = false,
379+
.credit_size_workaround = false,
371380
.tx_stats_over_pktlog = false,
372381
},
373382
{
@@ -415,6 +424,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
415424
.rri_on_ddr = false,
416425
.hw_filter_reset_required = true,
417426
.fw_diag_ce_download = false,
427+
.credit_size_workaround = false,
418428
.tx_stats_over_pktlog = false,
419429
},
420430
{
@@ -459,6 +469,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
459469
.rri_on_ddr = false,
460470
.hw_filter_reset_required = true,
461471
.fw_diag_ce_download = false,
472+
.credit_size_workaround = false,
462473
.tx_stats_over_pktlog = false,
463474
},
464475
{
@@ -493,6 +504,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
493504
.rri_on_ddr = false,
494505
.hw_filter_reset_required = true,
495506
.fw_diag_ce_download = false,
507+
.credit_size_workaround = false,
496508
.tx_stats_over_pktlog = false,
497509
},
498510
{
@@ -529,6 +541,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
529541
.rri_on_ddr = false,
530542
.hw_filter_reset_required = true,
531543
.fw_diag_ce_download = true,
544+
.credit_size_workaround = false,
532545
.tx_stats_over_pktlog = false,
533546
},
534547
{
@@ -557,6 +570,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
557570
.ast_skid_limit = 0x10,
558571
.num_wds_entries = 0x20,
559572
.uart_pin_workaround = true,
573+
.credit_size_workaround = true,
560574
},
561575
{
562576
.id = QCA4019_HW_1_0_DEV_VERSION,
@@ -597,6 +611,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
597611
.rri_on_ddr = false,
598612
.hw_filter_reset_required = true,
599613
.fw_diag_ce_download = false,
614+
.credit_size_workaround = false,
600615
.tx_stats_over_pktlog = false,
601616
},
602617
{
@@ -624,6 +639,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
624639
.rri_on_ddr = true,
625640
.hw_filter_reset_required = false,
626641
.fw_diag_ce_download = false,
642+
.credit_size_workaround = false,
627643
.tx_stats_over_pktlog = false,
628644
},
629645
};
@@ -697,6 +713,7 @@ static void ath10k_send_suspend_complete(struct ath10k *ar)
697713

698714
static int ath10k_init_sdio(struct ath10k *ar, enum ath10k_firmware_mode mode)
699715
{
716+
bool mtu_workaround = ar->hw_params.credit_size_workaround;
700717
int ret;
701718
u32 param = 0;
702719

@@ -714,7 +731,7 @@ static int ath10k_init_sdio(struct ath10k *ar, enum ath10k_firmware_mode mode)
714731

715732
param |= HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_SET;
716733

717-
if (mode == ATH10K_FIRMWARE_MODE_NORMAL)
734+
if (mode == ATH10K_FIRMWARE_MODE_NORMAL && !mtu_workaround)
718735
param |= HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE;
719736
else
720737
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)