ath10k: Incorrect MTU size for SDIO

Fabio Estevam festevam at gmail.com
Tue Sep 14 17:56:59 PDT 2021


On Tue, Sep 14, 2021 at 9:04 PM Fabio Estevam <festevam at gmail.com> wrote:
>
> On Thu, Aug 19, 2021 at 2:29 PM Fabio Estevam <festevam at gmail.com> wrote:
> >
> > Hi,
> >
> > On a i.MX7-based board with QCA9377 chip, I received the following
> > report from a user running kernel 5.10.48:
> >
> > "Doing scp or just pipe through files with >10 lines I get stalls and
> > error logs. The ath10k_sdio errors look like this:
> > [  196.822363] ath10k_sdio mmc2:0001:1: failed to transmit packet, dropping: -12
> > [  196.830109] ath10k_sdio mmc2:0001:1: failed to submit frame: -12
> > [  196.836279] ath10k_sdio mmc2:0001:1: failed to push frame: -12
> > [  196.925452] ath10k_sdio mmc2:0001:1: failed to transmit packet, dropping: -12
> > [  196.933090] ath10k_sdio mmc2:0001:1: failed to submit frame: -12
> > [  196.939334] ath10k_sdio mmc2:0001:1: failed to push frame: -12
> >
> > I am able to reliably reproduce the issue by sending a lot of data
> > from the i.MX7 board to a host connected via the AP:
> > printf '=%.0s' {1..24000} | nc 192.168.0.2 1234
> >
> > 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."
>
> I am able to reproduce this locally on an imx6dl-pico-pi board with a
> QCA9377 SDIO chip
> running kernel 5.15-rc1.
>
> [   10.383463] ath10k_sdio mmc1:0001:1: qca9377 hw1.1 sdio target
> 0x05020001 chip_id 0x00000000 sub 0000:0000
> [   10.393717] ath10k_sdio mmc1:0001:1: kconfig debug 0 debugfs 0
> tracing 0 dfs 0 testmode 0
> [   10.405764] ath10k_sdio mmc1:0001:1: firmware ver
> WLAN.TF.1.1.1-00061-QCATFSWPZ-1 api 5 features ignore-otp crc32
> 7746e551
> [   10.640195] ath10k_sdio mmc1:0001:1: failed to fetch board data for
> bus=sdio,vendor=0271,device=0701,subsystem-vendor=0000,subsystem-device=0000
> from ath10k/QCA9377/hw1.0/board-2.bin
> [   10.664515] ath10k_sdio mmc1:0001:1: board_file api 1 bmi_id N/A
> crc32 544289f7
>
> The QCA9377 operates in STA mode.
>
> Simply doing "ssh user at 192.168.0.1" 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
>
> and it is not possible to connect via ssh to the other machine.
>
> Changing the MTU size to 1486:
>
> # ifconfig wlan0 mtu 1486
>
> and trying the ssh connection again, it is possible to connect to the
> other machine.
>
> Any logs I should capture to help to analyze this problem?

If I clear HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE, I don't see the error:

diff --git a/drivers/net/wireless/ath/ath10k/core.c
b/drivers/net/wireless/ath/ath10k/core.c
index 2f9be182fbfb..728a18b3b462 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -730,11 +730,7 @@ static int ath10k_init_sdio(struct ath10k *ar,
enum ath10k_firmware_mode mode)
  return ret;

  param |= HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_SET;
-
- if (mode == ATH10K_FIRMWARE_MODE_NORMAL)
- param |= HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE;
- else
- param &= ~HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE;
+ param &= ~HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE;

  if (mode == ATH10K_FIRMWARE_MODE_UTF)
  param &= ~HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_SET;

Any comments, please?

Thanks



More information about the ath10k mailing list