| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Migrate to the new encryption key API rather than poking at the
key struct directly.
Differential Revision: https://reviews.freebsd.org/D54483
|
| |
|
|
|
|
|
|
|
|
|
| |
Migrate to the new encryption key API rather than poking at the
key struct directly.
Locally tested:
* STA mode - run0: MAC/BBP RT2860 (rev 0x0101), RF RT2820 (MIMO 2T2R), address 00:0e:2e:e5:ae:3a
Differential Revision: https://reviews.freebsd.org/D54462
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mtw(4) driver works correctly on initial boot, but fails to initialize
the MT7601U WiFi adapter after a warm reboot.
Users must either physically unplug and replug the USB adapter, or perform a
full power cycle to restore functionality, if usb power is always powered
(only a replug works)
The root cause is that warm reboot does not power-cycle USB devices,
leaving the MT7601U in a stale state from the previous session.
The MCU retains its ready flag and the device ignores initialization
commands, resulting in timeout waiting for MCU to initialize errors.
At the OS Level, pinging 1.1.1.1 will work, but the speed will be very
slow. In addition in debug mode, we see thousand of error logs.
This patch addresses the issue by:
* Performing USB re-enumeration on attach to reset the device state
* Detecting when the MCU is already marked ready (stale from previous
session) and forcing a reset of the MCU before loading firmware
* Increasing the firmware load timeout from 3s to 10s to accommodate
slower initialization after reset
* Increasing MCU ready poll attempts from 100 to 300 with longer delays
to handle devices that take longer to become ready after reset
Note: The increase was random, lower value might work.
Test Plan:
Tested on MacBook Pro (late-2015) and a MacMini with MediaTek MT7601U
USB adapter across multiple warm reboot cycles.
With the mac-mini and a another desktop, the issue happens only if
connected via an always powered usb hub port in the monitor.
The laptop don't power cycle it power.
Differential Revision: https://reviews.freebsd.org/D54659
Reviewed by: adrian
|
| |
|
|
|
|
|
|
|
|
| |
* constify mtw_write_region_1()'s data field
* convert to use ieee80211_crypto_get_*()
* .. note that rx/tx mic data routines are explicitly being called,
as this NIC is doing TKIP + MIC offload
Differential Revision: https://reviews.freebsd.org/D53704
Reviewed by: bz
|
| |
|
|
|
|
|
| |
- s/frequence/frequency/
- s/finsihed/finished/
MFC after: 5 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate the following wifi drivers to use the seqno offload option.
Locally tested (STA mode) on:
* mtw
* uath
* upgt
* ural
* urtw
* uzyd
Differential Revision: https://reviews.freebsd.org/D50771
Okayed by: bz
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Enable A-MPDU TX by fixing the A-MPDU TX establish routine;
always assign sequence numbers from net80211 (for now); and
fix the descriptor programming.
* Add TODO items around CAM allocation for keys, MAC ID stuff which
we likely need to fix for working IBSS/AP behaviour, and whatever
other bits and pieces I noticed.
* Disable amsdu2ampdu, we can decap A-MSDU just fine in net80211,
doubly so if we somehow get A-MSDU inside an A-MPDU.
I've tested / verified that A-MPDU TX and A-MPDU RX is correctly
established and functioning by using rtwn in monitor mode.
I used an old r92su linux out of tree driver for comparison.
Differential Revision: https://reviews.freebsd.org/D50748
Okayed by: bz
|
| |
|
|
|
|
|
|
|
|
| |
Enable sequence number offload.
This should both enable the sequence number offloading and disable
the net80211 TX lock from being acquired/released/checked.
Differential Revision: https://reviews.freebsd.org/D50749
Okayed by: bz
|
| |
|
|
|
|
|
|
|
|
| |
Enable sequence number offload.
This should both enable the sequence number offloading and disable
the net80211 TX lock from being acquired/released/checked.
Differential Revision: https://reviews.freebsd.org/D50747
Okayed by: bz
|
| |
|
|
|
| |
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D50542
|
| |
|
|
|
|
| |
Reviewed by: thj, adrian
Obtained from: NetBSD
Differential Revision: https://reviews.freebsd.org/D49588
|
| |
|
|
|
|
| |
Approved by: thj, adrian
Obtained from: NetBSD
Differential Revision: https://reviews.freebsd.org/D49588
|
| |
|
|
|
|
|
|
| |
It looks like this was missed during the driver development and
porting.
Differential Revision: https://reviews.freebsd.org/D49512
Reviewed by: thj
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Explicitly set the software ciphers; add support for GCMP-128.
Locally tested:
* AR5523 11abg NIC, 2/5GHz STA operation, GCMP forced
in wpa_supplicant.conf
Differential Revision: https://reviews.freebsd.org/D49370
Reviewed by: bz
|
| |
|
|
|
|
|
|
|
| |
These includes were for __FBSD_RCSID() macro. They weren't formatted
like the rest of the tree so weren't trimmed automatically when that
script was run. Trim them now.
MFC After: 1 week
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
| |
This just mechanically converts things.
* For linuxkpi, it was just used for display.
* For uath, it was just used for display, as firmware
doesn't report it up.
Differential Revision: https://reviews.freebsd.org/D48602
Reviewed by: bz, thj
|
| |
|
|
|
| |
Approved by: adrian, wireless
Differential Revision: https://reviews.freebsd.org/D49003
|
| |
|
|
|
|
| |
This was just using random stack garbage before.
Reported by: GCC -Wunused-but-set-variable
|
| |
|
|
|
|
|
|
| |
PR: 284643
Reviewed by: adrian
Approved by: emaste (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48948
|
| |
|
|
|
|
|
|
|
| |
Added ht20 mode, based on if_run from FreeBSD, and if_mtw.c
from OpenBSD.
PR: 247545
Approved by: adrian, wireless
Differential Revision: https://reviews.freebsd.org/D45179
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The driver wasn't stable - it would start fine, but during scan
it would eventually hang and no further command endpoint transfers
would complete.
After adding some debugging and looking at the logs I noticed that
things went sideways once a /data/ frame was sent. The channel
change config happened between the data frame being sent and
being completed.
My guess is that the firmware doesn't like a channel change
and reset whilst there's pending data frames. Checking the Linux
driver I found that it was doing a flush before a channel change,
and we're doing it afterwards. This acts like a fence around
ensuring scheduled TX work has completed. In net80211 the
transmit path and the control path aren't serialised, so it's
very often the case that ioctls, state changes, etc occur
whilst in parallel there are frame transmits being scheduled.
This seems to happen more frequently on a more recent, high core
(8) machine with XHCI. I remember testing this driver years ago
on single and dual core CPU laptops with no problems.
So, add some flushes - before a channel change, and during
a transition to AUTH when the BSS config is being programmed into
the firmware. These two fences seem enough to reliably
associate as a 2GHz and 5GHz STA.
Note that this isn't entirely blocking all newly queued
transmit work from occuring until after the NIC has finished
configuration. That will need some further investigation.
Locally tested:
* Wistron NuWeb AR5523 dual-band NIC, STA mode, 2/5GHz
Differential Revision: https://reviews.freebsd.org/D47655
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the correct ID, as I have one of these NICs.
Add the previous one back in case it's out there in the wild.
@emaste did a bit of a dig into the product numbers.
@sam did change the ID from 0x0828 -> 082a in a commit
a long while back. It's worth reading the code review for
further details.
However, I do have one of these NICs and I verified that
it indeed has the given ID, and with some follow-up work
to fix some race conditions, it works fine in 2GHz 11bg
and 5GHz 11a operation.
Differential Revision: https://reviews.freebsd.org/D47654
Obtained from: Linux, drivers/net/wireless/ath/ar5523/ar5523.c
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Add macros for the management and control frame type checks that
I've come across in the drivers.
* Delete some now old code (eg ath's ieee80211_is_action()) as there's now
a macro for it.
Local testing:
* not yet, I have a lot of wifi devices to find and test against
Differential Revision: https://reviews.freebsd.org/D47500
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The way that net80211 and drivers are checking for the /type/ of key
is to check if it's in the vap WEP key array and if so, it's a group
key. If not, it's a unicast key.
That's not only kind of terrible, but it's also going to be
problematic with future 802.11 support (for multiple unicast keys
and IGTK keys for management frame protection.)
So as part of this, remove the places where this is done and
instead use a pair inline functions - ieee80211_is_key_global() and
ieee80211_is_key_unicast(). They currenly still use the same logic
but the drivers and net80211 stack isn't doing it itself.
There are still open questions about why keys are not being
correctly tagged as GROUP, GTK, PTK, etc. That will be investigated
and addressed in follow-up work as a pre-cursor to MFP, IGTK, etc.
as mentioned above.
Testing:
* iwn, rtwn - STA mode
Differential Revision: https://reviews.freebsd.org/D45516
|
| |
|
|
|
|
| |
- s/parmeter/parameter/
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since 5efea30f039c4 we can possibly lose a state transition which can
cause trouble further down the road.
The reproducer from 643d6dce6c1e can trigger these for example.
Drivers for firmware based wireless cards have worked around some of
this (and other) problems in the past.
Add an array of tasks rather than a single one as we would simply
get npending > 1 and lose order with other tasks. Try to keep state
changes updated as queued in case we end up with more than one at a
time. While this is not ideal either (call it a hack) it will sort
the problem for now.
We will queue in ieee80211_new_state_locked() and do checks there
and dequeue in ieee80211_newstate_cb().
If we still overrun the (currently) 8 slots we will drop the state
change rather than overwrite the last one.
When dequeing we will update iv_nstate and keep it around for historic
reasons for the moment.
The longer term we should make the callers of
ieee80211_new_state[_locked]() actually use the returned errors
and act appropriately but that will touch a lot more places and
drivers (possibly incl. changed behaviour for ioctls).
rtwn(4) and rum(4) should probably be revisted and net80211 internals
removed (for rum(4) at least the current logic still seems prone to
races).
PR: 271979, 271988, 275255, 263613, 274003
Sponsored by: The FreeBSD Foundation (in 2023)
MFC after: 3 days
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43389
|
| |
|
|
|
|
|
| |
This reverts commit 17c328b6aebfa03cd1c2cbfbbc617e3b341bf1e4.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
| |
This reverts commit 21c4082de9e2cf9a0fd81a9a981ab06022956847.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ieee80211_node_incref() is the FreeBSD implementation of
ieee80211_ref_node(). Not being interested in the node returned
it was used as a shortcut in 3 drivers (ath, uath, wpi).
Replace the call with the public KPI of ieee80211_ref_node() and
ignore the result.
This leaves us with the single internal call going
ieee80211_ref_node() -> ieee80211_node_incref() and that should
help increasing portability but also limiting the places to trace
for node reference operations.
Sponsored by: The FreeBSD Foundation
MFC after: 4 weeks
|
| |
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| |
|
|
| |
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
| |
|
|
| |
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| |
|
|
|
|
|
|
|
| |
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix
|
| |
|
|
|
|
| |
Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37812
|
| |
|
|
|
|
| |
Reported by: GCC -Warray-parameter
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D37551
|
| |
|
|
|
|
|
| |
"unsigned" keyword.
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
| |
|
|
|
| |
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
| |
|
|
|
| |
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
| | |
|
| |
|
|
|
|
|
| |
PR: 263638
Reported by: Jeff Gibbons <jgibbons@protogate.com>
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
While IEEE80211_R_BAND was defined, there was no place to store the
band. Add a field for that, adjust ieee80211_lookup_channel_rxstatus()
to require it, and update drivers passing "R_{FREQ|IEEE}" in already to
provide the band as well. For the moment keep the fall-back code
requiring all three fields.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D30662
|
| |
|
|
|
|
| |
PR: 256092
Submitted by: Francois Briere <purplefiasco at gmail.com>
MFC After: 2 weeks
|
| |
|
|
|
|
| |
PR: 255759
Submitted by: john.lmurdoch at gmail.com
MFC After: 1 week
|
| |
|
|
|
|
| |
PR: 254479
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The firmware header loaded into an rsu(4) device has to be customized
to reflect device settings. The driver was overwriting the header
from the shared firmware image before sending it to the device. If
two devices attached at the same time with different settings, one
device could potentially get a corrupted header. The recent changes
in a095390344fb1795c1b118a2f84da8f6a7f254ab exposed this bug in the
form of a panic as the firmware blobs are now marked read-only in
object files and mapped read-only by the kernel.
To avoid the bug, change the driver to allocate a copy of the firmware
header on the stack that is initialized before writing it to the
device.
PR: 252163
Reported by: vidwer+fbsdbugs@gmail.com
Tested by: vidwer+fbsdbugs@gmail.com
Reviewed by: hselasky, bz, emaste
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D27850
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In r178354 with the introduction of multi-bss ("vap") support factoring
out started and with r193340 ieee80211_media_change() no longer returned
ENETRESET but only 0 or error.
As ieee80211(9) tells the ieee80211_media_change() function should not
be called directly but is registered with ieee80211_vap_attach() instead.
Some drivers have not been fully converted. After fixing the return
checking some of these functions were simply wrappers between
ieee80211_vap_attach() and ieee80211_media_change(), so remove the extra
function, where possible as well.
PR: 248955
Submitted by: Tong Zhang (ztong0001 gmail.com) (original)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=365419
|
| |
|
|
| |
Notes:
svn path=/head/; revision=365084
|