summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_iwmreg.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Offload CCMP (WPA2) encryption and decryption to iwm(4) hardware.stsp2020-05-181-12/+34
| | | | | | | | | | | | | | | | | | | | | This reduces CPU load during traffic bursts. Based on an older diff we had in CVS history, updated to work with newer firmware versions we use today. Tested on the following devices, with great support from several people: 3160 (stsp) 3168 (stsp) 7260 (jmatthew, tobhe) 7265 (stsp, procter, gonzalo) 8265 (benno, tb) 8260 (stsp, Liberto on bsd.network) 9260 (stsp, Jesper Wallin) 9560 (stsp) Not tested: 3165; these run the same firmware as 7265 so will likely be fine. I couldn't find a 3165 device in my pile. ok jmatthew@ (who also found a small bug in my diff)
* Fix wrong firmware API documentation comments for iwm(4) and iwx(4).stsp2020-05-151-2/+2
| | | | Both drivers currently use SCAN_CHANNEL_CFG_S_VER1, not VER2.
* Update iwm(4) firmware API documentation with respect to sequence numberstsp2020-03-051-8/+9
| | | | | | | | | | | | | | | related fields in Tx commands and responses: - IWM_AGG_TX_STATE_SEQ_NUM_MSK does not exist, remove it from documentation - In our case, iwm_agg_tx_status's "sequence" field contains the Tx queue ID and index of aggregated subframes, not sequence numbers. Update the struct definition accordingly. (This struct is not used yet.) - iwm_tx_resp and iwm_ba_notif contain frame header sequence control fields. Be explicit about this in documentation. I don't understand which frame the sequence control field in iwm_ba_notif corresponds to. Leave a comment about that. iwlwifi doesn't use this field.
* Add support for MSI-X. MSI-X allows establishing a number ofpatrick2019-11-261-1/+72
| | | | | | | | | | | | interrupt vectors and mapping events (RX on queues, commands, mgmt frames) to those vectors. For now we keep the existing behaviour, establish a single vector and map all events to it. Makes my Intel NUC 8i5BEH 9560 work Tested by jcs@ on a 9560 (w/ MSI-X) Tested by deraadt@ on a 9260 (w/ MSI-X) Tested by phessler@ on a 8260 (w/o MSI-X) ok stsp@
* Add support for 9260 and 9560 devices to iwm(4).stsp2019-11-181-8/+180
| | | | | | | | | | | | | | | | Joint work with patrick@ Parts lifted from FreeBSD's r354492, r354502, r354508, r354516, r354508. Firmware is available with fw_update(1) thanks to sthen@ 7265 device tested by myself (still works) 8260 device tested by phessler@ (still works) 9260 devices tested by Travis Cole and myself 9560 devices tested by jcs@, mlarkin@, kevlo@, guenther@ Some 9560 devices have known issues. Those are being worked on. ok patrick@
* Fix support for 3168 iwm(4) devices, and load new firmware for them.stsp2019-11-121-2/+16
| | | | | | Based on FreeBSD r345002 and Linux 44fd09dad5d2b78efbabbbbf623774e561e36cca. Tested for regressions by phessler@ (8260), kevlo@ (3165), and myself (7265) ok kevlo@
* Add support to iwm(4) for new umac scan API in newer firmware versions.stsp2019-11-081-28/+160
| | | | Tested by phessler@, Tracey Emery, and myself on 8260 and 8265.
* Add support to iwm(4) for ADD_STA commands used by newer firmware.stsp2019-11-081-2/+92
| | | | Tested by phessler@, Tracey Emery, and myself on 8260 and 8265.
* Support iwm(4) firmware images with ucode_api flags larger than 32 bits.stsp2019-11-041-11/+26
| | | | ok patrick@
* Sync iwm's SCD_QUEUE macros with iwlwifi.stsp2019-11-041-3/+3
| | | | | | | Our outdated copies of these had a bug. See Linux commit cb6bb128b73ae898d6ee0281c2b2644f70633d58 ok patrick@
* Add support for iwm firmware paging, required for newer 8k device firmware.stsp2019-11-041-1/+55
| | | | | | | Patch by Imre Vadasz Tested for regressions by phessler and Krystian Lewandowski No very obvious mistakes found by kettenis@ ok patrick@
* Have iwm(4) configure the PCIe LTR.stsp2019-10-281-1/+51
| | | | | | Patch by Imre Vadasz. Cross-check and pcireg.h tweak by kettenis@ ok patrick@
* Recognize IWM_DTS_MEASUREMENT_NOTIF_WIDE PHY_OP notification which willstsp2019-10-281-6/+17
| | | | | | | | | be generated by version 17 firmware. While at it, declare all known firmware command groups and all PHY_OPS subcomand ids. Patch by Imre Vadasz, with tweaks by me ok patrick@
* Get rid of version 1 of iwm's time event firmware API.stsp2019-10-281-51/+5
| | | | | | | | | All supported firmware versions support IWM_UCODE_TLV_FLAGS_TIME_EVENT_API_V2. Rename struct iwm_time_event_cmd_v2 to iwm_time_event_cmd, and remove helper functions for converting from V2 API structs to V1 versions. Patch by Imre Vadasz ok patrick@
* Remove a couple of unneeded IWM_UCODE_TLV_FLAGS_* flags:stsp2019-10-281-15/+1
| | | | | | | | | | | | | | | IWM_UCODE_TLV_FLAGS_PM_CMD_SUPPORT IWM_UCODE_TLV_FLAGS_NEWBT_COEX IWM_UCODE_TLV_FLAGS_BF_UPDATED IWM_UCODE_TLV_FLAGS_D3_CONTINUITY_API IWM_UCODE_TLV_FLAGS_STA_KEY_CMD IWM_UCODE_TLV_FLAGS_DEVICE_PS_CMD IWM_UCODE_TLV_FLAGS_SCHED_SCAN All supported firmware versions have these flags set. Patch by Imre Vadasz ok patrick@
* Remove unneeded IWM_UCODE_TLV_FLAGS_RX_ENERGY_API flag.stsp2019-10-281-3/+1
| | | | | | | | All supported firmware versions have this feature flag set. Remove now unneeded iwm_calc_rssi() function. Patch by Imre Vadasz. ok patrick@
* Use 0x6c as permanent ID for IWM_PHY_DB_CMD; remove incorrect comment.stsp2019-10-281-4/+2
| | | | | | Patch by Imre Vadasz. Matches Linux commit 176aa60bf148b5af4209ac323cef941dee76e390 by Sara Sharon. ok patrick@
* Remove unused DEFAULT_MAX_TX_POWER definition from if_iwmreg.h,stsp2019-10-281-3/+1
| | | | | | | | which had a value different from the IWL_DEFAULT_MAX_TX_POWER constant in Linux iwlwifi. Patch by Imre Vadasz. ok patrick@
* Add support for dynamic queue allocation (DQA) to iwm(4).stsp2019-10-181-2/+49
| | | | | | | | Required for new firmware images because the command queue index has changed. The driver remains compatible with our current firmware images for now. Tested by benno, jan, kevlo, florian, jmatthew, Tracey Emery ok jmatthew
* Support WPA2 CCMP encryption/decryption in hardware with iwm(4).stsp2019-08-081-3/+3
| | | | | | | We offload crypto operations for unicast data frames only. Based on an initial diff from procter@ Tested in snaps for almost a week. ok procter@ deraadt@
* Ignore 'fseq version mismatch' notifications from 8265 iwm(4) firmware.stsp2018-02-281-1/+5
| | | | | | Kills "iwm0: unhandled firmware response 0xff/0xb8000010 rx ring" dmesg spam. Patch by jes@posteo via tech@, who found the corresponding change in Linux: https://patchwork.kernel.org/patch/9869017/
* Fix a regression in iwm(4) which made 3165 devices unusable.stsp2017-05-031-2/+2
| | | | | | | | | | | When MIMO support was added several entries in the rate table index enum got a wrong value. On most devices the firmware ended up using a Tx rate different from the rate net80211 asked for (which is bad, but not fatal). But on 3165 devices which do not support MIMO the firmware rightly raised a fatal error whenever the driver mistakenly asked for a MIMO Tx rate. Reported by Georgios Pediaditis, Steve Throckmorton, and Kai Wirt on misc@ Thanks to benno@ for providing 3165 hardware I could use to debug this.
* Implement support for multiple packets per receive DMA buffer in iwm(4).stsp2017-04-241-2/+13
| | | | | | | | | | We can now clear SINGLE_FRAME_MSK in the receive configuration register. Linux has not set this bit in years, and Dragonfly stopped setting it in commit b5eb43f0280bbcfd26af51cf5a4b8e8ff3590b67. This is a prerequisite for monitor mode since the firmware seems to ignore the SINGLE_FRAME_MSK bit while running in monitor mode and sends us garbage. Tested on 7260, 7265, and 8260 devices.
* Add 8265 and 3168 support. Both cards need new firmware files which currentlyclaudio2017-04-041-1/+2
| | | | | | | | need to be installed by hand until the iwm-firmware package has been updated. This includes handling (by ignoring) of IWM_UCODE_TLV_FW_MEM_SEG and IWM_DEBUG_LOG_MSG firmware commands. Mostly stolen from dragonflybsd. With this in the X270 has working ethernet and wifi. Commit! deraadt@
* Update the struct iwm_scan_results_notif to FW Api version 3, and removestsp2017-01-311-39/+4
| | | | | | | | | | | | the unused enum iwm_scan_complete_status status codes. This corresponds to parts of the Linux iwlwifi commits 1083fd7391e989be52022f0f338e9dadc048b063 and 75118fdb63496e4611ab50380499ddd62b9de69f. No functional change, since struct iwm_scan_results_notif isn't accessed in iwm at the moment. Patch by Imre Vadasz.
* Remove a couple of definitions from if_iwmreg.h which were neverstsp2017-01-291-12/+1
| | | | | | | used and which were removed from iwlwifi in Linux git commit 76f8c0e17edc6eba43f84952e5a87c7f50f69370. Patch by Imre Vadasz.
* In iwm(4), remove old deprecated scan API definitions which have beenstsp2017-01-291-286/+1
| | | | | | | | | | | | | unused since the upgrade to version 16 firmware. Also, matching the iwlwifi code, use IWM_DEFAULT_SCAN_CHANNELS (== 40) instead of IWM_MAX_NUM_SCAN_CHANNELS (== 36) as default value for sc->sc_capa_n_scan_channels. Mostly matches the header-file changes in Linux iwlwifi git commit 1f9403863c080478ad78247c89b018e95bdfb027. Patch by Imre Vadasz.
* Add support for MIMO Tx rates (MCS 8-15) to iwm(4).stsp2016-12-101-17/+22
| | | | | | | | | | | | | | The nominal maximum Tx rate is now 144Mbit/s (MCS 15, 20MHz channel, SGI). In practice it's more around 30Mbit/s, though. The most significant limiting factor is probably lack of Tx aggregation support. (Due to protocol overhead, reaching the nominal max is pretty much impossible anyway. When shopping wifi devices, do not believe what stickers on the box are saying; full of lies!) But APs will send us aggregates, so Rx should be faster than Tx (which was already the case, just less pronounced). Tested by phessler@, bmercer@, tb@ ok tb@
* Set iwm's RTS retry limit to a more reasonable value. Prevents small framesstsp2016-11-191-2/+2
| | | | | | | from getting stuck in the firmware's Tx queue for a long time behind other frames large enough to trigger RTS but not making it out (e.g. due to bad channel conditions). ok tb@
* Mostly cosmetic tweaks to macros involved in iwm(4) power-saving features.stsp2016-09-201-45/+15
| | | | | Remove the unused struct iwm_powertable_cmd. Fix typos in comments. Add macros for default power-save Tx/Rx timeout values (from iwlwifi).
* iwm(4) inherited the 'MVM' prefix in many of its symbol names from iwlwifi.stsp2016-09-101-91/+91
| | | | | | | | Linux iwlwifi implements support for iwn(4) chips in the 'DVM' driver, and support for iwm(4) chips in the 'MVM' driver. In OpenBSD the 'MVM' prefix is redundant, so we can remove it to shorten many lines and reduce noise: s/iwm_mvm_/iwm_/g
* Move IWM_NVM_* macro definitions from if_iwm.c to if_iwmreg.h.stsp2016-09-101-1/+83
|
* Use macros for iwm(4) bitmask definitions instead of enums.stsp2016-09-031-1179/+968
| | | | ok mpi benno
* Although this doesn't seem to cause any issue at the moment, using anstsp2016-09-021-3/+3
| | | | | enum type in a __packed struct should be avoided. Patch by Imre Vadasz
* Disable the beacon filter in iwm(4). This allows beacons to pass through tostsp2016-07-201-2/+2
| | | | | | the stack while associated, which in turn makes it possible to keep track of HT protection changes. ok mpi@
* Add support for Intel Wireless 8260 devices to iwm(4).stsp2016-05-281-1/+345
| | | | | | | Firmware has been available in fw_update(1) for some time (thanks sthen!). Tested by robert, reyk, Imre Vadasz, Bryan Vyhmeister. Thank you, Emmanuel Grumbach, for helping me diagnose issues during development. ok kettenis
* Update iwm(4) to firmware API 16 and enable RTS/CTS frame protection.stsp2016-05-251-138/+860
| | | | | | | | | Requires new firmware! Which has been available in fw_update(1) for some time. With helpful hints from Emmanuel Grumbach and contributions from Imre Vadasz. Tested verbatim by phessler@, jasper@, gilles@. Tested as part of a larger diff by reyk@, robert@, Imre Vadasz, and Bryan Vyhmeister. Earlier version tested by many. Also passed by kettenis@ very early on.
* Fix several nitpicks in iwm(4).stsp2016-05-181-3/+49
| | | | | | | | | | | | | Move some declarations to if_iwmreg.h so we can use iwm_phy_db_* prototypes. Remove redundant declaration of iwm_send_phy_db_data(). Remove pointless iwm_fw_alive(); just call iwm_post_alive() directly. Simplify iwm_prepare_card_hw() and iwm_mvm_add_sta(). Return timeout error from iwm_apm_init(). Print a message when init (i.e. boot) firmware fails to load. Remove some commented-out code which wouldn't compile anyway. Move iwm_mvm_tx_fifo to if_iwmreg.h to match better where Linux puts it. ok kettenis@ mpi@
* Make sure the maximum iwm(4) firmware command payload size fits intostsp2016-02-071-2/+2
| | | | | the 12 bits available for it in struct iwm_tfd_tb.hi_n_len. Patch by Imre Vadasz via tech@
* Add initial 802.11n support to the iwm(4) driver.stsp2015-12-141-8/+52
| | | | | | | | | | | | | | | | | | | Adds support for HT MCS 0-7 (theoretical limit 65 Mbit/s) and the reception of A-MSDU and A-MPDU aggregated frames. None of the optional 11n features are supported for now. MIMO, 40Mhz channels, short guard interval, etc. are left for future work. And we're not sending A-MSDU or A-MPDU frames yet either. Tested with various 11a/b/g/n access points. With some APs I'm seeing a noticable increase in throughput, especially on 5Ghz. Also, fix automatic rate selection by using the current Tx rate selected by AMRR as the upper bound for the firmware's rate table and updating the firmware's table whenever AMRR switches Tx rate, rather than setting the table just once after association and ignoring AMRR updates. ok mpi@ krw@ (earlier version), ok jasper@
* a couple comment typosmmcc2015-12-101-3/+3
|
* When iwm(4) moves to AUTH state it asks the firmware for a "time event" tostsp2015-12-081-1/+38
| | | | | | | | | | | | | | | prevent it from moving off-channel during association. The firmware issues interrupts at beginning and end of the time event. The driver tried detecting the beginning with a tsleep() in the newstate task followed by a wakeup() from the interrupt handler. However, sometimes the newstate task did not get scheduled until the time event had already passed, and association was aborted. In rare cases the newstate task would even sleep forever and the iwm(4) interface would stop working until reboot. Fix these issues by issuing the time event and continuing association without checking for a "go" from the firmware. Our kernel does not provide the scheduling guarantees required for such precise synchronization so association is more likely to fail with the additional check than without. ok mpi@ tedu@
* Declare macros for antenna flags. Lifted from Linux iwlwifi.stsp2015-11-151-3/+12
|
* In iwm(4), correctly size and map the mbuf used for large firmware commands.stsp2015-10-161-1/+2
| | | | | Fixes occasional firmware errors while bringing the interface up or scanning. ok phessler@
* Remove comments referring to Linux iwlwifi source filenames from iwm(4).stsp2015-06-151-97/+1
| | | | | Linux is a moving target so these comments provide little value. Discussed with kettenis and deraadt.
* More iwm(4) whitespace fixes from NetBSD.stsp2015-02-231-19/+19
|
* Add bpf(4) support to iwm(4). Makes tcpdump -i iwm0 work. Based on iwn(4).stsp2015-02-061-5/+6
| | | | ok deraadt
* Add iwm(4), a new driver for Intel 7260 wifi cards.stsp2015-02-061-0/+5304
Based on iwn(4) and Linux iwlwifi (which is dual BSD/GPLv2 licenced). Created by Fixup Software Ltd. for genua mbh, who then passed on the code base to the OpenBSD project. The genua version of this driver was written for OpenBSD 5.4; ported to -current by myself, phessler@, and deraadt@. So far, we've done semantic and stylistic cleanup without functional changes. The driver is functional but has some known issues which will be worked on in-tree. Requires iwm firmware which is available in ports thanks to sthen@. ok deraadt@ phessler@