Age | Commit message (Collapse) | Author |
|
ok deraadt@
|
|
ok deraadt@
|
|
it may prevent incorrect mac address read from efuse
- Disable BB/RF is not needed in urtwn_r92c_power_on()
ok stsp@
|
|
out like other "modern" devices.
ok dlg@
|
|
passive scans, which works well enough as long as you don't use
hidden networks. Even without hidden networks, using an active scan
seems to be quicker and feels like it works better.
ok stsp@
|
|
ieee80211 ioctl(2) implementation. Do the same for the driver
specific code of ac(4) and wi(4) wireless network devices.
OK mpi@
|
|
enforce this for the an(4) wireless network device.
found by Ilja Van Sprundel; OK dlg@ deraadt@ mpi@
|
|
to connect, e.g. due to a timeout, we will switch the state to SCAN.
Unfortunately this skips clearing the active channel set, which
means that on a scan on all bands only the nodes on the active
channel set, which is defined by whatever node we tried to connect
to, are allowed and all other APs are ignored. Fix this by properly
calling begin_scan(). When we fail to connect and start a scan,
make sure to let the chip know that we don't want to associate
anymore.
Another issue existed when we interrupt a scan, for instance by
setting a new nwid or wpakey. In this case we didn't abort the
scan and started a new scan while the old one as still active.
This could lead to a SCAN -> SCAN transition loop.
Remove the "set ssid" event, since this would be an event in
addition to a failed auth/assoc event, which would make us try
to handle failure twice.
Discussed with and ok stsp@
|
|
Synced from iwm(4).
ok patrick@
|
|
|
|
similarities between the two and using a common approach helps fixing bugs.
The new driver is better integrated with the device tree framework and
is faster (mainly because the DMA engine is configured properly now).
Tested on all currently supported variants of the hardware.
ok jsg@, jmatthew@
|
|
ok claudio@
|
|
counters reaches the half-way point (i.e. after receiving 2GB of packet
data). Fixes the problem discovered and reported by kurt@
ok jsg@
|
|
This reduces drops caused by the ifq pressure drop mechanism and hence
increases throughput. Such drops are visible with e.g. 'netstat -dnI iwm0'.
Not all affected drivers have been tested yet but these changes are largely
mechanical and should be safe. As usual, please report any regressions.
With help from dlg@ and mpi@
Problem found by robert@
Tested by robert, jmc, Tracey Emer, Matthias Schmidt, florian, Björn Ketelaars
ok mpi@
|
|
now unneeded version_to_spc() mapping array, a duplicate #define
and a couple of magic numbers. Toss in some comments for future
generations of spelunkers.
Makes it possible to check for specific SPC versions when new
features or eliminated features require such a check.
No intentional functional change.
|
|
wiping the entire cache every time a scan is triggered.
This has benefits for userland programs trying to look at scan results,
and for drivers which don't get a full view from hardware on every scan.
Nodes will still be evicted from the cache in one of several ways:
Add a new way of timing out inactive nodes which don't send a beacon
within 10 scan iterations, for client mode only. This should get rid
of stale APs if we're scanning for some time in a changing environment.
If we fail to associate a few times, the corresponding node is removed.
If net80211 transitions back to INIT state (e.g. because of a
user-initiated configuration change) all nodes are removed.
When a background scan starts all nodes will be removed. This could be
revisited later but has been intentionally left as-is for now.
Tested by myself, jmc@, benno@, procter@ on iwm(4), athn(4) and ral(4).
|
|
that will end up in config_detach() flags via scsi_detach_target().
ok jmatthew@ dlg@
|
|
mode.
ok jcs@, mlarkin@
|
|
register like we do for non-polled mode. This seems to increase the
reliability of i2c transfers on the controller integrated on the Ampare
eMAG processor.
ok jcs@, mlarkin@
|
|
make sure Tx interrupts are counted.
ok deraadt@
|
|
update the values if they are non-zero and smaller than the current
hardcoded depths. Fixes dwiic(4) on Ampere eMAG.
ok patrick@, jcs@
|
|
from nvme(4) on sparc64 as the OBP device paths contain namespace identifiers
that we end up matching to targets when trying to find the device we booted
from. Also results in (slightly) cleaner code and less confusion as the
numbers now match instead of being off-by-one.
ok dlg@
|
|
tested by myself, jmc@, and Tracey Emery
|
|
Linux ath9k does the same.
tested by myself, jmc@, and Tracey Emery
|
|
All callers sleep indefinitely.
With help from visa@.
ok visa@, ratchov@, kn@
|
|
to be overridden from ACPI
|
|
ok jmatthew
|
|
the limited ring for asynchronous can easily overflow.
Work around this by chaining the mbufs into a list.
Fixes a panic for jcs@
ok stsp@
|
|
ok kn@
|
|
HBA after ahci_default_port_start() sets AHCI_PREG_CMD_ST. The AHCI
spec. rev. 1.3 only requires the inverse to be true, i. e. that a
HBA clears AHCI_PREG_CMD_CR when AHCI_PREG_CMD_ST gets cleared by
software/driver. In fact, some HBAs will not raise AHCI_PREG_CMD_CR
as an immediate consequence of AHCI_PREG_CMD_ST being set. Actually
neither the FreeBSD, Linux nor NetBSD counterpart of ahci(4) has an
analogous check. Disabling that wait fixes "failed to start command
DMA on port N, disabling" bails during attach.
From Marius Strobl
ok deraadt@ jmatthew@
|
|
commands are in flight and all corresponding threads are sleeping
waiting for a response, the first command to timeout will clear the
command queue. The remaining threads once awake will then try to remove
a dequeued command from the queue, leading to corruption. Instead,
remove commands from the queue before waking up the sleeping thread.
A quirk is still needed to handle the case where tsleep() returns
successfully during suspend.
ok mpi@ visa@
Reported-by: syzbot+fe74fc50c630bfa26302@syzkaller.appspotmail.com
|
|
|
|
all nodes and set the link down, this already happened the first
time we went to SCAN mode. This brings us in line with the net80211
stack and fixes an incomplete node list during ifconfig(8) scan.
|
|
ok jmatthew@
|
|
ok stsp@
|
|
Problem reported and fix tested by Stephane Guedon
ok jca@ mpi@
|
|
From Miod
OK tedu@
|
|
in ieee80211com's ic_flags because we haven't been paying attention to
them (they're not in the same place in the code and hence easy to miss).
Move them to a dedicated variable to avoid this problem in the future.
Add a new 'stayauth' nwflag which can be set to let net80211 ignore
deauth frames. This can be useful when deauth frames are being
persistently spoofed by an attacker. Idea from beck@
ok beck@ phessler@
|
|
The Mac EFI firmware enables the wireless controller, but does not disable it,
so it continues to receive packets and signal interrupts. This
was originally seen as an interrupt storm that consumes about 50% of
CPU0 on affected machines. The issue was originally discovered in 2012 by
Matthew Garret with a partial fix in Grub, then Lukas Wunner added a fix for
the Linux kernel in 2016.
This piggy-backs on the most-related driver (bwi) for the purpose of detection
and mapping the control registers, but does not actually register the driver if
the affected chip is detected.
See this archived discussion for further analysis of the bug:
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1165355.html
ok kettenis stsp
|
|
ok deraadt mpi
|
|
|
|
Because the RTC is still ticking it is theoretically possible for the
second to roll over while we are reading the clock. This is basically
impossible on real/practical hardware but is an interesting corner case
for e.g. a VM reading an emulated MC146818 during an exit to userspace.
This doesn't check *every* register, so if it takes you a multiple of
60 seconds to read the RTC this change won't help you. But you've got
bigger problems at that point.
"no objections" kettenis@/mlarkin@, "fine idea" deraadt
|
|
in x_media_change(), return the errno from ieee80211_media_change() and
do the error check from x_init().
ok stsp@, jmatthew@, phessler@
|
|
a 16-bit value, so we have to use letoh16() instead of letoh32().
Also properly cast it to signed, so that it can be sign-extended
properly.
ok stsp@
|
|
Tested with TP-LINK TL-WN821N V3.
ok stsp@
|
|
Fixes kevlo's TL-WN821nv3.
test & ok kevlo@
|
|
since those fetched from the controller may not be correct
also attach on intel 300 series devices
ok kettenis
|
|
to reset/enable MCU
- there's no need to enable 1.2V power for rtl8192eu
ok jmatthew@
|
|
(reverting most of r1.60 of mfi.c, oddly enough)
ok dlg@
tested on a SAS2008 (perc h310)
|
|
We now update the chip with values for SIFS interval and ACK/RTS/CTS
timeout when configuration changes occur, like Linux ath9k does.
Tested by myself, juanfra@, jmc@ on AR9280 and AR9271.
|