summaryrefslogtreecommitdiff
path: root/sys/dev/ic
AgeCommit message (Collapse)Author
2019-11-19Set isr to the correct value (sc->rl_intrs).Kevin Lo
ok deraadt@
2019-11-19Don't assign ifp twice in the re_txeof().Kevin Lo
ok deraadt@
2019-11-16- Don't enable/disable efuse access protection for rtl8188c/rtl8192c;Kevin Lo
it may prevent incorrect mac address read from efuse - Disable BB/RF is not needed in urtwn_r92c_power_on() ok stsp@
2019-11-14Unleash all the available openings and let the midlayer sort thingsKenneth R Westerback
out like other "modern" devices. ok dlg@
2019-11-09Add support for active scan to bwfm(4). So far we only have donePatrick Wildt
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@
2019-11-07Showing kernel WEP keys to userland has been disabled in genericAlexander Bluhm
ieee80211 ioctl(2) implementation. Do the same for the driver specific code of ac(4) and wi(4) wireless network devices. OK mpi@
2019-11-07Only root is allowed to set the WEP key. Add an suser() check toAlexander Bluhm
enforce this for the an(4) wireless network device. found by Ilja Van Sprundel; OK dlg@ deraadt@ mpi@
2019-10-28Better error handling for bwfm(4) connection attempts. When we failPatrick Wildt
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@
2019-10-09Restore BSS channel only when BSS was not changed in iee80211_input().tobhe
Synced from iwm(4). ok patrick@
2019-10-05fix build errors of aac(4)jan
2019-09-29Replace dwge(4) with a new driver based on dwxe(4). There are manyMark Kettenis
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@
2019-09-25Argument order fix for MCLGETI.Kevin Lo
ok claudio@
2019-09-15Mask all MMC interrupts. This prevents an interrupt storm when one of theMark Kettenis
counters reaches the half-way point (i.e. after receiving 2GB of packet data). Fixes the problem discovered and reported by kurt@ ok jsg@
2019-09-12Make wireless drivers call if_input() only once per interrupt.Stefan Sperling
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@
2019-09-01Adopt the SCSI versioning #define's from FreeBSD. Eliminate theKenneth R Westerback
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.
2019-08-27Keep ieee80211_node structures cached across scans, rather thanStefan Sperling
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).
2019-08-20Use the defines DETACH_FORCE and DETACH_QUIET when constructing a valueKenneth R Westerback
that will end up in config_detach() flags via scsi_detach_target(). ok jmatthew@ dlg@
2019-08-18Increase timeout used when waiting for the Rx FIFO to fill up when in polledMark Kettenis
mode. ok jcs@, mlarkin@
2019-08-18In polled mode, wait on STOP detected bit to be set in the interrupt statusMark Kettenis
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@
2019-08-11Fix an issue where output gets stuck when a machine is under load. AlsoMark Kettenis
make sure Tx interrupts are counted. ok deraadt@
2019-08-06Read the fifo depths from the appropriate configuration register andMark Kettenis
update the values if they are non-zero and smaller than the current hardcoded depths. Fixes dwiic(4) on Ampere eMAG. ok patrick@, jcs@
2019-07-27Make target numbers match the NVMe namespace identifiers. This fixes bootingMark Kettenis
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@
2019-07-24Set athn(4) Tx descriptor fields which specify Tx power used for retries.Stefan Sperling
tested by myself, jmc@, and Tracey Emery
2019-07-24Make athn(4) provide full Tx time of each frame in a Tx series to hardware.Stefan Sperling
Linux ath9k does the same. tested by myself, jmc@, and Tracey Emery
2019-07-19ttysleep(): drop unused timeout parametercheloha
All callers sleep indefinitely. With help from visa@. ok visa@, ratchov@, kn@
2019-07-16don't bother reading default timing parameters if they're just goingJoshua Stein
to be overridden from ACPI
2019-07-08Remove some "set but not used" variables in ahci(4)'s hibernate code.Mike Larkin
ok jmatthew
2019-07-05Since on a SCAN each node is provided in its own event,Patrick Wildt
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@
2019-07-03Don't check if unsigned value is less than zeroians
ok kn@
2019-06-25Turn off the code which waits for AHCI_PREG_CMD_CR to be set by thePatrick Wildt
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@
2019-06-03Prevent corruption of the pckbc command queue. If multiple synchronousanton
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
2019-05-22Print the bwfm(4)'s ethernet address on attach.Patrick Wildt
2019-05-22If we are SCANning and we want another SCAN, we don't need to purgePatrick Wildt
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.
2019-05-21Fix free(9) with wrong pointer in sili(4) attach error path; CID 1480295Stefan Sperling
ok jmatthew@
2019-05-17For AR9271, use correct clock control register and add a macro to access it.Kevin Lo
ok stsp@
2019-05-14Fix athn(4) 9280 1T2R devices; broken since my noisefloor calib commitStefan Sperling
Problem reported and fix tested by Stephane Guedon ok jca@ mpi@
2019-05-14Add free(9) sizes to ahc(4)jan
From Miod OK tedu@
2019-05-12Fix 'ifconfig nwflags; These flags ended up overlapping with other flagsStefan Sperling
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@
2019-05-10Explicitly disable BCM4331 chips present in 2011-2012 Apple Mac systems.Brent Cook
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
2019-05-08when freeing ccbs, pass the number so we can free with the size.Ted Unangst
ok deraadt mpi
2019-05-07Fix delay logic: measure w/ uptime, pack timeval correctly. ok krw@cheloha
2019-04-29MC146818_GETTOD: Check for RTC rollover during read.cheloha
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
2019-04-25Follow up on jmatthew's suggestion:Kevin Lo
in x_media_change(), return the errno from ieee80211_media_change() and do the error check from x_init(). ok stsp@, jmatthew@, phessler@
2019-04-01Correctly extract the RSSI information from the structure. It'sPatrick Wildt
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@
2019-03-31AR9287-based usb devices use GPIO pin 10 for LED, not 8.Kevin Lo
Tested with TP-LINK TL-WN821N V3. ok stsp@
2019-03-29Read the EEPROM of AR9287 USB devices from the correct offset.Stefan Sperling
Fixes kevlo's TL-WN821nv3. test & ok kevlo@
2019-03-16fetch timing parameters from ACPI like the ACPI attachment doesJoshua Stein
since those fetched from the controller may not be correct also attach on intel 300 series devices ok kettenis
2019-03-11- in rtwn_r88e_fw_reset function, use the correct bit R88E_RSV_CTRL_MCU_RSTKevin Lo
to reset/enable MCU - there's no need to enable 1.2V power for rtl8192eu ok jmatthew@
2019-03-05apply background init progress fix from r1.59 of mfii.cJonathan Matthew
(reverting most of r1.60 of mfi.c, oddly enough) ok dlg@ tested on a SAS2008 (perc h310)
2019-03-01Make athn(4) configure timing of control frames explicitly.Stefan Sperling
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.