summaryrefslogtreecommitdiff
path: root/sys/dev/ic
AgeCommit message (Collapse)Author
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.
2019-02-27Implement support for dynamic RTS threshold in MiRA.Stefan Sperling
Improves throughput and latency on 11n networks. Tested by myself, jmc@, jcs@, phessler@, benno@
2019-02-19Fix a cosmetic issue in athn(4)'s bpf(4) tap.Stefan Sperling
tcpdump -i athn0 -y IEEE802_11_RADIO was showing a SHORTPRE flag on most frames because a PHY type check was missing from the bpf tap code path. Short preamble only applies to 2, 5.5, and 11 MBit/s CCK frames.
2019-02-19Make ifconfig(8) display whether bwfm(4) firmware is using 802.11ac.Stefan Sperling
ok patrick@ mpi@
2019-02-07Consistently use m_freem(9). This fixes possible leaks in a fewPatrick Wildt
error cases.
2019-02-07There's a task ring for executing commands in a sleep-safe context.Patrick Wildt
This task is used to deliver mbufs (for events, not data), but it's possible that the queue overruns. In that case it does leak mbufs. For now, assert the size to see if we hit the issue.
2019-02-01Complete athn(4) noisefloor calibration code and enable it.Stefan Sperling
Update default/min/max noisefloor values to those used by Linux ath9k. Tested by jmc, juanfra, kn, and myself, on 9280 and 9271 devices.
2019-01-31Fix compilation of amd64 kernel when optimization is disabled.Todd C. Miller
C99 inline semantics resulted in undefined symbols. OK deraadt@ mpi@ dlg@
2019-01-31Enable IQ/ADC calibration in the athn(4) driver.Stefan Sperling
Code for this was already present, it was just not being called yet. Tested on AR9280 and AR9271 by jmc@, kevlo@, jmatthew@, juanfra@, and myself.
2019-01-30Make bwfm(4) query firmware for RSSI levels and current transmit rate whenStefan Sperling
ifconfig asks for such information. ok patrick@
2019-01-29Discard unwanted mouse events from the keyboard input channel when we'reMarcus Glocker
on the console. Issue reported by deraadt@. ok deraadt@, mpi@
2019-01-29Accept control frames in monitor mode.Kevin Lo
Based on a diff from Jesper Wallin. ok jmatthew@, stsp@
2018-12-30Increase the reset timeout. The ROCK64 RK3328-based board seems to need aMark Kettenis
bit more time after a warm reset.
2018-12-07Handle 2 Tx chains in the computation of transmit power for the RTL8192EU.Kevin Lo
While here sort vendors. Tested by jmatthew@ ok stsp@, jmatthew@
2018-12-04Add support for RTL8192EU adapters, partly taken from netbsd.Jonathan Matthew
These show up with a variety of vendor/product ids, but the driver will only match those we've tested so far. help and testing from kevlo@ ok stsp@ kevlo@
2018-11-09M_LEADINGSPACE() and M_TRAILINGSPACE() are just wrappers forClaudio Jeker
m_leadingspace() and m_trailingspace(). Convert all callers to call directly the functions and remove the defines. OK krw@, mpi@
2018-10-22More "explicitely" -> "explicitly" in various comments.Kenneth R Westerback
ok guenther@ tb@ deraadt@
2018-10-04Force 8051 reset/enable before waiting for firmware to get ready forKevin Lo
RTL8723AE, like we alreay do for RTL8188C/RTL8192C. ok jmatthew@
2018-10-02Add support for RT3290 chipset by James Hastings.Kevin Lo
Tested by me and James Hastings.
2018-10-01add RTL8723AE supportJonathan Matthew
ok kevlo@ stsp@
2018-10-01The sequence number field in the 802.11 frame header includes the sequenceJonathan Matthew
number and the fragment number, so shift it to get just the sequence number for the tx descriptor. While here, add a #define for the flag in the same field that enables hardware sequence numbering, and use existing constants for some R92C_RSV_CTRL writes. prompted by feedback from kevlo@ on another diff, tested on 8188CE, EE, EU ok stsp@ kevlo@
2018-09-28Move the unions into the rom struct which fixes Coverity CID 1473649 andKevin Lo
makes it more readable. ok stsp@ and jmatthew@