Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jun 2016 23:17:13 +0300
From:      "Andriy Voskoboinyk" <avos@freebsd.org>
To:        "Marcus von Appen" <mva@freebsd.org>
Cc:        current@freebsd.org, freebsd-wireless@freebsd.org
Subject:   Re: Bad rtwn(0) performance with RTL8188CE on -CURRENT after r302035
Message-ID:  <op.yjqfyzls4dikkl@localhost>
In-Reply-To: <20160627170619.GB28353@athena.sysfault.org>
References:  <20160627170619.GB28353@athena.sysfault.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Mon, 27 Jun 2016 20:06:20 +0300 було написано Marcus von Appen  
<mva@freebsd.org>:

Hi,

the attached patch may fix this issue (probably)

> Hi,
>
> thanks to previous efforts, the rtwn(0) connection for my RTL8188CE
> wireless card is far more stable. It seems to come at the price of
> relatively bad performance, though. After r302035 from avos@, I
> can't get more than 500 kbit/s downstream from anywhere.

I don't think that this is a regression - that was already noted in PR  
203105:

> -Speed seems limited to 16Mbps rate (around 120 kbps on downstream),
> even though the ifconfig summary show 802.11g/56mbps.

>
> Let me know, what information is necessary to isolate and correct
> that issue. I'll gladly test it. :-)

You can check number of input errors (netstat -I wlan0); it should be
relatively small (or even zero).

>
> Cheers
> Marcus
[-- Attachment #2 --]
Index: sys/dev/rtwn/if_rtwn.c
===================================================================
--- sys/dev/rtwn/if_rtwn.c	(revision 302191)
+++ sys/dev/rtwn/if_rtwn.c	(working copy)
@@ -1498,6 +1498,8 @@
 		counter_u64_add(ic->ic_ierrors, 1);
 		return;
 	}
+	bus_dmamap_sync(sc->rx_ring.data_dmat, rx_data->map,
+	    BUS_DMASYNC_POSTREAD);
 	bus_dmamap_unload(sc->rx_ring.data_dmat, rx_data->map);
 
 	error = bus_dmamap_load(sc->rx_ring.data_dmat, rx_data->map,
@@ -2484,8 +2486,8 @@
 	/* Initialize Rx filter. */
 	/* TODO: use better filter for monitor mode. */
 	rtwn_write_4(sc, R92C_RCR,
-	    R92C_RCR_AAP | R92C_RCR_APM | R92C_RCR_AM | R92C_RCR_AB |
-	    R92C_RCR_APP_ICV | R92C_RCR_AMF | R92C_RCR_HTC_LOC_CTRL |
+	    R92C_RCR_APM | R92C_RCR_AM | R92C_RCR_AB |
+	    R92C_RCR_APP_ICV | R92C_RCR_HTC_LOC_CTRL |
 	    R92C_RCR_APP_MIC | R92C_RCR_APP_PHYSTS);
 	/* Accept all multicast frames. */
 	rtwn_write_4(sc, R92C_MAR + 0, 0xffffffff);
@@ -2494,8 +2496,8 @@
 	rtwn_write_2(sc, R92C_RXFLTMAP0, 0xffff);
 	/* Reject all control frames. */
 	rtwn_write_2(sc, R92C_RXFLTMAP1, 0x0000);
-	/* Accept all data frames. */
-	rtwn_write_2(sc, R92C_RXFLTMAP2, 0xffff);
+	/* Reject all data frames. */
+	rtwn_write_2(sc, R92C_RXFLTMAP2, 0x0000);
 }
 
 static void

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.yjqfyzls4dikkl>