History log of /freebsd-11-stable/sys/dev/urtwn/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
360696 06-May-2020 dim

Fix misleading indentation warning:

sys/dev/urtwn/if_urtwn.c:4183:4: error: misleading indentation; statement is not part of the previous 'for' [-Werror,-Wmisleading-indentation]
if (error != USB_ERR_NORMAL_COMPLETION)
^
sys/dev/urtwn/if_urtwn.c:4180:3: note: previous statement is here
for (i = 0; i < nitems(rtl8192cu_mac); i++)
^

Direct commit to stable/11, since urtwn(4) has been merged into rtwn(4)
in FreeBSD 12 and later (and this code is not in rtwn).

345636 28-Mar-2019 avos

MFC r344990:
Fix ieee80211_radiotap(9) usage in wireless drivers:

- Alignment issues:
* Add missing __packed attributes + padding across all drivers; in
most places there was an assumption that padding will be always
minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -
padding was just missing.
* Add __aligned(8) attribute for all Rx radiotap headers since they can
contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so
just drop the attribute here. Refresh ieee80211_radiotap(9) man page
accordingly.

- Since net80211 automatically updates channel frequency / flags in
ieee80211_radiotap_chan_change() drop duplicate setup for these fields
in drivers.


/freebsd-11-stable/share/man/man9/ieee80211_radiotap.9
/freebsd-11-stable/sys/dev/ath/if_athioctl.h
/freebsd-11-stable/sys/dev/bwi/if_bwi.c
/freebsd-11-stable/sys/dev/bwi/if_bwivar.h
/freebsd-11-stable/sys/dev/bwn/if_bwn.c
/freebsd-11-stable/sys/dev/bwn/if_bwnvar.h
/freebsd-11-stable/sys/dev/ipw/if_ipwvar.h
/freebsd-11-stable/sys/dev/iwi/if_iwivar.h
/freebsd-11-stable/sys/dev/iwm/if_iwmvar.h
/freebsd-11-stable/sys/dev/iwn/if_iwn.c
/freebsd-11-stable/sys/dev/iwn/if_iwnvar.h
/freebsd-11-stable/sys/dev/malo/if_maloioctl.h
/freebsd-11-stable/sys/dev/mwl/if_mwlioctl.h
/freebsd-11-stable/sys/dev/otus/if_otus.c
/freebsd-11-stable/sys/dev/otus/if_otusreg.h
/freebsd-11-stable/sys/dev/ral/rt2560var.h
/freebsd-11-stable/sys/dev/ral/rt2661var.h
/freebsd-11-stable/sys/dev/ral/rt2860var.h
/freebsd-11-stable/sys/dev/rtwn/if_rtwn.c
/freebsd-11-stable/sys/dev/rtwn/if_rtwnreg.h
if_urtwn.c
if_urtwnvar.h
/freebsd-11-stable/sys/dev/usb/wlan/if_rsu.c
/freebsd-11-stable/sys/dev/usb/wlan/if_rsureg.h
/freebsd-11-stable/sys/dev/usb/wlan/if_rumvar.h
/freebsd-11-stable/sys/dev/usb/wlan/if_run.c
/freebsd-11-stable/sys/dev/usb/wlan/if_runvar.h
/freebsd-11-stable/sys/dev/usb/wlan/if_uathvar.h
/freebsd-11-stable/sys/dev/usb/wlan/if_upgtvar.h
/freebsd-11-stable/sys/dev/usb/wlan/if_uralvar.h
/freebsd-11-stable/sys/dev/usb/wlan/if_urtw.c
/freebsd-11-stable/sys/dev/usb/wlan/if_urtwvar.h
/freebsd-11-stable/sys/dev/usb/wlan/if_zydreg.h
/freebsd-11-stable/sys/dev/wi/if_wireg.h
/freebsd-11-stable/sys/dev/wpi/if_wpivar.h
/freebsd-11-stable/sys/dev/wtap/if_wtapioctl.h
345254 18-Mar-2019 avos

MFC r344745:
urtwn(4): fix Tx instability with RTL8192CU chipsets

PR: 233949

343976 10-Feb-2019 avos

MFC r343474:
Remove 2GHz channel list copies from wireless drivers.

Wrap ieee80211_add_channel_list_2ghz into another function
which supplies default (1-14) channel list to it and drop
its copies from drivers.

342274 20-Dec-2018 avos

MFC r306173:
Add TP-Link Archer T4U (and TPLINK vendor record in usbdevs).

MFC r341786,r342156
urtwn, rsu: add more USB ids (rtwn -> urtwn merge was done manually).

PR: 233638
Submitted by: cezary.sliwa@gmail.com

303344 26-Jul-2016 avos

MFC r303115:

urtwn: fix A-MSDU tx aggregation when encryption is used.

Clear unused (undocumented) CAM bytes while setting a key;
without that, hardware does weird things when A-MSDU bit in QoS header
is set.

Tested with RTL8188CUS (AP) -> RTL8188EU (STA) (A-MSDU transmit).

Reported by: many
Approved by: re (gjb)
Obtained from: https://github.com/s3erios/urtwm

302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
302186 24-Jun-2016 avos

urtwn: use m_get2() in Rx path.

Replace m_getcl() with m_get2(); this fixes 'frame too long'
messages for frames, which are longer than MCLBYTES
(can be easily triggered when A-MSDU is used).

Tested with RTL8188CUS (AP) and RTL8188EU (STA).

Approved by: re (marius)


302183 24-Jun-2016 avos

urtwn: fix memory leak on device restart

Free data buffers every time when device is stopped, not when
it is detached; they are allocated at the initialization stage.

How-to-reproduce:
1) ifconfig wlan0 create wlandev urtwn0 up
2) vmstat -m | grep USBdev
3) service netif restart
4) vmstat -m | grep USBdev

Also, remove usbd_transfer_drain() call; it is already called by
usbd_transfer_unsetup().

Tested with RTL8188CUS, STA mode.

Approved by: re (marius)


302034 20-Jun-2016 avos

urtwn: fix panic on device detach.

Remove frames from active/pending Tx queues and free related node
references when vap is destroyed to prevent various use-after-free
scenarios.

Reported and tested by: Aleksander Alekseev <afiskon@devzen.ru>
PR: 208632
Approved by: re (gjb)


301762 09-Jun-2016 avos

urtwn: reinstall group keys on every device startup.

Since key table is cleared on every device shutdown,
static WEP keys (which are set only once) need to be
reinstalled manually every time when device starts running.

Tested with RTL8188EU, STA (all ciphers) / IBSS (WPA-none) modes.


301132 01-Jun-2016 avos

urtwn: unbreak CTS-to-self protection mode.

Do not set HWRTSEN bit when CTS-to-self is used; CTS2SELF bit triggers
CTS frame transmission by itself (and it does not work when HWRTSEN bit
is set).

Tested with:
* RTL8188CUS, HOSTAP mode (11g)
* RTL8188EU, STA mode (11g)


301128 01-Jun-2016 avos

urtwn: fix non-ERP BSS detection in HOSTAP mode.

Receive all beacons in HOSTAP mode; they will give more information about
present non-ERP / legacy BSSs (used to choose protection mode).

Tested with RTL8188CUS (HOSTAP, urtwn) + RTL8821AU (HOSTAP, 11b mode).


300788 26-May-2016 avos

rtwn, urtwn: drop unused structures.

urtwn(4) uses another implementation of command queue; rtwn(4) don't need
it at all.


300754 26-May-2016 avos

urtwn, rtwn, rsu: switch to ieee80211_add_channel_list_2ghz().

- Use device's channel list instead of default one (from
ieee80211_init_channels()); adds 12 - 14 2GHz channels.
- Add ic_getradiocaps() method.


300434 22-May-2016 avos

urtwn: cleanup some unused code in urtwn_tx_data().

- Drop unused 'subtype' variable.
- Remove obsolete comment (hardware crypto support was added in r292175).


300433 22-May-2016 avos

urtwn: setup per-frame retry limit.

Override global retry limit (which is set in R92C_RL) via per-frame
TX descriptor field. Obsoletes D3840 (should work better with 2+ vaps).

Tested with RTL8188EU and RTL8192CUS in STA mode (maxretry = [3-9]).


299965 16-May-2016 avos

urtwn: add support for hardware multicast filter setup.

Tested with RTL8188EU and RTL8188CUS.


298818 29-Apr-2016 avos

net80211 + drivers: hide size of 'bands' array behind a macro.

Auto-replace 'howmany(IEEE80211_MODE_MAX, 8)' with 'IEEE80211_MODE_BYTES'.
No functional changes.


298436 21-Apr-2016 avos

urtwn: optimize rate lookup in the urtwn_ra_init()

Replace loop with switch statement (rate2ridx())
(should be noop).

Tested with RTL8188EU / RTL8188CUS, STA mode.

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D4848 (rebased)


298359 20-Apr-2016 avos

net80211: replace internal LE_READ_*/LE_WRITE_* macro with system
le*dec / le*enc functions.

Replace net80211 specific macros with system-wide bytestream
encoding/decoding functions:
- LE_READ_2 -> le16dec
- LE_READ_4 -> le32dec
- LE_WRITE_2 -> le16enc
- LE_WRITE_4 -> le32enc

+ drop ieee80211_input.h include, where it was included for these
operations only.

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D6030


298175 18-Apr-2016 adrian

[urtwn] default to announcing RX 64K aggregates.


298138 17-Apr-2016 adrian

[urtwn] set the A-MPDU density to 16.

Obtained from: Linux rtlwifi/rtl8xxxu


297910 13-Apr-2016 adrian

[urtwn] use/track the last good RSSI for a given node, rather than no RSSI.

Now that we're decap'ing A-MPDU frame, the firmware is only giving us
PHY status information for the whole PPDU, rather than duplicatig it
per frame.

So, we fake it by maintaining the RSSI that we saw in the node struct
and reuse it.

This prevents us from getting some pretty garbage looking default RSSI
values, which shows up as RSSI values of like "3" or "4" when doing
active traffic.

Tested:

* RTL8188EU, STA mode


297601 06-Apr-2016 adrian

[urtwn] disable doing AMPDU TX.

We don't do AMPDU TX for now, so don't bother setting this.


297596 05-Apr-2016 adrian

[urtwn] first cut of getting the fast-frames / amsdu support in shape.

The urtwn hardware transmits FF/A-MSDU just fine - it takes an 802.11
frame and will dutifully send the thing.

So:

* bump RX queue up from 1. Why's it 1? That's really silly.
* Add the "software A-MSDU" encap capability bit.
* bump the TX buffer size up so we can at least send A-MSDU frames.
* track active frames submitted to the NIC - we can't make assumptions
about how many are in flight in the NIC though. For 88E parts we
could use per-packet TX indication, but for R92 parts we can't.
So, just fake it somewhat.
* Kick the transmit queue when we finish reception; try to avoid stalls.
* Kick the FF queue a little more regularly.

A-MSDU TX won't happen until the net80211 side is done, but atheros
fast-frames support should now work.

Tested:

* urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R ; A-MSDU transmit.


297175 22-Mar-2016 adrian

[urtwn] welcome basic 11n support to urtwn.

This is a pretty good reference for teaching an almost-11n-capable
driver about 11n.

It enables HT20 operation, A-MPDU/A-MSDU RX, but no aggregate support
for transmit. That'll come later. This means that receive throughput
should be higher, but transmit throughput won't have changed much.

* Disable bgscan - for now, bgscan will interfere with AMPDU TX/RX,
so until we correctly handle it in software driven scans, disable.
* Add null 11n methods for channel width / ampdu_enable.
the firmware can apparently handle ampdu tx (and hopefully block-ack
handling and retransmission) so I'll go review the linux code and
figure it out.
* Set the number of tx/rx streams. I /hope/ that nchains == nstreams
here.
* Add 11n channels in the call to ieee80211_init_channels().
* Don't enable HT40 for now - I'll have to verify the channel set command
and tidy it up a bit first.
* Teach the RX path about M_AMPDU for 11n nodes. Kinda wonder why
we aren't just doing this in net80211 already, this is the fourth
driver I've had to do this to.
* Teach rate2ridx() about MCS rates and what hardware rates to use.
* Teach the urtwn_tx_data() routine about MCS/11ng transmission.
It doesn't know about short-gi and 40MHz modes yet; that'll come
later.
* For 8192CU firmware, teach the rate table code about MCS rates.
* Ensure that the fixed rate transmit sets the right transmit flag
so the firmware obeys the driver transmit path.
* Set the default transmit rate to MCS4 if no rate control is available.
* Add HT protection (RTS-CTS exchange) support.

* Add appropriate XXX TODO entries.

TODO:

* 40MHz, short-gi, etc - channel tuning, TX, RX;
* teach urtwn_tx_raw() about (more) 11n stuff;
* A-MPDU TX would be nice!

Thanks to Andriy (avos@) for reviewing the code and testing it on IRC.

Tested:

* RTL8188EU - STA (me)
* RTL8192CU - STA (me)
* RTL8188EU - hostap (avos)
* RTL8192CU - STA (avos)

Reviewed by: avos


297058 20-Mar-2016 adrian

[urtwn] migrate urtwn out into sys/dev/urtwn/ .

There's some upcoming work to add new chipset support here and I'd
like to only add 802.11n support to one driver, instead of both
urtwn and rtwn.

There's also missing support for things like 802.11n, some powersave
work, bluetooth integration/coexistence, etc, and also newer parts
(like 8192EU, maybe some 11ac parts, not sure yet.)

So, this is hopefully the first step in a longer set of steps to unify
rtwn/urtwn and extend it with more interesting chipset and functionality
support.

Reviewed by: kevlo