Search Linux Wireless

Re: RTL8188EU (LogiLink WL0151A) - Malformed packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/04/2023 12:04, Artem Makhutov wrote:
> Hi,
> 
>>> As a workaround: What about checking the IP length field. If the
>>> received packet is smaller by 4 bytes than what it should be then just
>>> add extra 4 bytes at the end? Or does the MIC at the end have any
>>> influence on anything?
>>
>> That should work, but it's ugly.
> 
> I did it and it is working, and yes, it is ugly :)
> 
>> If the router lets you change the MTU, does it help to make it smaller?
> 
> No, this is a bad idea. It will bring a lot of other issues.
> 
>> Do you have the problem with the v5.13.3 driver? If it works (other
>> than completely dying after a while) we should see what it does
>> differently compared to the v5.2.2.4 driver.
> 
> The v5.13.3 does not have this problem.
> 
> I have tested 3 different approaches and also made some quick speed tests:
> 
> 1: I changed the skb length according the IP header so the packet is complete
> 2: Disabled ht by sband->ht_cap.ht_supported = false;
> 3: Tested v5.13.3 driver
> 
> Speedtests with iperf:
> IP header hack:
> 24.5 Mbits/sec
> 
> HT hack:
> 18.7 Mbits/sec
> 
> v5.13.3 driver:
> 54.6 Mbits/sec
> 
> The v5.13.3 driver has the highest speed and does not have the missing
> bytes bug. So it does something different...

I had another idea. Does this help?

diff --git a/rtl8xxxu_core.c b/rtl8xxxu_core.c
index cbf39ff..91878cf 100644
--- a/rtl8xxxu_core.c
+++ b/rtl8xxxu_core.c
@@ -4202,6 +4202,8 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
 	val32 = RCR_ACCEPT_PHYS_MATCH | RCR_ACCEPT_MCAST | RCR_ACCEPT_BCAST |
 		RCR_ACCEPT_MGMT_FRAME | RCR_HTC_LOC_CTRL |
 		RCR_APPEND_PHYSTAT | RCR_APPEND_ICV | RCR_APPEND_MIC;
+	if (priv->rtl_chip == RTL8188E)
+		val32 &= ~RCR_APPEND_MIC;
 	rtl8xxxu_write32(priv, REG_RCR, val32);
 
 	if (fops->init_reg_rxfltmap) {
@@ -6197,6 +6199,8 @@ int rtl8xxxu_parse_rxdesc16(struct rtl8xxxu_priv *priv, struct sk_buff *skb)
 
 			rx_status->mactime = rx_desc->tsfl;
 			rx_status->flag |= RX_FLAG_MACTIME_START;
+			if (priv->rtl_chip == RTL8188E)
+				rx_status->flag |= RX_FLAG_MIC_STRIPPED;
 
 			if (!rx_desc->swdec)
 				rx_status->flag |= RX_FLAG_DECRYPTED;




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux