aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/rtwn/usb/rtwn_usb_rx.c
Commit message (Collapse)AuthorAgeFilesLines
* 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: 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
* 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: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* 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
* 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
* rtwn_usb: add support for fragmented Rx.Andriy Voskoboinyk2017-07-301-25/+143
| | | | | | | | | | | | | | | | | | | 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: 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
* 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): fix Rx buffer size calculation.Andriy Voskoboinyk2017-01-081-1/+5
| | | | | | | | | | | | 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
* 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(4): fix build with 'options IEEE80211_SUPPORT_SUPERG'Andriy Voskoboinyk2016-10-181-2/+2
| | | | Notes: svn path=/head/; revision=307577
* rtwn(4), urtwn(4): merge common code, add support for 11ac devices.Andriy Voskoboinyk2016-10-171-0/+335
All devices: - add support for rate adaptation via ieee80211_amrr(9); - use short preamble for transmitted frames when needed; - multi-bss support: * for RTL8821AU: 2 VAPs at the same time; * other: 1 any VAP + 1 sta VAP. RTL8188CE: - fix IQ calibration bug (reason of significant speed degradation); - add h/w crypto acceleration support. USB: - A-MPDU Tx support; - short GI support; Other: - add support for RTL8812AU / RTL8821AU chipsets (a/b/g/n only; no ac yet); - split merged code into subparts: * bus glue (usb/*, pci/*, rtl*/usb/*, rtl*/pci/*) * common (if_rtwn*) * chip-specific (rtl*/*) - various other bugfixes. Due to code reorganization, module names / requirements were changed too: urtwn urtwnfw -> rtwn rtwn_usb rtwnfw rtwn rtwnfw -> rtwn rtwn_pci rtwnfw Tested with RTL8188CE, RTL8188CUS, RTL8188EU and RTL8821AU. Tested by: kevlo, garga, Peter Garshtja <peter.garshtja@ambient-md.com>, Kevin McAleavey <kevin.mcaleavey@knosproject.com>, Ilias-Dimitrios Vrachnis <id@vrachnis.com>, <otacilio.neto@bsd.com.br> Relnotes: yes Notes: svn path=/head/; revision=307529