aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix requests for "plain" SHA digests of an empty buffer.John Baldwin2019-04-241-2/+3
| | | | | | | | | | | | | | | | To workaround limitations in the crypto engine, empty buffers are handled by manually constructing the final length block as the payload passed to the crypto engine and disabling the normal "final" handling. For HMAC this length block should hold the length of a single block since the hash is actually the hash of the IPAD digest, but for "plain" SHA the length should be zero instead. Reported by: NIST SHA1 test failure MFC after: 2 weeks Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=346648
* [acpi_ibm] Add support for newer Thinkpad modelsOleksandr Tymoshenko2019-04-241-8/+40
| | | | | | | | | | | | Add support for newer Thinkpad models with id LEN0268. Was tested on Thinkpad T480 and ThinkPad X1 Yoga 2nd gen. PR: 229120 Submitted by: Ali Abdallah <aliovx@gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=346647
* Add support for Cadence network controller found in HiFive Unleashed board.Ruslan Bukin2019-04-241-1/+7
| | | | | | | | | Reviewed by: markj Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D19798 Notes: svn path=/head/; revision=346634
* Track device's NUMA domain in ifnet & alloc ifnet from NUMA local memoryAndrew Gallatin2019-04-222-2/+2
| | | | | | | | | | | | | | | | | | | | This commit adds new if_alloc_domain() and if_alloc_dev() methods to allocate ifnets. When called with a domain on a NUMA machine, ifalloc_domain() will record the NUMA domain in the ifnet, and it will allocate the ifnet struct from memory which is local to that NUMA node. Similarly, if_alloc_dev() is a wrapper for if_alloc_domain which uses a driver supplied device_t to call ifalloc_domain() with the appropriate domain. Note that the new if_numa_domain field fits in an alignment pad in struct ifnet, and so does not alter the size of the structure. Reviewed by: glebius, kib, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D19930 Notes: svn path=/head/; revision=346579
* cxgbe/t4_tom: Add a "TCB history" feature that samples hardware stateNavdeep Parhar2019-04-223-45/+421
| | | | | | | | | | for a tid and maintains a running history of some interesting events. Service TCP_INFO queries from the history when the tid is being tracked there. Notes: svn path=/head/; revision=346570
* cxgbe(4): Make sure bundled_fw is always initialized before use.Navdeep Parhar2019-04-221-13/+14
| | | | | | | | | | | | | This fixes a bug that prevented the driver from auto-flashing the firmware when it didn't see one on the card. This feature was introduced in r321390 and this bug was introduced in r343269. Reported by: gallatin@ MFC after: 1 week Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=346567
* [ath] [ath_hal] [ath_hal_9300] Extend the start PCU receive to handle ↵Adrian Chadd2019-04-2112-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resetting ANI. One of the fun issues with scanning has been how the existing ANI values were programmed into the hardware when channels were changed. If you're on a really crappy channel and ANI has made you deaf then when you scan you continue to be deaf on all channels. This code passes in a flag to startpcureceive which in AR5416 and later is also used to enable ANI. This allows it to know if it's a normal operation or a scan operation. This fixes my situation at home where a temporary spot of a device going deaf due to interference starts scanning and .. can't hear anything until I restart. Now, this isn't the full fix - ideally: (a) all the ANI config and per-channel information would be migrated to the shared HAL stuff and enabled for all of the NICs; (b) when a station reassociates and some other error conditions (like missed beacons, NF calibration failures, etc) a knob to reset ANI parameters would likely help recovery. But hey, I'm committing bits of code again! woo! Tested: * AR9344 (2G), STA operation Notes: svn path=/head/; revision=346470
* psm(4): give names to synaptics commandsVladimir Kondratyev2019-04-201-11/+31
| | | | | | | | Submitted by: Ben LeMasurier <ben@crypt.ly> MFC after: 2 weeks Notes: svn path=/head/; revision=346458
* psm(4): respect tap_disabled configuration with enabled Extended supportVladimir Kondratyev2019-04-201-3/+9
| | | | | | | | | | | | | This fixes a bug where, even when hw.psm.tap_enabled=0, touchpad taps were processed. tap_enabled has three states: unconfigured, disabled, and enabled (-1, 0, 1). To respect PR kern/139272, taps are ignored only when explicity disabled. Submitted by: Ben LeMasurier <ben@crypt.ly> (initial version) MFC after: 2 weeks Notes: svn path=/head/; revision=346457
* psm(4): do not process gestures when palm is presentVladimir Kondratyev2019-04-201-9/+16
| | | | | | | | | | | | | Ignoring of gesture processing when the palm is detected helps to reduce some of the erratic pointer behavior. This fixes regression introduced in r317814 Reported by: Ben LeMasurier <ben@crypt.ly> MFC after: 2 weeks Notes: svn path=/head/; revision=346456
* psm(4): Add support for 4 and 5 finger touches in synaptics driverVladimir Kondratyev2019-04-201-1/+10
| | | | | | | | | | While 4-th and 5-th finger positions are not exported through PS/2 interface, total number of touches is reported by MT trackpads. MFC after: 2 weeks Notes: svn path=/head/; revision=346455
* [ath] Fix return value check to not complain.Adrian Chadd2019-04-191-1/+1
| | | | | | | Compilers complain more about things, so let's keep them happy. Notes: svn path=/head/; revision=346405
* remove the 4GB boundary requirement on PCI DMA segmentsTycho Nightingale2019-04-195-29/+16
| | | | | | | | | | Reviewed by: kib Discussed with: jhb Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19867 Notes: svn path=/head/; revision=346386
* random(4): Restore availability tradeoff prior to r346250Conrad Meyer2019-04-183-9/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed in that commit message, it is a dangerous default. But the safe default causes enough pain on a variety of platforms that for now, restore the prior default. Some of this is self-induced pain we should/could do better about; for example, programmatic CI systems and VM managers should introduce entropy from the host for individual VM instances. This is considered a future work item. On modern x86 and Power9 systems, this may be wholly unnecessary after D19928 lands (even in the non-ideal case where early /boot/entropy is unavailable), because they have fast hardware random sources available early in boot. But D19928 is not yet landed and we have a host of architectures which do not provide fast random sources. This change adds several tunables and diagnostic sysctls, documented thoroughly in UPDATING and sys/dev/random/random_infra.c. PR: 230875 (reopens) Reported by: adrian, jhb, imp, and probably others Reviewed by: delphij, imp (earlier version), markm (earlier version) Discussed with: adrian Approved by: secteam(delphij) Relnotes: yeah Security: related Differential Revision: https://reviews.freebsd.org/D19944 Notes: svn path=/head/; revision=346358
* ofw_graph: Add functions for graph bindingsEmmanuel Vadot2019-04-172-0/+230
| | | | | | | | | | | | Those functions are helpers to work on graph bindings. graphs are mostly use with video related devices. See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/graph.txt?id=4436a3711e3249840e0679e92d3c951bcaf25515 MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D19877 Notes: svn path=/head/; revision=346332
* random(4): Add is_random_seeded(9) KPIConrad Meyer2019-04-163-3/+34
| | | | | | | | | | | | | | | The imagined use is for early boot consumers of random to be able to make decisions based on whether random is available yet or not. One such consumer seems to be __stack_chk_init(), which runs immediately after random is initialized. A follow-up patch will attempt to address that. Reported by: many Reviewed by: delphij (except man page) Approved by: secteam(delphij) Differential Revision: https://reviews.freebsd.org/D19926 Notes: svn path=/head/; revision=346282
* Improve tpm20 styleMarcin Wojtas2019-04-164-94/+97
| | | | | | | | | | | No functional changes to the code are applied. Submitted by: Kornel Duleba <mindal@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Notes: svn path=/head/; revision=346261
* tpm: Prevent session hijackMarcin Wojtas2019-04-162-1/+8
| | | | | | | | | | | | | | | Check caller thread id before allowing to read the buffer to make sure that it can only be accessed by the thread that did the associated write to the TPM. Submitted by: Kornel Duleba <mindal@semihalf.com> Reviewed by: delphij Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D19713 Notes: svn path=/head/; revision=346259
* random(4): Block read_random(9) on initial seedingConrad Meyer2019-04-155-58/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read_random() is/was used, mostly without error checking, in a lot of very sensitive places in the kernel -- including seeding the widely used arc4random(9). Most uses, especially arc4random(9), should block until the device is seeded rather than proceeding with a bogus or empty seed. I did not spy any obvious kernel consumers where blocking would be inappropriate (in the sense that lack of entropy would be ok -- I did not investigate locking angle thoroughly). In many instances, arc4random_buf(9) or that family of APIs would be more appropriate anyway; that work was done in r345865. A minor cleanup was made to the implementation of the READ_RANDOM function: instead of using a variable-length array on the stack to temporarily store all full random blocks sufficient to satisfy the requested 'len', only store a single block on the stack. This has some benefit in terms of reducing stack usage, reducing memcpy overhead and reducing devrandom output leakage via the stack. Additionally, the stack block is now safely zeroed if it was used. One caveat of this change is that the kern.arandom sysctl no longer returns zero bytes immediately if the random device is not seeded. This means that FreeBSD-specific userspace applications which attempted to handle an unseeded random device may be broken by this change. If such behavior is needed, it can be replaced by the more portable getrandom(2) GRND_NONBLOCK option. On any typical FreeBSD system, entropy is persisted on read/write media and used to seed the random device very early in boot, and blocking is never a problem. This change primarily impacts the behavior of /dev/random on embedded systems with read-only media that do not configure "nodevice random". We toggle the default from 'charge on blindly with no entropy' to 'block indefinitely.' This default is safer, but may cause frustration. Embedded system designers using FreeBSD have several options. The most obvious is to plan to have a small writable NVRAM or NAND to persist entropy, like larger systems. Early entropy can be fed from any loader, or by writing directly to /dev/random during boot. Some embedded SoCs now provide a fast hardware entropy source; this would also work for quickly seeding Fortuna. A 3rd option would be creating an embedded-specific, more simplistic random module, like that designed by DJB in [1] (this design still requires a small rewritable media for forward secrecy). Finally, the least preferred option might be "nodevice random", although I plan to remove this in a subsequent revision. To help developers emulate the behavior of these embedded systems on ordinary workstations, the tunable kern.random.block_seeded_status was added. When set to 1, it blocks the random device. I attempted to document this change in random.4 and random.9 and ran into a bunch of out-of-date or irrelevant or inaccurate content and ended up rototilling those documents more than I intended to. Sorry. I think they're in a better state now. PR: 230875 Reviewed by: delphij, markm (earlier version) Approved by: secteam(delphij), devrandom(markm) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D19744 Notes: svn path=/head/; revision=346250
* Remove superfluous USB keyword.Hans Petter Selasky2019-04-151-1/+1
| | | | | | | | | Discussed with: danfe@ MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=346248
* mlx5en: Enable new pfil(9) KPI ethernet filtering hooksAndrew Gallatin2019-04-153-3/+55
| | | | | | | | | | | | | | | | | | This allows efficient filtering at packet ingress on mlx5en. Note that the packets are filtered (and potentially dropped) *before* the driver has committed to (re)allocating an mbuf for the packet. Dropped packets are treated essentially the same as an error. Nothing is allocated, and the existing buffer is recycled. This allows us to drop malicious packets at close to line rate with very little CPU use. Reviewed by: hselasky, slavash, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D19063 Notes: svn path=/head/; revision=346247
* Fix spelling.Hans Petter Selasky2019-04-151-1/+1
| | | | | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=346229
* Add quirk for ignoring SPCR AccessWidth values on the PL011 UARTEd Maste2019-04-153-3/+10
| | | | | | | | | | | | | | | | | | The SPCR table on the Lenovo HR330A Ampere eMAG server indicates 8-bit access, but 32-bit access is required for the PL011 to work. PL011 on SBSA platforms always supports 32-bit access (and that was hardcoded here before my EC2 fix), let's use 32-bit access for PL011 and 32BIT interface types. Tested by emaste on Ampere eMAG and Cavium/Marvell ThunderX2. Submitted by: Greg V <greg@unrelenting.technology> Reviewed by: andrew, imp (earlier) Differential Revision: https://reviews.freebsd.org/D19507 Notes: svn path=/head/; revision=346228
* Fix SCSI sense data pass through.Alexander Motin2019-04-121-2/+1
| | | | | | | | MFC after: 1 week Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=346161
* Add some CMD53-related definitionsIlya Bakulin2019-04-101-16/+25
| | | | | | | | | | | In preparation to adding block mode functions, add necessary definitions. Reviewed by: bz Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D19832 Notes: svn path=/head/; revision=346100
* Implement CMD53 block mode support for SDHCI and AllWinner-based boardsIlya Bakulin2019-04-101-12/+39
| | | | | | | | | | | | If a custom block size requested, use it, otherwise revert to the previous logic of using just a data size if it's less than MMC_BLOCK_SIZE, and MMC_BLOCK_SIZE otherwise. Reviewed by: bz Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D19783 Notes: svn path=/head/; revision=346098
* Add new fields to mmc_data in preparation to SDIO CMD53 block mode supportIlya Bakulin2019-04-101-0/+3
| | | | | | | | | | | | | | | | SDIO command CMD53 (IO_RW_EXTENDED) allows data transfers using blocks of 1-2048 bytes, with a maximum of 511 blocks per request. Extend mmc_data structure to properly describe such requests, and initialize the new fields in kernel and userland consumers. No actual driver changes happen yet, these will follow in the separate changes. Reviewed by: bz Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D19779 Notes: svn path=/head/; revision=346097
* urtw(4), otus(4), iwi(4): allow to set non-default MAC address via ifconfig(8)Andriy Voskoboinyk2019-04-103-7/+32
| | | | | | | | | Tested with Netgear WG111 v3 (RTL8187B, urtw(4)), STA mode. MFC after: 1 week Notes: svn path=/head/; revision=346073
* Refine r330113 to honor the ProducerConsumer flag most of the time.John Baldwin2019-04-091-1/+8
| | | | | | | | | | | | | | | | | | | | | | While it is true that the ACPI spec says that the flag is only valid on Extended Address Space Descriptors, examples of other descriptors in the spec use the ProducerConsumer flag explicitly, and real hardware uses it as well. In fact, even in the ASL of the Thunder X2 for which r330113 was a workaround, some devices use this flag on non-Extended Address Space Descriptors correctly. Instead, only ignore the flag for resources associated with the UART devices on the Thunder X2 using the "ARMH0011" HID to identify these devices. This should fix regressions from ignoring this flag in other contexts such as Hyper-V. PR: 235876 Reported by: Wei Hu <weh@microsoft.com> Tested by: emaste (Thunder X2) MFC after: 2 weeks Notes: svn path=/head/; revision=346066
* Don't pre-reserve resources for CPU devices when they are set.John Baldwin2019-04-091-0/+8
| | | | | | | | | | | | | | | | | | | | CPUs can use shared (RF_SHAREABLE) resources for the I/O port used for entering and exiting C states. If this I/O port is included in an ACPI system resource device, then this happens to still work, but if the port wasn't part of a system resource device, only the first CPU could allocate the I/O port and use C states since resource_list_reserve() was always allocating the resource from nexus0 without RF_SHAREABLE. By avoiding the reservation, the flags from the bus_alloc_resource() in the CPU driver (which include RF_SHAREABLE) are honored. PR: 236513 Reported by: stockhausen@collogia.de Sleuthing by: avg Reviewed by: avg MFC after: 2 weeks Notes: svn path=/head/; revision=346063
* In some cases like NanoPI R1, its second USB ethernetGanbold Tsagaankhuu2019-04-091-1/+14
| | | | | | | | | | | | | RTL8152 (chip version URE_CHIP_VER_4C10) doesn't have hardwired MAC address, in other words, it is all zeros. This commit fixes it by setting random MAC address when MAC address is all zeros. Reviewed by: kevlo Differential Revision: https://reviews.freebsd.org/D19856 Notes: svn path=/head/; revision=346052
* Fix URE_WDT6_SET_MODE value in the register definition.Ganbold Tsagaankhuu2019-04-081-1/+1
| | | | | | | | | | | | Both linux and u-boot sources for RTL8152 driver has this value. RTL8152 USB ethernet is used in NanoPI R1 board as second ethernet. This fixes for me RTL8152 USB ethernet not detected problem after reboot on NanoPI R1 board. Both NetBSD and OpenBSD have a wrong value so far. Notes: svn path=/head/; revision=346028
* Give new home to the comment from ppt_pci_reset(), explaining a nuanceKonstantin Belousov2019-04-071-0/+5
| | | | | | | | | | | of power reset. Noted by: soralx@cydem.org Sponsored by: Mellanox Technologies MFC after: 12 days Notes: svn path=/head/; revision=345997
* Remove single-use DEV_RESET() macro.Konstantin Belousov2019-04-052-3/+1
| | | | | | | | | | | | It conflicts with the sys/bus.h DEV_XXX namespace. Reviewed by: imp (previous version), jhb (previous version) Sponsored by: Mellanox Technologies MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D19646 Notes: svn path=/head/; revision=345964
* Implement resets for PCI buses and PCIe bridges.Konstantin Belousov2019-04-053-0/+123
| | | | | | | | | | | | | | | | | For PCI device (i.e. child of a PCI bus), reset tries FLR if implemented and worked, and falls to power reset otherwise. For PCIe bus (child of a PCIe bridge or root port), reset disables PCIe link and then re-trains it, performing what is known as link-level reset. Reviewed by: imp (previous version), jhb (previous version) Sponsored by: Mellanox Technologies MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D19646 Notes: svn path=/head/; revision=345963
* twsi: Use config_intrhook_oneshot instead of config_intrhook_establishEmmanuel Vadot2019-04-052-7/+1
| | | | | | | | | Suggested by: ian MFC after: 1 month X-MFC-With: 345948 Notes: svn path=/head/; revision=345951
* twsi: Add interrupt modeEmmanuel Vadot2019-04-053-25/+283
| | | | | | | | | | | | | | | | | | | Add the ability to use interrupts for i2c message. We still use polling for early boot i2c transfer (for PMIC for example) but as soon as interrupts are available use them. On Allwinner SoC >A20 is seems that polling mode is broken for some reason, this is now fixed by using interrupt mode. For Allwinner also fix the frequency calculation, the one in the code was for when the APB frequency is at 48Mhz while it is at 24Mhz on most (all?) Allwinner SoCs. We now support both cases. While here add more debug info when it's compiled in. Tested On: A20, H3, A64 MFC after: 1 month Notes: svn path=/head/; revision=345948
* if_muge: use NULL not 0 for DRIVER_MODULE pointer argsEd Maste2019-04-041-2/+2
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=345889
* cpsw: use `phy-handle` in FDT to find PHY addressEd Maste2019-04-031-0/+3
| | | | | | | | | | | | | | | | | | | | In r337703 DTS files were updated to Linux 4.18, including Linux commit 4d8b032d3c03f4e9788a18bbb51b10e6c9e8a56b which removed the `phy_id` property from am335x-bone-common (as the property was deprecated). Use `phy-handle` via fdt_get_phyaddr, keeping the existing code as a fallback for old DTBs. PR: 236624 Submitted by: manu, Gerald Aryeetey <aryeeteygerald_rogers.com> Reported by: Gerald Aryeetey Reviewed by: manu MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19814 Notes: svn path=/head/; revision=345855
* Add a cv_wait to the TPM2.0 harvesting functionMarcin Wojtas2019-04-031-0/+2
| | | | | | | | | | | | | | | Harvesting has to compete for the TPM chip with userspace. Before this change the callout could hijack an unread buffer causing a userspace call to the TPM to fail. Submitted by: Kornel Duleba <mindal@semihalf.com> Reviewed by: delphij Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D19712 Notes: svn path=/head/; revision=345842
* ioat(4) should use bus_dma(9) for the operation source and destinationTycho Nightingale2019-04-022-15/+232
| | | | | | | | | | | addresses Reviewed by: cem Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19725 Notes: svn path=/head/; revision=345813
* ioatcontrol(8) could exercise 8k-aligned copy with page-break, crc andTycho Nightingale2019-04-022-1/+28
| | | | | | | | | | | crc-copy modes. Reviewed by: cem Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19780 Notes: svn path=/head/; revision=345812
* cxgbe(4): Add a flag to indicate that bits in interrupt cause but not inNavdeep Parhar2019-04-021-47/+82
| | | | | | | | | | | | | | | | interrupt enable are not fatal. The firmware sets up all the interrupt enables based on run time configuration, which means the information in the enables is more accurate than what's compiled into the driver. This change also allows the fatal bits to be updated without any changes in the driver in some cases. MFC after: 1 week Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=345810
* ipmi: Fixes for ipmi_opal(powernv)Justin Hibbits2019-04-021-1/+12
| | | | | | | | | | | | | | | * Crank the OPAL state machine during the receive loop, to make sure the pollers are executed * Add a proper detach function, so the module can be unloaded and reloaded at runtime. It still doesn't reliably work 100% of the time on POWER9, and it appears timing and/or cache related. It may work on POWER8 now. MFC after: 2 weeks Notes: svn path=/head/; revision=345791
* Devices behind downstream bridges should still get DMAR protection.Tycho Nightingale2019-04-011-0/+22
| | | | | | | | | Reviewed by: kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19717 Notes: svn path=/head/; revision=345777
* Use information about max data size that the controller is able to operateIlya Bakulin2019-04-011-0/+14
| | | | | | | | | | | | | | Using DFLTPHYS/MAXPHYS is not always OK, instead make it possible for the controller driver to provide maximum data size to MMCCAM, and use it there. The old stack already does this. Reviewed by: manu Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D15892 Notes: svn path=/head/; revision=345775
* When using the force option to shut down a memory-disk device,Kirk McKusick2019-03-311-4/+20
| | | | | | | | | | | | | | | | | | | | | | | I/O operations already in its queue were not being properly drained. The GEOM framework does the queue draining, but the device driver needs to wait for the draining to happen. The waiting is done by adding a g_md_providergone() function to wait for the I/O operations to finish up. It is likely that every GEOM provider that implements orphaning attached GEOM consumers needs to use the "providergone" mechanism for this same reason, but some of them do not do so. Apparently Kenneth Merry (ken@) added the drain for just such races, but he missed adding it to some of the device drivers that needed it. Submitted by: Chuck Silvers Reviewed by: imp Tested by: Chuck Silvers MFC after: 1 week Sponsored by: Netflix Notes: svn path=/head/; revision=345758
* run(4): properly set F_DATAPAD radiotap flag if frame has padding betweenAndriy Voskoboinyk2019-03-311-4/+11
| | | | | | | | | | | | | | | | | | frame header and data. This will fix 'Mysterious OLPC stuff' for received frames and wrong CCMP / TKIP / data decoding for transmitted frames in net/wireshark dissector. While here, drop unneeded comment - net80211 handles padding requirements for Tx & Rx without driver adjustment. Tested with D-Link DWA-140 rev B3, STA mode. MFC after: 1 week Notes: svn path=/head/; revision=345754
* run(4): do not clear PROTECTED bit if frame was not decrypted by NIC.Andriy Voskoboinyk2019-03-311-2/+2
| | | | | | | | | Tested with D-Link DWA-140 rev B3, STA / MONITOR modes. MFC after: 1 week Notes: svn path=/head/; revision=345753
* uath(4), urtw(4): restart driver if device does not respond after Tx requestAndriy Voskoboinyk2019-03-312-2/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=345751