rtwn: fix mbuf allocation errors in USB RX path for > 4 KiB framesWe can and do receive > 4 KiB frames in the RX path (A-MSDU framescan be up to 11KiB.) At least one user has reported seeing this
rtwn: fix mbuf allocation errors in USB RX path for > 4 KiB framesWe can and do receive > 4 KiB frames in the RX path (A-MSDU framescan be up to 11KiB.) At least one user has reported seeing thisand having it break their traffic flows.Use m_get3() to try and grab an mbuf jumbo cluster.This may not be the best permanent solution, but it at least willfail for frame sizes we expect to see up and including the largestA-MPDU frame (11Kib) and keep a counter if it can't allocate, versusjust returning NULL because it's too large (and not keeping counters.)Differential Revision: https://reviews.freebsd.org/D50049PR: kern/286366Reviewed by: bz
show more ...
rtwn: bump up the RX USB buffersWe should just keep the RX pipeline busy.Differential Revision: https://reviews.freebsd.org/D47990Reviewed by: imp
rtwn: add placeholder for the per-MACID rate reportSome chipsets (such as the RTL8188E) have firmware which supportsa second kind of TX report - instead of a per-packet TX report,it can generate
rtwn: add placeholder for the per-MACID rate reportSome chipsets (such as the RTL8188E) have firmware which supportsa second kind of TX report - instead of a per-packet TX report,it can generate a per-MACID summary of packet success/failure counters.This would be helpful for those chips to cut back on the USB trafficto get rate control feedback for the driver based rate control we'recurrently using.This is a no-op; it just gets the pieces in place for future work.Differential Revision: https://reviews.freebsd.org/D47894
rtwn: Add device ID for TPLink RTL8192CU
rtwn: change the USB TX transfers to only do one pending transfer per endpointI found I was getting constant device timeouts when doing anythingmore complicated than a single SSH on laptop with RT
rtwn: change the USB TX transfers to only do one pending transfer per endpointI found I was getting constant device timeouts when doing anythingmore complicated than a single SSH on laptop with RTL8811AU.After digging into it, i found a variety of fun situations, includingtraffic stalls that would recover w/ a shorter (1 second) USB transfertimeout. However, the big one is a straight up hang of any TX endpointuntil the NIC was reset. The RX side kept going just fine; only theTX endpoints would hang.Reproducing it was easy - just start up a couple of traffic streamson different WME AC's - eg a best effort + bulk transfer, likebrowsing the web and doing an ssh clone - throw in a ping -i 0.1to your gateway, and it would very quickly hit device timeouts everycouple of seconds.I put everything into a single TX EP and the hangs went away.Well, mostly.So after some MORE digging, I found that this driver isn't checkingif the transfers are going into the correct EPs for the packetWME access category / 802.11 TID; and would frequently be ableto schedule multiple transfers into the same endpoint.Then there's a second problem - there's an array of endpointsused for setting up the USB device, with .endpoint = UE_ADDR_ANY,however they're also being setup with the same endpoint configuredin multiple transfer configs. Eg, a NIC with 3 or 4 bulk TX endpointswill configure the BK and BE endpoints with the same physical endpointID. This also leads to timed out transfers.My /guess/ was that the firmware isn't happy with one or both of theabove, and so I solved both.* drop the USB transfer timeout to 1 second, not 5 seconds - that way we'll either get a 1 second traffic pause and USB transfer failure, or a 5 second device timeout. Having both the TX timeout and the USB transfer timeout made recovery from a USB transfer timeout (without a NIC reset) almost impossible.* enforce one transfer per endpoint;* separate pending/active buffer tracking per endpoint;* each endpoint now has its own TX callback to make sure the queue / end point ID is known;* and only frames from a given endpoint pending queue is going into the active queue and into that endpoint.* Finally, create a local wme2qid array and populate it with the endpoint mapping that ensures unique physical endpoint use.Locally tested:* rtl8812AU, 11n STA mode* rtl8192EU, 11n STA mode (with diffs to fix the channel config / power timeouts.)Differential Revision: https://reviews.freebsd.org/D47522
Revert "Enter the network epoch in USB WiFi drivers when processing input"This reverts commit 17c328b6aebfa03cd1c2cbfbbc617e3b341bf1e4.Sponsored by: The FreeBSD FoundationMFC after: 3 days
sys: Automated cleanup of cdefs and other formattingApply the following automated changes to try to eliminateno-longer-needed sys/cdefs.h includes as well as now-emptyblank lines in a row.Remov
sys: Automated cleanup of cdefs and other formattingApply the following automated changes to try to eliminateno-longer-needed sys/cdefs.h includes as well as now-emptyblank lines in a row.Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/Remove /\n+#if.*\n#endif.*\n+/Remove /^#if.*\n#endif.*\n/Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/Sponsored by: Netflix
sys: Remove $FreeBSD$: one-line .c patternRemove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
sys: Remove $FreeBSD$: one-line .h patternRemove /^\s*\*+\s*\$FreeBSD\$.*$\n/
sys: Remove $FreeBSD$: two-line .h patternRemove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
rtwn: Remove unused devclass arguments to DRIVER_MODULE.
rtwn(4): Add new USB ID.Submitted by: Wensi <supdrewin@outlook.com>PR: 261098MFC after: 1 weekSponsored by: NVIDIA Networking
rtwn(4): Add new USB ID.Submitted by: arved@PR: 260952MFC after: 1 weekSponsored by: NVIDIA Networking
rtwn/usb: add product ID for Asus USB N10 Nano Rev. B1According to information found on the internet the following productsuse exactly the same hardware but probably different USB IDs:- Edimax EW
rtwn/usb: add product ID for Asus USB N10 Nano Rev. B1According to information found on the internet the following productsuse exactly the same hardware but probably different USB IDs:- Edimax EW-7811Un V2 (v2)- Edimax EW-7811GLN 2.0A (v2)I am not adding them as I cannot verify.PR: 254280MFC after: 1 week
rtwn_usb(4): Add a USB ID for the TP-Link Archer T2U v3.PR: 256203Submitted by: Steve Kargl sgk at troutmask.apl.washington.eduMFC after: 2 weeks
rtwn: narrow the epoch areaRather than placing the epoch around the entire receive loop whichmight call into rtwn_rx_frame() and USB and sleep, split the loopinto two[1] and leave us with one unl
rtwn: narrow the epoch areaRather than placing the epoch around the entire receive loop whichmight call into rtwn_rx_frame() and USB and sleep, split the loopinto two[1] and leave us with one unlock/lock cycle as well.PR: 249925Reported by: thj, (rkoberman gmail.com)Tested by: thjSuggested by: adrian [1]Reviewed by: adrianMFC after: 3 daysSponsored by: The FreeBSD Foundation (initially, paniced my iwl lab host)Differential Revision: https://reviews.freebsd.org/D26554
rtwn: clean up empty lines in .c and .h files
rtwn(4): Add support for the Belkin N300.PR: 249034Submitted by: Salvador Martínez Mármol <salvica@kapj.net>MFC after: 1 week
Add new USB ID.Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>MFC after: 1 weekSponsored by: Mellanox Technologies
rtwn: Add a USB ID for Buffalo WI-U2-433DHPPR: 247573Submitted by: HATANO Tomomi <hatanou@infolab.ne.jp>MFC after: 1 week
rtwn: Add a USB ID for the TP-Link TL-WN727N.PR: 246417Submitted by: Viktor G. <viktor@netgate.com>MFC after: 1 week
rtwn: Add a new USB ID.PR: 246315Submitted by: Idwer Vollering <vidwer+fbsdbugs@gmail.com>MFC after: 1 week
Add new USB ID.Submitted by: Konrad Jopek <kjopek@gmail.com>Differential Revision: https://reviews.freebsd.org/D24142MFC after: 1 weekSponsored by: Mellanox Technologies
Add new USB device ID for Elecom 802.11ac USB device.MFC after: 2 weeks
Enter the network epoch in USB WiFi drivers when processing inputmbuf queues.Submitted by: Idwer Vollering <vidwer gmail.com>
12