summaryrefslogtreecommitdiff
path: root/sys/dev/ic
AgeCommit message (Collapse)Author
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@
2018-09-21Add support for RTL8188EE.Jonathan Matthew
This needs a new firmware image, which should be added to the rtwn firmware package shortly. testing and lots of help from kevlo@ ok kevlo@ stsp@
2018-09-13- There's no need to set R92C_HSSI_PARAM2_READ_EDGE for R92C_HSSI_PARAM2(0)Kevin Lo
for rtl8188eu - Fix typo in structure r92c_rom in comment: s/0x8192/0x8129/ - Add id member to struct r88e_rom which identifies eeprom - Replace magic numbers with something more readable - Cosmetic tweaking ok stsp@
2018-08-14return ENOTTY rather than EINVAL to indicate an ioctl hasn't been handledJonathan Matthew
ok dlg@ deraadt@ kettenis@
2018-08-12Really overwrite the major of com(4) instead of the hardcoded 12.Mark Kettenis
Should have been part of the earlier commit that unified armv7 and arm64.
2018-07-25On authentication we don't need to create the node before callingPatrick Wildt
the network stack since the stack will create the node for us if we pass the ibss stack. On assocation request the node already has to exist, so we error out if we don't have a record of the node. Fixes hostap on 5 GHz channels, since now the node's channel is recorded correctly.
2018-07-17TX packets, which can be either Ethernet or control packets, must bePatrick Wildt
sent in order. Otherwise it is possible that the key is set before we send out the EAPOL packet, or that packets are sent out before the key is set. Thus modify the SDIO backend to put both types into the same internal TX queue, which will be sent asynchronously. Discussed with bluhm@
2018-07-16Add support for the BCM43455 SDIO chip to bwfm(4).Patrick Wildt
2018-07-16Re-set the pointer to the bwfm event after the strict alignmentPatrick Wildt
check.
2018-07-06Move mbuf alignment for strict aligned architectures from the BCDCPatrick Wildt
specific receive path into the generic receive path, since PCIe supplied packets can be misaligned as well.
2018-07-04Move allocation behind sanity check to address possible memory leak asPatrick Wildt
seen by Coverity CID 1470240. Cast the ieee80211_frame struct pointer to uint8_t to address concerns raised by Coverity CID 1470239 and CID 1470237. ok stsp@
2018-07-03Use LIST_FOREACH construct instead of homebrew loop.Kevin Lo
ok bluhm@, mpi@
2018-07-02Allow pluart(4) to attach to acpi(4).Mark Kettenis
ok mlarkin@, patrick@
2018-05-23Wait for write operations to complete.Mark Kettenis
ok mlarkin@
2018-05-23Only react to deauthentication/disassociation and link changes if we arePatrick Wildt
not in INIT state. Otherwise we can have bogus state changes on ifconfig down. Also don't try to end a scan if we were not scanning.
2018-05-23Select correct channel in Host AP mode. One part of that is creatingPatrick Wildt
the channel specification (channel, freq, bandwidth, control channel) which is parsed and understood by the bwfm(4) firmware. Another part is that we shouldn't start a scan if the channel is selected by the user, otherwise we override the chosen channel. The remaining part is bringing the device down properly. If it's not disabled properly, we cannot bring it up again. ok stsp@
2018-05-23Implement a separate initialization stage so that we can still usePatrick Wildt
and initialize bwfm(4) later in the case that the firmware was not available on bootup and was only later installed. ok stsp@
2018-05-18Add bio(4) and sensors for mfii(4), based on code from mfi(4). Most of theJonathan Matthew
work was done by Naoki Fukaumi, some tweaks and adjustment to match the preceding changes by me. Tested on SAS2208, SAS3008, SAS3108, SAS3508. ok dlg@
2018-05-17Recent Broadcom chipsets have a dedicated PMU core and it can't bePatrick Wildt
accessed using the Chipcommon core anymore.
2018-05-16Implement a BCDC control packet mechanism based on the command requestPatrick Wildt
ids. So far we were only able to have one command in flight at a time and race conditions could easily lead to unexpected behaviour, especia- lly combined with a slow bus and timeouts. With this rework we send or enqueue a control packet command and wait for replies to happen. Thus we can have multiple control packets in flight and a reply with the correct id will wake us up.
2018-05-14Add support for register shift/io-width to the console code as well.Mark Kettenis
ok visa@, patrick@
2018-05-06Change the order in which whe write ouw own MAC address into the relevant twoMark Kettenis
hardware registers. On Rockchip hardware it seems the address latches into the filter logic only after writing writing the "low" register. Fixes the Gigabit Ethernet interface on the Rockchip RK3328 and RK3399. ok visa@, patrick@
2018-05-02Revert previous commit; the XR17V35X probe that was added accesses registersMark Kettenis
that aren't guaranteed to be there and may even belong to a different device. This triggers a fault on hppa machines like the C3000 for example.
2018-04-28Some drivers handle settting a new wifi link state manually, so make surePeter Hessler
they flush old nodes and set the interface link state to down, like the framework does. OK stsp@ pirofti@
2018-04-28replace add_*_randomness with enqueue_randomness()Jasper Lievisse Adriaanse
this gets rid of the source annotation which doesn't really add anything other than adding complexitiy. randomess is generally good enough that the few extra bits that the source type would add are not worth it. ok mikeb@ deraadt@
2018-04-28When starting a background scan, free the nodes table to ensure weStefan Sperling
get an up-to-date view of APs around us. In particular, we need to kick out the AP we are associated to. Otherwise, our current AP might stay cached if it is turned off while we are scanning, and we could end up picking a now non-existent but "good looking" AP over and over. found with and ok phessler@
2018-04-28pgt(4): do not tsleep in the scan ioctl.Paul Irofti
The only action taken during the scan ioctl was to sleep. This does not make sense as the scanning process happens in the state machine behind the scenes. Initialization indeed performs newstate(SCAN), but that is done no matter if the user waits for the full results or not. Instead, this change unifies the (new) user experience when performing ifconfig scan and shows the nodes list produced by the latest background scan. This was not tested on real hardware. Please message me directly in case this broke your card. OK stsp@, deraadt@
2018-04-26net80211: stub SIOCS80211SCAN, make ifconfig scan instant.Paul Irofti
The following removes the functionality of the SIOCS80211SCAN ioctl. After long discussions with stps@, mpi@, and deraadt@ we decided that this was the correct way of fixing ifconfig scan from blocking the network stack. The kernel will continue scanning in the background and filling the nodes array, but ifconfig scan commands will now basically do just a SIOCG80211ALLNODES and pretty print the array. So the output stays the same but is instant. In fact, when the interface is freshly brought up, if you type fast enough, you can see the array being filled by running multiple ifconfig scans in sequence. The SIOCS80211SCAN ioctl stays for now as wi(4), pgt(4) and malo(4) still need it around. But not for long... Another change that this introduces is the fact that ifconfig scan no longer plays with UP and DOWN. If the interface is down it complains and exits. This is needed in order to maintain the nodes list. Works on iwm(4), iwn(4), urtwn(4), run(4) and athn(4). Tested by mpi@, landry@, florian@, thanks! OK mpi@.
2018-04-20add a small driver for AMDs cryptographic co processor.David Gwynne
the hardware provides crypto offload, zlib offload, and an rng. this code only supports the rng at the moment. this device is present on their amd seatlle platforms, and very present on their epyc stuff. ok kettenis@ jmatthew@
2018-04-15The Exar XR17V354 has 4 com ports that have a 256-byte FIFO, use aJoshua Stein
frequency of 125Mhz, and have a unique sleep register. A custom interrupt handler is setup in puc for these ports so it can check a register which reports which ports triggered the interrupt, rather than having to run comintr for every port every time. ok mlarkin deraadt
2018-04-11Some (probably newer) re(4) cards don't have the 32-bit memory BAR thatPatrick Wildt
we try to map first. Instead there's a 64-bit memory BAR in the follow- ing BAR. Since on the MACCHIATObin we currently do not support the IO space, we have to use the 64-bit memory BAR. Thus, try to map the 64- bit BAR before falling back to the 32-bit BAR and the IO bar. ok deraadt@ kettenis@
2018-04-11Add mixer save/restore capability to the audio(4) driver andAlexandre Ratchov
use it during suspend/resume. Remove driver-specific mixer save/restore bits that don't need to be duplicated in every low-lever driver. ok mpi
2018-04-07Only attach a single PHY if the PHY address isn't specified. This preventsMark Kettenis
PHYs that respond at the broadcast address 0 and some other address from attaching twice and isolating themselves from the interface. This makes the network interface on the Theobrama Systems RK3399-Q7 SoM that has a Micrel KZS9031 PHY work. ok patrick@