On 18/04/2023 14:53, Artem Makhutov wrote: > Hello, > > Am So., 16. Apr. 2023 um 19:47 Uhr schrieb Bitterblue Smith > <rtl8821cerfe2@xxxxxxxxx>: >> >> On 16/04/2023 16:45, Artem Makhutov wrote: >>> Hello, >>> >>> I am not sure if it is ok to write to you directly but I could not find a place where to open a ticket about the rtl8xxxu driver. >>> >>> I am having issues with the RTL8188EU (LogiLink WL0151A) where I get truncated packets when sending large packets. It's easy to reproduce with ping: >>> [...] >> Hi! >> >> Adding linux-wireless because that's the place to report bugs. >> Also bugzilla.kernel.org, but that's more dead. >> >> Unfortunately my TP-Link TL-WN725N is fine even with bigger packets: >> [...] > > Yes, I also have wifi networks where I have no issues at all. It seems > to be only related to some wifi routers. > With a Huawei AX3 router I have no issues. But with an Asus RT-AX53U i > am getting corrupted data. > >> What version of the kernel/driver are you running? On what kind >> of computer? > > It is an embedded device with a STM32MP157C processor. It runs an > 5.15.67 kernel from ST (https://github.com/STMicroelectronics/linux/) > I have backported the rtl8xxxu driver from > https://github.com/torvalds/linux/ to that kernel by cherry-pick all > the related commits. > >> Did you use any module parameters? > > No, I have not tried any parameters yet. > >> Do you know if the other computer is receiving correct packets >> from your RTL8188EU? > > I have no ssh access to the router (it runs the stock firmware from > Asus), but I can try to do some tests on another PC later. > But I assume that it receives correct data as I can see a reply in tcpdump. > >> What's the biggest packet size which still works correctly? > > I think the magic number for ping is 1429. With ping -s 1428 I have no issues. > >> Did you test any other driver, like this one: >> https://github.com/lwfinger/rtl8188eu/tree/v5.2.2.4 > > Yes, I have tried this one. Here I had no issue with packet loss, but > I was losing the wifi connection from time to time and the > auto-reconnect also did not work. > >> or this one: >> https://github.com/aircrack-ng/rtl8188eus > > I have not tried this one yet. > > But I have also tried https://github.com/ivanovborislav/rtl8188eu > > Here after some hours or days the wifi completely hangs up, loses the > connection and does not see any wifi networks any more at all. > >> If the other computer is receiving correct packets, try this untested >> patch to see what rtl8xxxu is actually receiving: >> [...] > > I have applied the patch. > > For a working ping with a packet size of 1428 I am getting: > urb_len 1562 > pkt_cnt 136 pkt_len 1506 drvinfo_sz 32 desc_shift 0 > [...] > > For a broken ping with a packet size of 1430 I am getting the data below. > The strange thing is that the urb_len 1560 for a 1430 bytes ping is > smaller than a urb_len 1562 for a 1428 bytes large ping... > > urb_len 1560 > pkt_cnt 136 pkt_len 1504 drvinfo_sz 32 desc_shift 0 Can you also capture the wifi traffic using some device which is not handled by rtl8xxxu? With airodump-ng, wireshark, etc. Then you can compare the pkt_len with what the capture device sees. It could also be useful to see what the v5.2.2.4 driver receives, both with 1428 and with 1430: diff --git a/rtl8188e_rxdesc.c b/rtl8188e_rxdesc.c index e6b0f77..2c34a71 100644 --- a/rtl8188e_rxdesc.c +++ b/rtl8188e_rxdesc.c @@ -38,6 +38,8 @@ void rtl8188e_query_rx_desc_status( pattrib->pkt_len = cpu_to_le16(le32_to_cpu(report.rxdw0) & 0x00003fff); /* (u16)prxreport->pktlen; */ pattrib->drvinfo_sz = (u8)((le32_to_cpu(report.rxdw0) >> 16) & 0xf) * 8;/* (u8)(prxreport->drvinfosize << 3); */ + pr_warn("%s: pkt_len: %d\n", __func__, le16_to_cpu(pattrib->pkt_len)); + pattrib->physt = (u8)((le32_to_cpu(report.rxdw0) >> 26) & 0x1); /* (u8)prxreport->physt; */ pattrib->bdecrypted = (le32_to_cpu(report.rxdw0) & BIT(27)) ? 0 : 1; /* (u8)(prxreport->swdec ? 0 : 1); */ Also, can you show the hex dump from a good ping?