aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iwm/if_iwmvar.h
Commit message (Collapse)AuthorAgeFilesLines
* sys: Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-231-1/+0
| | | | | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/ Similar commit in current: (cherry picked from commit 71625ec9ad2a)
* iwm: improve rfkill handlingAndriy Gapon2020-05-201-0/+2
| | | | | | | | | | | | | | Previously the driver handled the bit within itself, but did not expose the state change to net80211 and interface layers. This change uses net80211 KPI for rfkill signaling. The code is modeled after similar code in iwn and wpi. Reviewed by: adrian MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24923 Notes: svn path=/head/; revision=361273
* iwm(4): Remove _mvm from the namespace.Mark Johnston2019-11-271-6/+6
| | | | | | | | | | | | | This was inherited from iwlwifi, which drives devices supported by both iwn(4) and iwm(4) in FreeBSD. In iwm(4) _mvm is meaningless, so remove it. OpenBSD made the same change a long time ago. No functional change intended. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=355144
* iwm: Implement the new receive path.Mark Johnston2019-11-071-6/+8
| | | | | | | | | | | | | This is the multiqueue receive code required for 9000-series chips. Note that we still only configure a single RX queue for now. Multiqueue support will require MSI-X configuration and a scheme for managing a global pool of RX buffers. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354508
* iwm: Simplify fw_has_{api,capa}().Mark Johnston2019-11-071-14/+12
| | | | | | | | | | No functional change intended. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354494
* iwm: Remove a couple of unused fields from the softc.Mark Johnston2019-11-071-4/+0
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354493
* Fix ieee80211_radiotap(9) usage in wireless drivers:Andriy Voskoboinyk2019-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | - Alignment issues: * Add missing __packed attributes + padding across all drivers; in most places there was an assumption that padding will be always minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) - padding was just missing. * Add __aligned(8) attribute for all Rx radiotap headers since they can contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so just drop the attribute here. Refresh ieee80211_radiotap(9) man page accordingly. - Since net80211 automatically updates channel frequency / flags in ieee80211_radiotap_chan_change() drop duplicate setup for these fields in drivers. Tested with Netgear WG111 v3 (urtw(4)), STA mode. MFC after: 2 weeks Notes: svn path=/head/; revision=344990
* iwm - Update alive response handling, add v4 and remove old versions.Kyle Evans2019-01-241-1/+1
| | | | | | | | Submitted by: Augustin Cavalier <waddlesplash@gmail.com> (Haiku) Obtained from: DragonFlyBSD (3820e2bf3331ced3541d1811a38c5a5136dfab93) Notes: svn path=/head/; revision=343388
* iwm - Clear Time Event active state, when receiving End Notification.Kyle Evans2019-01-241-0/+6
| | | | | | | | | | | | | | | | * This hopefully avoids some firmware panics, I was occasionally seeing, when iwm disconnects upon losing signal to an access point at some point. * This is synchronizing the if_iwm_time_event.c file a bit more from the corresponding Linux iwlwifi/mvm/time-event.c. Taken-From: Linux iwlwifi Submitted by: Augustin Cavalier <waddlesplash@gmail.com> (Haiku) Obtained from: DragonFlyBSD (e8cb71584a6a72232c13151d60e57f7f229220eb) Notes: svn path=/head/; revision=343384
* iwm - Improve firmware Time Event handling.Kyle Evans2019-01-241-0/+4
| | | | | | | | | | | | | * This is a mix of the OpenBSD Git 7fd9664469d1b717a307eebd74aeececbd3c41cc change, and syncing with the Linux iwlwifi code. Taken-From: Linux iwlwifi, and OpenBSD Submitted by: Augustin Cavalier <waddlesplash@gmail.com> (Haiku) Obtained from: DragonFlyBSD (706a3044afd27c3fecfdf57bec1695310e53e228) Notes: svn path=/head/; revision=343383
* iwm - Track firmware state better, and improve handling in iwm_newstate().Kyle Evans2019-01-241-0/+4
| | | | | | | | | | | | | | | | | | | | | * This avoids firmware resets in all the cases in iwm_newstate(). Instead iwm_bring_down_firmware() is called, which tears down all the STA connection state, according to the sc->sc_firmware_state value. * Improve the behaviour of the LED blinking a bit, so it only blinks when there really is a wireless scan going on. * Print the newstate arg in debug output of iwm_newstate(), to help in debugging. This is inspired by the firmware state maintaining change in OpenBSD's iwm, by stsp@openbsd.org (OpenBSD Git 0ddb056fb7370664b1d4b84392697cb17d1a414a). Submitted by: Augustin Cavalier <waddlesplash@gmail.com> (Haiku) Obtained from: DragonFlyBSD (8a41b10ac639d0609878696808387a6799d39b57) Notes: svn path=/head/; revision=343381
* if_iwm - Configure the PCIe LTR, fix PCI express capability accesses.Kyle Evans2019-01-241-0/+2
| | | | | | | | | | Taken-From: Linux iwlwifi Submitted by: Augustin Cavalier <waddlesplash@gmail.com> (Haiku) Obtained from: DragonFlyBSD (08a7ad5a5ff65aaaf2df6a609be7a4e1df43efc3) Notes: svn path=/head/; revision=343379
* iwm - Reduce gratuitous differences with Linux iwlwifi in struct naming.Kyle Evans2019-01-241-7/+11
| | | | | | | | | | * Rename some structs and struct members for firmware handling. Submitted by: Augustin Cavalier <waddlesplash@gmail.com> (Haiku) Obtained from: DragonFlyBSD (4b1006a6e4d0f61d48c67b46e1f791e30837db67) Notes: svn path=/head/; revision=343377
* if_iwm - Move iwm_read_firmware() call into iwm_attach().Kyle Evans2019-01-241-10/+0
| | | | | | | | | | | | | | | | | | | | | | * We should load the firmware exactly once before the driver really initializes the hardware the first time, and unload it at detach time. There is no need to retrieve the firmware during execution of iwm_mvm_load_ucode_wait_alive(), we should make sure we already have the firmware data at hand before that. * The existing sc_preinit_hook code fails to deal with the case where if_iwm is loaded by the loader (or is statically linked) and the firmware needs to be loaded from disk. So we can just call iwm_read_firmware() from iwm_attach() directly. * A separate solution will have to be added to properly defer the firmware loading during bootup, until the necessary filesystem is mounted. Submitted by: Augustin Cavalier <waddlesplash@gmail.com> (Haiku) Obtained from: DragonFlyBSD (0104ee1f4cb6a2313c00c2526c6ae98d42e5041d) Notes: svn path=/head/; revision=343375
* if_iwm - Update firmware rs table, instead of indexing the table in tx cmds.Kyle Evans2019-01-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | * Rather than providing a non-zero index into the firmware RS table, we should always use index 0 and update the firmware RS table whenever our chosen tx rate for data-frames changes. * Send IWM_LQ_CMD updates when the tx rate gets updated by the net80211 rate control (which is after we tell the tx status to the net80211 rate-control in iwm_mvm_rx_tx_cmd_single()). * Disregard frames transferred with a different tx rate than the currently selected rate for the rate-control calculations. This way we avoid counting management frames (which are sent at a slow, and fixed rate), as well as frames we added to the tx queue just before a new IWM_LQ_CMD update took effect. Submitted by: Augustin Cavalier <waddlesplash@gmail.com> (Haiku) Obtained from: DragonFlyBSD (5d6b465e288ac5b52d7115688d4e6516acbbea1c) Notes: svn path=/head/; revision=343373
* [iwm] Sync statistics API definitions with Linux iwlwifi.Adrian Chadd2017-07-261-1/+1
| | | | | | | Obtained from: dragonflybsd.git 75895a53a9c1ba60d75be9b4bf6e49a37f91a7cf Notes: svn path=/head/; revision=321509
* [iwm] Check for lar_disable tunable, and lar_enabled flag from NVM.Adrian Chadd2017-06-041-0/+1
| | | | | | | | | | | | | | * LAR can be disabled with the hw.iwm.lar.disable tunable now. * On Family 8000 devices we need to check the lar_enabled flag from nvm_data in addition to the TLV_CAPA_LAR_SUPPORT flag from the firmware. * Add a separate IWM_DEBUG_LAR debugging flag. Obtained from: dragonflybsd.git 0593e39cb295aa996ecf789ed4990c3b255f1770 Notes: svn path=/head/; revision=319578
* [iwm] Move Smart Fifo handling into if_iwm_sf.c, sync with Linux iwlwifi.Adrian Chadd2017-06-041-0/+3
| | | | | | | | | | | | * This change also fixes a possible issue in the existing smart-fifo code, which set the IWM_SF_CFG_DUMMY_NOTIF_OFF bit on AC8260 chipsets, although that's only used in iwlwifi for Family 8000 chipsets connected via SDIO interface. Obtained from: Dragonflybsd.git cb650b01526b0aeef3c4307d926e7f1428997d50 Notes: svn path=/head/; revision=319577
* [iwm] Make powersaving more similar to Linux iwlwifi behaviour.Adrian Chadd2017-05-121-0/+3
| | | | | | | | | | | | | | | | * Add a per-vap ps_disabled flag, and use it for a workaround which fixes an association issue when powersaving is enabled. * Compute flag that should correpsond to the mvmif->bss_conf.ps flag in Linux's iwlwifi (e.g. this disallows powersaving when not associated yet). Inspired-By: Linux iwlwifi Obtained from: dragonflybsd.git dc2e69bdfe8c9d7049c8a28da0adffbfbc6de5c0 Notes: svn path=/head/; revision=318228
* [iwm] Properly implement iwm_wme_update callback function.Adrian Chadd2017-05-121-0/+13
| | | | | | | | | | | | | | | | | | | | | * Inspired by iwn(4) and Linux iwlwifi. * Read wme parameters into a buffer within struct iwm_vap in iwm_wme_update(). * If we aren't associated yet, the new settings will soon be sent by iwm_mvm_mac_ctxt_changed() during association. * If we are already associated, explicitly call iwm_mvm_mac_ctxt_changed() from iwm_wme_update() to send the new settings to the firmware. * Change iwm_mvm_ac_to_tx_fifo mapping, to fit the freebsd net80211 WME stream class numbering, instead of Linux's enum ieee80211_ac_numbers. Obtained from: dragonflybsd.git b8bd6cd746d1f45e616ccfcbeed06dfe452a1108 Notes: svn path=/head/; revision=318219
* [iwm] Process multiple frames per RX buffer.Adrian Chadd2017-05-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | * Factor out iwm_handle_rxb() function from iwm_notif_intr(). * Removing the IWM_FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK flag allows the device to put multiple frames (both command responses and 80211 frames) into a single RX buffer. * Uses m_copym() to split up the receive buffers when multiple 80211 frames are received in one RX buffer. The effect is basically the same as when using m_split(), but we want to keep the original mbuf around when calling iwm_mvm_rx_rx_mpdu() to make error handling a bit easier for now. * Contains a small optimization to avoid the m_copym() when only a single 80211 frame is received in one RX buffer (i.e. matching the existing behaviour). Obtained from: dragonflybsd.git b5eb43f0280bbcfd26af51cf5a4b8e8ff3590b67 Notes: svn path=/head/; revision=318218
* [if_iwm] Partly sync if_iwm_binding.c to Linux iwlwifi code.Adrian Chadd2017-05-121-0/+3
| | | | | | | | | | | | | | | | | * Store macid and color values in struct iwm_vap, to avoid hardcoded constants a bit. * Add iwm_mvm_binding_remove_vif() function (will be used in disconnecting from an access point without resetting the whole device). * Not adding code from Linux iwlwifi yet, to handle one PHY context to be bound to several VAPs/virtual-interfaces, it's definitely not needed in the near future. Obtained from: dragonflybsd.git f16ef74977e51e1bfc7a625dd18b98b02158e0e5 Notes: svn path=/head/; revision=318212
* [iwm] Move in_phyctxt from struct iwm_node to phy_ctxt in struct iwm_vap.Adrian Chadd2017-05-091-1/+2
| | | | | | | | | * This better matches how things are organized in Linux's iwlwifi. Obtained from: dragonflybsd.git 0cf16dd2e0e09a3e5140e50222ac2e69bcdb19a2 Notes: svn path=/head/; revision=318013
* [iwm] Add basic powermanagement support via ifconfig wlan0 powersave.Adrian Chadd2017-05-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The DEVICE_POWER_FLAGS_CAM_MSK flag was removed in the upstream iwlwifi in Linux commit ceef91c89480dd18bb3ac51e91280a233d0ca41f. * Add sc_ps_disabled flag to struct iwm_softc, which corresponds to mvm->ps_disabled in struct iwl_mvm in Linux iwlwifi. * Adds a hw.iwm.power_scheme tunable which corresponds to the power_scheme module parameter in Linux iwlwifi. Set this to 1 for completely disabling power management, 2 (default) for balanced powermanagement, and 3 for lowerpower mode (which does dtim period skipping). * Imports the constants.h file from iwlwifi as if_iwm_constants.h. * This doesn't allow changing the powermanagement setting while connected, also one can only choose between enabled and disabled powersaving with ifconfig (so switching between balanced and low-power mode requires rebooting to change the tunable). * After any changes to powermanagement (i.e. "ifconfig wlan0 powersave" to enable powermanagement, or "ifconfig wlan0 -powersave" for disabling powermanagement), one has to disconnect and reconnect to the accespoint for the change to take effect. Obtained from: dragonflybsd.git d7002a7990d077c92585978ea998474af50f91e0 Notes: svn path=/head/; revision=318005
* [iwm] Enable Energy Based Scan (EBS).Adrian Chadd2017-03-251-0/+2
| | | | | | | | | | | This can significantly reduce scan duration thus saving time and power. EBS failure reported by FW disables EBS for current connection. It is re-enabled upon new connection attempt on any WLAN interface. Obtained from: dragonflybsd.git 89f579e9823a5c446ca172cf82bbc210d6a054a4 Notes: svn path=/head/; revision=315925
* [iwm] Make ucode capabilities and api flags handling more like iwlwifi.Adrian Chadd2017-03-231-6/+24
| | | | | | | Obtained from: dragonflybsd.git 757eecf0e6c92745aa2eee95811e573c8300850e Notes: svn path=/head/; revision=315784
* [iwm] Add support for Firmware paging, needed for newer 8000C firmware.Adrian Chadd2017-02-241-0/+18
| | | | | | | | | | * Uses the IWM_FW_PAGING_BLOCK_CMD firmware command to tell the firmware what memory ranges to use for paging. Obtained from: dragonflybsd.git 8a5b199964f8e7bdb00039f0b48817a01b402f18 Notes: svn path=/head/; revision=314192
* [iwm] Move struct iwm_cfg chipset configs to if_iwm_7000.c and _8000.cAdrian Chadd2017-02-221-23/+1
| | | | | | | | | | | | | * This is more similar to how code/definitions are distributed in Linux's iwlwifi. * This should make recognizing new chipset variants, and adding additional flags from the Linux iwlwifi code easier, without blowing up if_iwm.c Obtained from: dragonflybsd.git 27d11320e707d2c41424efc1983762f6799941d6 Notes: svn path=/head/; revision=314076
* [iwm] Get rid of unneeded IWM_FWDMASEGSZ and IWM_FWMAXSIZE constantsAdrian Chadd2017-02-221-5/+0
| | | | | | | | | * We only need IWM_FH_MEM_TB_MAX_LENGTH bytes for the fw_dma memory. Obtained from: dragonflybsd.git f414b8da30816705e32573cc58097cacac34f161 Notes: svn path=/head/; revision=314069
* [iwm] Sync IWM_MVM_ALIVE waiting and start_fw handling with iwlwifi.Adrian Chadd2017-02-221-12/+9
| | | | | | | | | | | | | | | | | * Use the notification wait API, like it's done in the Linux iwlwifi code, to wait for the IWM_MVM_ALIVE notification. * This also should fix some firmware load interrupt issues, and errors in the nic lock using. Tested: * (adrian) Intel 7260, STA mode Obtained from: dragonflybsd.git a7697ea01c11fd493aec52260a02f31df680eb91 Notes: svn path=/head/; revision=314066
* [iwm] Synchronize firmware loading code with Linux iwlwifi.Adrian Chadd2017-02-221-5/+9
| | | | | | | | | | * While there, rename some functions to match the names and functionality of the similarly named functions in Linux iwlwifi. Obtained from: dragonflybsd.git e98ee77a816bfd8b4912047b93dfb2c560788f24 Notes: svn path=/head/; revision=314065
* [iwm] Implement apmg_wake_up_wa workaround properly for 7000 family.Adrian Chadd2017-02-081-0/+5
| | | | | | | | | | | | | | | * Add iwm_pcie_set_cmd_in_flight() and iwm_pcie_clear_cmd_in_flight() helper methods. * Use ring->queued tracking in the command queue to set/clear the cmd_hold_nic_awake bit at the right points. Taken-From: Linux iwlwifi Obtained from: DragonflyBSD commit ce43f57f5308b579ea21e8a5a29969114ba2247d Notes: svn path=/head/; revision=313415
* [iwm] Use iwm_mvm_scan_stop_wait to properly abort scans.Adrian Chadd2017-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | * Add IWM_FLAG_SCAN_RUNNING to sc->sc_flags to track whether the firmware is currently running a scan, in order to decide wheter iwm_scan_end needs to abort a running scan. * In iwm_scan_end, if the scan is still running, we now abort it, in order to keep the firmware scanning state in sync. * Try to make things a bit simpler, by reacting on the IWM_SCAN_OFFLOAD_COMPLETE and IWM_SCAN_COMPLETE_UMAC notifications, instead of IWM_SCAN_ITERATION_COMPLETE and IWM_SCAN_ITERATION_COMPLETE_UMAC. This should be fine since we always only tell the firmware to do a single scan iteration anyway. Obtained from: DragonflyBSD commit 1f249c981c4e89e7cde1836a75b61cac36dc7ac5 Notes: svn path=/head/; revision=313414
* [iwm] Use notification wait API to wait for calibration to complete.Adrian Chadd2017-02-061-1/+0
| | | | | | | | | | | Tested: * 7260, STA mode (2g, 5g) Obtained from: DragonflyBSD commit 1e0cf8ec6fcd77978f5336297ece61a415790f84 Notes: svn path=/head/; revision=313325
* [iwm] Add implementation of the notification wait api from iwlwifi.Adrian Chadd2017-02-061-0/+2
| | | | | | | | Obtained from: Linux iwlwifi Obtained from: DragonflyBSD commit 94dc1dadceb57b688036211262d678bc6bbdde37 Notes: svn path=/head/; revision=313322
* [iwm] Store paging_mem_size field in firmware image information struct.Adrian Chadd2017-02-061-0/+1
| | | | | | | Obtained from: DragonflyBSD commit a8524cc6c440e5ce9490ba2b0507c99ff6777c6d Notes: svn path=/head/; revision=313316
* [iwm] Get rid of some gratuitous constant renaming wrt. Linux iwlwifi.Adrian Chadd2017-02-061-6/+16
| | | | | | | | | | | | * IWM_UCODE_SECT_MAX -> IWM_UCODE_SECTION_MAX * IWM_UCODE_TYPE_* -> IWM_UCODE_* (except for IWM_UCODE_TYPE_MAX which stays). Obtained from: DragonflyBSD commit ff4d1fc3ed002c9fb362423da6c45d711b65658a Notes: svn path=/head/; revision=313315
* [iwm] Sync valid_tx_ant and valid_rx_ant mask handling with iwlwifi.Adrian Chadd2017-02-061-1/+4
| | | | | | | | | | | | | | | * This fixes the phy_cfg field sent in the iwm_send_phy_cfg_cmd() command, which wasn't taking into account the valid_rx_ant and valid_tx_ant masks from nvm_data before. Tested: * 7260, STA mode, 2G and 5G Obtained from: DragonflyBSD commit cbb82693c18fd71b4eb86855b82d03995f352d65 Notes: svn path=/head/; revision=313314
* [iwm] Use chipset configuration structs like iwlwifi does.Adrian Chadd2017-02-061-9/+22
| | | | | | | | | | | | | | | | | * This makes it a bit easier to factor out common parts for e.g. the 7000 chipset family. * Add iwm7265d config, and recognize the 7265D chipset variant via the hardware revision. Tested: * 7260, STA mode (2ghz) Obtained from: Dragonflybsd commit cc8d6ccf5583fd45964f3bde9b057ee4f834c0e0 Notes: svn path=/head/; revision=313312
* [iwm] Sync nvm parsing code with Linux iwlwifi.Adrian Chadd2017-02-061-7/+6
| | | | | | | | | | | | | | | | | | | | | | * sc->sc_nvm becomes sc->nvm_data and is now a pointer instead of an inlined struct. * Add sc->eeprom_size and sc->nvm_hw_section_num configuration values to struct iwm_softc. * For now continue to avoid negative error return-values, and use pointer variables for some return values, as before. * Continue to omit LAR (location aware regulatory) related code as well. Tested: * Intel 7260, STA mode (2GHz) Obtained from: dragonflybsd commit 39f8331b1a6f295291e08c377da12a8e7a5436c0 Notes: svn path=/head/; revision=313311
* [iwm] make sure we call iwm_detach_local() only once.Adrian Chadd2017-02-061-0/+1
| | | | | | | Obtained from: DragonflyBSD git ebd4ceab76a6f161362029cbfd08efaedaab0519 Notes: svn path=/head/; revision=313310
* [iwm] Sync if_iwm_phy_db code with Linux iwlwifi.Adrian Chadd2017-02-061-20/+1
| | | | | | | Obtained from: Dragonflybsd commit c1019b6bfff36c856f7b4fccbdf3bb13ac27750c Notes: svn path=/head/; revision=313309
* [iwm] The HW Revision stepping constants should be in if_iwmreg.h.Adrian Chadd2017-02-061-4/+0
| | | | | | | Obtained from: dragonflybsd 84292f0c38594c462c719c0e59da5908b93aba5f Notes: svn path=/head/; revision=313308
* net80211: ieee80211_ratectl*: switch to reusable KPIAndriy Voskoboinyk2016-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace various void * / int argument combinations with common structures: - ieee80211_ratectl_tx_status for *_tx_complete(); - ieee80211_ratectl_tx_stats for *_tx_update(); While here, improve amrr_tx_update() for a bit: 1. In case, if receiver is not known (typical for Ralink USB drivers), refresh Tx rate for all nodes on the interface. 2. There was a misuse: - otus(4) sends non-decreasing counters (as originally intended); - but ural(4), rum(4) and run(4) are using 'read & clear' registers to obtain statistics for some period of time (and those 'last period' values are used as arguments for tx_update()). If arguments are not big enough, they are just discarded after the next call. Fix: move counting into *_tx_update() (now otus(4) will zero out all node counters after every tx_update() call) Tested with: - Intel 3945BG (wpi(4)), STA mode. - WUSB54GC (rum(4)), STA / HOSTAP mode. - RTL8188EU (urtwn(4)), STA mode. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D8037 Notes: svn path=/head/; revision=306591
* [iwm] Remove dead fw_totlen from struct iwm_fw_sects; clean up struct ↵Imre Vadász2016-09-191-9/+0
| | | | | | | | | | | | | | | iwm_nvm_data. * No functional change, none of these values were ever read. * The values removed from struct iwm_nvm_data are only used for old dvm devices in Linux iwlwifi, and irrelevant to iwm hence. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7945 Notes: svn path=/head/; revision=306006
* [iwm] Remove unused field from iwm_rx_data. Use uint32_t instead of enum type.Imre Vadász2016-09-191-1/+0
| | | | | | | | | | | | | | | The wantresp field in struct iwm_rx_data has never been used for anything, so we can just delete it. Apparently struct iwm_sf_cfg_cmd was compiled correctly (using a 32bit value to represent the enum), but it still seems like a very bad idea to use an enum type in a __packed struct. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7930 Notes: svn path=/head/; revision=306000
* iwm(4) synchronize driver to DragonFlyBSD version and recent f/w update.Sean Bruno2016-07-261-18/+26
| | | | | | | | | Submitted by: Kevin Bowling (kevin.bowling@kev009.com) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D6967 Notes: svn path=/head/; revision=303327
* iwm(4): switch to ieee80211_runtask()Sean Bruno2016-07-251-1/+0
| | | | | | | | | Submitted by: Andiry Voskoboinyk (s3erios@gmail.com) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D5054 Notes: svn path=/head/; revision=303326
* [iwm] Fix up busdma use in the RX pathAdrian Chadd2016-06-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | When allocating a new mbuf or bus_dmamap_load()-ing it fails, we can just keep the old mbuf since we are dropping that packet anyway. Instead of doing bus_dmamap_create() and bus_dmamap_destroy() all the time, create an extra bus_dmamap_t which we can use to safely try bus_dmamap_load()-ing the new mbuf. On success we just swap the spare bus_dmamap_t with the data->map of that ring entry. Tested: Tested with Intel AC7260, verified with vmstat -m that new kernel no longer visibly leaks memory from the M_DEVBUF malloc type. Before, leakage was 1KB every few seconds while ping(8)-ing over the wlan connection. Submitted by: Imre Vadasz <imre@vdsz.com> Approved by: re@ Obtained from: DragonflyBSD.git cc440b26818b5dfdd9af504d71c1b0e6522b53ef Differential Revision: https://reviews.freebsd.org/D6742 Notes: svn path=/head/; revision=301845
* [iwm] add LED blinking for iwm hardware that supports it.Adrian Chadd2016-06-021-0/+1
| | | | | | | | Submitted by: Imre Vadasz <imre@vdsz.com> Obtained from: DragonflyBSD, Linux iwlwifi/mvm Notes: svn path=/head/; revision=301187