aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/rtwn/usb
Commit message (Collapse)AuthorAgeFilesLines
* rtwn/usb: add ID for D-Link DWA-121 rev B1 to rtwn RTL8188EUBjoern A. Zeeb2026-05-301-0/+1
| | | | | | | | | | Add the device ID to the usbdevs table in order to be able to use it in the rtwn/usb driver for the RTL8188EU attachment. (I adjusted the name to B1 compared to the original submission) PR: 291839 MFC after: 3 days
* rtwn: fix mbuf allocation errors in USB RX path for > 4 KiB framesAdrian Chadd2025-05-011-3/+8
| | | | | | | | | | | | | | | | | We can and do receive > 4 KiB frames in the RX path (A-MSDU frames can be up to 11KiB.) At least one user has reported seeing this and 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 will fail for frame sizes we expect to see up and including the largest A-MPDU frame (11Kib) and keep a counter if it can't allocate, versus just returning NULL because it's too large (and not keeping counters.) Differential Revision: https://reviews.freebsd.org/D50049 PR: kern/286366 Reviewed by: bz
* rtwn: bump up the RX USB buffersAdrian Chadd2024-12-181-1/+1
| | | | | | | We should just keep the RX pipeline busy. Differential Revision: https://reviews.freebsd.org/D47990 Reviewed by: imp
* rtwn: add placeholder for the per-MACID rate reportAdrian Chadd2024-12-071-0/+21
| | | | | | | | | | | | | | Some chipsets (such as the RTL8188E) have firmware which supports a 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 traffic to get rate control feedback for the driver based rate control we're currently 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 RTL8192CUAugustin Cavalier2024-11-211-0/+1
|
* rtwn: change the USB TX transfers to only do one pending transfer per endpointAdrian Chadd2024-11-215-38/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found I was getting constant device timeouts when doing anything more complicated than a single SSH on laptop with RTL8811AU. After digging into it, i found a variety of fun situations, including traffic stalls that would recover w/ a shorter (1 second) USB transfer timeout. However, the big one is a straight up hang of any TX endpoint until the NIC was reset. The RX side kept going just fine; only the TX endpoints would hang. Reproducing it was easy - just start up a couple of traffic streams on different WME AC's - eg a best effort + bulk transfer, like browsing the web and doing an ssh clone - throw in a ping -i 0.1 to your gateway, and it would very quickly hit device timeouts every couple 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 checking if the transfers are going into the correct EPs for the packet WME access category / 802.11 TID; and would frequently be able to schedule multiple transfers into the same endpoint. Then there's a second problem - there's an array of endpoints used for setting up the USB device, with .endpoint = UE_ADDR_ANY, however they're also being setup with the same endpoint configured in multiple transfer configs. Eg, a NIC with 3 or 4 bulk TX endpoints will configure the BK and BE endpoints with the same physical endpoint ID. This also leads to timed out transfers. My /guess/ was that the firmware isn't happy with one or both of the above, 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"Bjoern A. Zeeb2023-12-011-3/+0
| | | | | | | This reverts commit 17c328b6aebfa03cd1c2cbfbbc617e3b341bf1e4. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-272-2/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank 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 patternWarner Losh2023-08-165-10/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-165-10/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* rtwn: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-091-3/+1
|
* rtwn(4): Add new USB ID.Hans Petter Selasky2022-01-111-0/+1
| | | | | | | Submitted by: Wensi <supdrewin@outlook.com> PR: 261098 MFC after: 1 week Sponsored by: NVIDIA Networking
* rtwn(4): Add new USB ID.Hans Petter Selasky2022-01-071-0/+1
| | | | | | | Submitted by: arved@ PR: 260952 MFC after: 1 week Sponsored by: NVIDIA Networking
* rtwn/usb: add product ID for Asus USB N10 Nano Rev. B1Andreas Wetzel2021-12-061-0/+1
| | | | | | | | | | | According to information found on the internet the following products use 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: 254280 MFC after: 1 week
* rtwn_usb(4): Add a USB ID for the TP-Link Archer T2U v3.Dmitry Chagin2021-05-271-0/+1
| | | | | | PR: 256203 Submitted by: Steve Kargl sgk at troutmask.apl.washington.edu MFC after: 2 weeks
* rtwn: narrow the epoch areaBjoern A. Zeeb2020-09-291-6/+12
| | | | | | | | | | | | | | | | | | Rather than placing the epoch around the entire receive loop which might call into rtwn_rx_frame() and USB and sleep, split the loop into two[1] and leave us with one unlock/lock cycle as well. PR: 249925 Reported by: thj, (rkoberman gmail.com) Tested by: thj Suggested by: adrian [1] Reviewed by: adrian MFC after: 3 days Sponsored by: The FreeBSD Foundation (initially, paniced my iwl lab host) Differential Revision: https://reviews.freebsd.org/D26554 Notes: svn path=/head/; revision=366268
* rtwn: clean up empty lines in .c and .h filesMateusz Guzik2020-09-014-5/+0
| | | | Notes: svn path=/head/; revision=365097
* rtwn(4): Add support for the Belkin N300.Mark Johnston2020-08-311-0/+1
| | | | | | | | | PR: 249034 Submitted by: Salvador Martínez Mármol <salvica@kapj.net> MFC after: 1 week Notes: svn path=/head/; revision=364993
* Add new USB ID.Hans Petter Selasky2020-08-061-0/+1
| | | | | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=363950
* rtwn: Add a USB ID for Buffalo WI-U2-433DHPLi-Wen Hsu2020-06-271-0/+1
| | | | | | | | | PR: 247573 Submitted by: HATANO Tomomi <hatanou@infolab.ne.jp> MFC after: 1 week Notes: svn path=/head/; revision=362672
* rtwn: Add a USB ID for the TP-Link TL-WN727N.Mark Johnston2020-05-121-0/+1
| | | | | | | | | PR: 246417 Submitted by: Viktor G. <viktor@netgate.com> MFC after: 1 week Notes: svn path=/head/; revision=360966
* rtwn: Add a new USB ID.Mark Johnston2020-05-091-1/+2
| | | | | | | | | PR: 246315 Submitted by: Idwer Vollering <vidwer+fbsdbugs@gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=360848
* Add new USB ID.Hans Petter Selasky2020-03-221-1/+2
| | | | | | | | | | Submitted by: Konrad Jopek <kjopek@gmail.com> Differential Revision: https://reviews.freebsd.org/D24142 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=359209
* Add new USB device ID for Elecom 802.11ac USB device.Gavin Atkinson2020-03-201-0/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=359158
* Enter the network epoch in USB WiFi drivers when processing inputGleb Smirnoff2020-01-241-0/+3
| | | | | | | | | mbuf queues. Submitted by: Idwer Vollering <vidwer gmail.com> Notes: svn path=/head/; revision=357093
* Add support for TP-Link Archer T2U Nano.Jung-uk Kim2019-09-011-1/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=351653
* rtwn_usb(4): add new USB id.Andriy Voskoboinyk2019-01-281-1/+2
| | | | | | | | | Submitted by: <yklaxds@gmail.com> Github issue: https://github.com/s3erios/rtwn/issues/4 MFC after: 5 days Notes: svn path=/head/; revision=343518
* net80211: reuse TICKS_2_MSEC / MSEC_2_TICKS macros from sys/time.hAndriy Voskoboinyk2019-01-251-4/+2
| | | | | | | | | | | Replace in-place implementation with system-wide one; since it guarantees non-zero result drop all less-than-one checks from drivers and net80211. MFC after: 2 weeks Notes: svn path=/head/; revision=343417
* rtwn_usb(4): add new USB id for RTL8821AUAndriy Voskoboinyk2019-01-161-1/+2
| | | | | | | | | Reported by: Mike Tancsa <mike@sentex.net> Tested by: Mike Tancsa <mike@sentex.net> MFC after: 3 days Notes: svn path=/head/; revision=343088
* rtwn_usb(4): add USB id for TP-LINK TL-WN821N v5.Andriy Voskoboinyk2019-01-021-0/+1
| | | | | | | | | It is already mentioned in manpage, but was missing from the driver. MFC after: 4 days Notes: svn path=/head/; revision=342703
* Add revision number for TP-Link TL-WN722N to prevent ambiguity betweenAndriy Voskoboinyk2018-12-171-1/+1
| | | | | | | | | | different chipsets. MFC after: 3 days X-MFC with: 341786 Notes: svn path=/head/; revision=342156
* Add new USB id in rtwn_usb(4) (RTL8812AU)Andriy Voskoboinyk2018-12-151-0/+1
| | | | | | | | | PR: 234029 Submitted by: <hakotani000@gmail.com> MFC after: 4 days Notes: svn path=/head/; revision=342124
* rtwn, rsu: add more USB ids.Andriy Voskoboinyk2018-12-101-0/+1
| | | | | | | | | PR: 233638 Submitted by: cezary.sliwa@gmail.com MFC after: 3 days Notes: svn path=/head/; revision=341786
* Add support for RealTek 8812 over USBGeorge V. Neville-Neil2017-12-031-0/+1
| | | | | | | | | Tested with ALFA AWUS036ACH MFC after: 1 week Notes: svn path=/head/; revision=326503
* rtwn_usb(4): add few USB IDs.Andriy Voskoboinyk2017-10-301-0/+2
| | | | | | | Submitted by: wfpower@yandex.ru (via github). Notes: svn path=/head/; revision=325137
* rtwn_usb: add support for fragmented Rx.Andriy Voskoboinyk2017-07-304-29/+209
| | | | | | | | | | | | | | | | | | | Since device can pass multiple frames in a single payload temporary Rx buffer was big enough to hold all of them; now the driver can concatenate a single frame from multiple payloads. The Rx buffer size may be configured via tunable (dev.rtwn.%d.rx_buf_size). Tested with: - rtl8188cus, rtl8188eu and rtl8821au (STA mode). - (by kevlo) rtl8192cu and rtl8188eu. PR: 218527 Reviewed by: kevlo Differential Revision: https://reviews.freebsd.org/D11705 Notes: svn path=/head/; revision=321735
* rtwn: add Rx descriptor structures for common code.Andriy Voskoboinyk2017-07-061-15/+12
| | | | | | | | | | | Remove any chipset specific usage of Rx descriptor structure / bits from common code to prevent misuse of fields that may differ between various chipsets. Checked with: RTL8821AU in STA mode. Notes: svn path=/head/; revision=320725
* rtwn_usb: reject too long (>16K) mbufs.Andriy Voskoboinyk2017-07-044-5/+10
| | | | | | | | While here move RTWN_TXBUFSZ constant from common to USB specific code (it's not used anywhere else). Notes: svn path=/head/; revision=320640
* rtwn: drop unneeded (after r315583) code.Andriy Voskoboinyk2017-03-191-11/+0
| | | | | | | | Tested with RTL8188EU, HOSTAP mode + RTL8821AU, STA mode (fast-frames / A-MSDU). Notes: svn path=/head/; revision=315584
* Sort REALTEK section and remove duplicate entry for RTL8192CU.Kevin Lo2017-01-241-1/+0
| | | | Notes: svn path=/head/; revision=312681
* Add support for the Realtek RTL8192EU chipset.Kevin Lo2017-01-241-0/+12
| | | | | | | | | Committed over the D-Link DWA-131 rev E1 on amd64 with WPA. Reviewed by: avos Notes: svn path=/head/; revision=312680
* rtwn: export more stats to net80211Andriy Voskoboinyk2017-01-171-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Setup more ieee80211_rx_stats fields for received frames: - pktflags: * IEEE80211_RX_F_FAIL_FCSCRC; * IEEE80211_RX_F_AMPDU; * IEEE80211_RX_F_AMPDU_MORE; * IEEE80211_RX_F_SHORTGI; - rate flags (CCK, OFDM, HT); - width; - phytype; - rate; - rx_tsf; - rssi; - nf; - ieee, freq (RTL8188EU only, when ht40 support is disabled). Tested with: - RTL8188CE, RTL8188EU, RTL8821AU (STA / AP modes, i386) - (by kevlo) RTL8188EU and RTL8812AU (amd64) Reviewed by: adrian (previous version), kevlo Differential Revision: https://reviews.freebsd.org/D9021 Notes: svn path=/head/; revision=312315
* rtwn_usb(4): do not try to modify global static structure.Andriy Voskoboinyk2017-01-091-1/+7
| | | | | | | | | | | Use a local copy for modifications instead. Tested with RTL8821AU (AP) + RTL8188EU (STA). Reported by: hselasky Notes: svn path=/head/; revision=311838
* rtwn_usb(4): fix Rx buffer size calculation.Andriy Voskoboinyk2017-01-083-3/+8
| | | | | | | | | | | | Use device-specific Rx buffer size to ensure that data will not be truncated + add a warning if truncation was detected (the driver cannot handle this case correctly yet). Tested with: - RTL8188CUS, RTL8188EU and RTL8821AU, STA / AP modes. Notes: svn path=/head/; revision=311707
* Add new USB device ID.Kevin Lo2017-01-061-0/+1
| | | | Notes: svn path=/head/; revision=311518
* rtwn: enable 11n support for RTL8188CE.Andriy Voskoboinyk2016-11-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | - Increase Rx buffer size from MCLBYTES to MJUMPAGESIZE. - Provide an additional defragmentation routine for frames larger than MCLBYTES; that is required by A-MSDU / Atheros Fast-Frames support to work with current Tx path implementation. Enabled features list for RTL8188CE: - Atheros Fast-Frames; - A-MPDU (Tx / Rx); - A-MSDU (Tx / Rx; 4k only); - Short Guard Interval. Tested with: - RTL8188CE (STA+AP) + RTL8821AU (STA). - RTL8188CE (STA) + RTL8188CUS (AP). Relnotes: yes Notes: svn path=/head/; revision=308575
* rtwn: add HOSTAP / IBSS mode support for RTL8188CE.Andriy Voskoboinyk2016-11-061-0/+6
| | | | | | | | | | | | | | | | NOTE: some multi-vap configurations (e.g., STA+IBSS) are not stable; that will be fixed later. Tested with: - RTL8188CE, STA + AP mode; - RTL8188CE, IBSS mode; - RTL8188CUS, IBSS mode; - RTL8188EU, IBSS mode. Relnotes: yes Notes: svn path=/head/; revision=308389
* rtwn_pci: omit tx_done() stage if device is not running.Andriy Voskoboinyk2016-11-061-1/+3
| | | | | | | | | | rtwn_usb: drain USB transfers during device shutdown; this fixes possible panic with 'options IEEE80211_SUPPORT_SUPERG' during device detach. Tested with RTL8188CE, STA mode. Notes: svn path=/head/; revision=308384
* rtwn(4): fix build with 'options IEEE80211_SUPPORT_SUPERG'Andriy Voskoboinyk2016-10-182-3/+3
| | | | Notes: svn path=/head/; revision=307577