aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iwm
Commit message (Collapse)AuthorAgeFilesLines
* iwm: assign sequence numbers even if we ask the firmware to overrideAdrian Chadd2025-09-211-0/+4
| | | | | | | | | | | I've had a report of this breaking without the sequence number assigned (from glebius@) so, similar to iwx work, let's just re-add it here. Reported by: glebius Differential Revision: https://reviews.freebsd.org/D52664 Reviewed by: glebius Tested by: glebius
* net80211: convert the rest of the native net80211 drivers to SEQNO_OFFLOADAdrian Chadd2025-09-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Convert the rest of the drivers to implement driver/offloaded sequence number handling. * For drivers that implement their own sequence number space handling for A-MPDU, only call ieee80211_output_seqno_assign() if the frame isn't tagged with M_AMPDU_MPDU, which mirrors the original net80211 sequence number behaviour. (Except of course, the assignment is now happening during final encap/transmit, not early in encap.) Locally tested (sta mode): * ath * iwn * bwi * bwn * iwm * otus * ral Differential Revision: https://reviews.freebsd.org/D50772 Okayed by: bz
* net80211: change ieee80211_ratectl_rate() to not return a rixAdrian Chadd2025-02-261-6/+26
| | | | | | | | | | | | | | | | | | | | | | There are only a few places where the returned rix is used: * linuxkpi - logging * bwi/bwn - used for finding a fallback rate to choose, which honestly should be returned by the ratectl API * iwm - building the rateset to program into firmware Everyone else uses the dot11rate value in ni->ni_txnode. This is a precursor for VHT and later rate support; where currently there aren't rate tables in ieee80211_phy.c for VHT and later rates. Although it's likely doable to add tables for VHT, 11ax and MU-OFDMA (HE) rates are sufficiently larger/different to just not fit in the current scheme without more refactoring. Differential Revision: https://reviews.freebsd.org/D48603 Reviewed by: bz, thj
* sys: convert ni->ni_txrate references use to the new net80211 APIAdrian Chadd2025-02-261-3/+5
| | | | | | | | | | | This just mechanically converts things. * For linuxkpi, it was just used for display. * For uath, it was just used for display, as firmware doesn't report it up. Differential Revision: https://reviews.freebsd.org/D48602 Reviewed by: bz, thj
* iwm: add sku_cap_mimo_disable; populate sku_cap_11n_enableAdrian Chadd2025-01-172-1/+3
| | | | | | | | | | | | | | This is a flag to be used to disable >1 antenna support, even if the radio supports it. Also populate sku_cap_11n_enable, which indicates HT is available. It's a no-op right now; it's one of the requirements for properly configuring HT support and transmit/receive antenna configurations. Obtained from: OpenBSD (at a6e25c727a2214219715b51ba6af2221d7e0d674, 22-Oct-2021) Differential Revision: https://reviews.freebsd.org/D48210 Reviewed by: bz
* iwm: update rate tables from OpenBSDAdrian Chadd2025-01-172-27/+59
| | | | | | | | | | | | | | | | | These are from an earlier version of the driver (22-Oct-2021) which I started to sync against back in 2021. These pull in the rest of the VHT and HT rates. Since that driver has functioning 802.11n support, it makes a good intermediary checkpoint. Locally tested: * 7260, STA mode, 11g and 11a modes Differential Revision: https://reviews.freebsd.org/D48209 Obtained from: OpenBSD (at a6e25c727a2214219715b51ba6af2221d7e0d674, 22-Oct-2021)
* Revert "Widen EPOCH(9) usage in PCI WLAN drivers."Bjoern A. Zeeb2023-12-011-5/+0
| | | | | | | | | This reverts commit b65f813c1ab99448278961c5ca80dc422b1eae29. As a side effect this also seems to fix wtap which seems to have lost the epoch over the input path in between. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-1619-38/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-1613-13/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* sys: Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-163-6/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* iwm(4): Correct some typos in source code commentsGordon Bergling2022-09-041-1/+1
| | | | | | - s/occured/occurred/ MFC after: 3 days
* iwi/iwm/iwn: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-061-3/+1
|
* iwm: plug set-but-not-used varsMateusz Guzik2022-04-222-1/+12
| | | | Sponsored by: Rubicon Communications, LLC ("Netgate")
* iwm(4): Remove a double word in a source code commentGordon Bergling2022-04-091-1/+1
| | | | | | - s/for for/for/ MFC after: 3 days
* iwm(4): Remove a whitespaceGordon Bergling2022-04-021-1/+1
| | | | | | | | In 9f4dc7fd97de I accidentally added a whitespace at the end of the line. Remove it. Reported by: Jose Luis Duran (via github) MFC with: 9f4dc7fd97de
* iwm(4): Fix a typo in a source code commentGordon Bergling2022-04-021-1/+1
| | | | | | | - s/coresponding/corresponding/ Obtained from: NetBSD MFC after: 3 days
* iwm: Fix -Wunused-but-set-variable warningsMark Johnston2022-02-281-6/+3
| | | | MFC after: 1 week
* iwm: plug some of set-but-not-used varsMateusz Guzik2021-12-141-7/+0
| | | | Sponsored by: Rubicon Communications, LLC ("Netgate")
* iwm(4): Fix a typo in a source code commentGordon Bergling2021-11-191-1/+1
| | | | | | - s/availabe/available/ MFC after: 3 days
* iwm: Update SCD register accessesAdrian Chadd2021-10-271-2/+2
| | | | | | | | | | | This brings it inline with what's in openbsd. I tested it locally with 2G and 5G association; it seems to work. Tested: Intel 7260 AC, hw 0x140, STA mode, 2G/5G Differential Revision: https://reviews.freebsd.org/D32627 Subscribers: imp Obtainde from: OpenBSD
* iwm: update if_iwmreg.h to the latest (as of today) openbsd changesAdrian Chadd2021-10-276-1654/+2029
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This updates the if_iwmreg.h definitions to; OpenBSD: if_iwmreg.h,v 1.65 2021/10/11 09:03:22 stsp Exp A few things haven't been fully converted, namely: * I left a couple things as enums for now just to reduce the other diffs needed; but they're the same values * The IWM_SCD_QUEUE_* macros have different offsets which I didn't update in case they broke things / changed based on later firmware. But they also may be real bugfixes which are needed for later chips. It'll need more testing before flipping this on. The c file updates are: * Use the newer names for things if the name changed but the semantics didn't * Explicitly use the earlier firmware structs which maintain compat with the current firmware and code. The newer ones are in here and they'll get converted when more openbsd code is merged into this tree. * Use the older iwm rate table for now, which has entries for legacy rates, HT and VHT. Our code works with that right now, updating it to openbsd's err, "different" version can be done at a later date when HT/VHT support is added. Notably, a bunch of definitions were deleted that weren't used. They're not used either in the openbsd/dfbsd drivers so I think it's safe to delete them in the long run. Test Plan: 7260 hw 0x140 Subscribers: imp Differential Revision: https://reviews.freebsd.org/D32627 Reviewed by: md5 Obtained From: OpenBSD
* net80211/drivers: improve ieee80211_rx_stats for bandBjoern A. Zeeb2021-10-221-0/+5
| | | | | | | | | | | | | While IEEE80211_R_BAND was defined, there was no place to store the band. Add a field for that, adjust ieee80211_lookup_channel_rxstatus() to require it, and update drivers passing "R_{FREQ|IEEE}" in already to provide the band as well. For the moment keep the fall-back code requiring all three fields. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D30662
* iwm(4): Add support for Intel Killer(R) Wireless-AC 1550iMark Johnston2021-01-141-0/+2
| | | | | | PR: 252578 Submitted by: shu <ankohuu@outlook.com> MFC after: 1 week
* iwm: fix regression from r365419 (ieee80211_media_change())Bjoern A. Zeeb2020-09-111-24/+2
| | | | | | | | | | | | | | | | | | | In r365419 ieee80211_media_change() callers were updated to not longer act on the obselete ENETRESET return code. While in the old days iwm has done a stop/init cycle in these cases, this was not executed since r193340. As a consequence simplify iwm code as well by passing ieee80211_media_change() right to ieee80211_vap_attach() as there is no more need for a local implementation. Reported by: Tomoaki AOKI (junchoon dec.sakura.ne.jp) Tested by: Tomoaki AOKI (junchoon dec.sakura.ne.jp) MFC after: 3 days X-MFC: fix is already in stable/12 PR: 248955 Notes: svn path=/head/; revision=365633
* WiFi: fix ieee80211_media_change() callersBjoern A. Zeeb2020-09-071-3/+3
| | | | | | | | | | | | | | | | | | | | | In r178354 with the introduction of multi-bss ("vap") support factoring out started and with r193340 ieee80211_media_change() no longer returned ENETRESET but only 0 or error. As ieee80211(9) tells the ieee80211_media_change() function should not be called directly but is registered with ieee80211_vap_attach() instead. Some drivers have not been fully converted. After fixing the return checking some of these functions were simply wrappers between ieee80211_vap_attach() and ieee80211_media_change(), so remove the extra function, where possible as well. PR: 248955 Submitted by: Tong Zhang (ztong0001 gmail.com) (original) MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=365419
* iwm: improve rfkill handlingAndriy Gapon2020-05-202-7/+44
| | | | | | | | | | | | | | 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: Print the command code for any unhandled commands.Mark Johnston2020-04-271-3/+2
| | | | | | | | Reported by: Marc Veldman <marc@bumblingdork.com> MFC after: 1 week Notes: svn path=/head/; revision=360373
* Widen EPOCH(9) usage in PCI WLAN drivers.Hans Petter Selasky2020-01-301-0/+5
| | | | | | | | | | | | | | Make sure all occurrences of ieee80211_input_xxx() in sys/dev are covered by a network epoch section. Do not depend on the interrupt handler nor any taskqueues being in a network epoch section. This patch should unbreak the PCI WLAN drivers after r357004. Pointy hat: glebius@ Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=357291
* iwm(4): Remove _mvm from the namespace.Mark Johnston2019-11-2725-602/+601
| | | | | | | | | | | | | 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(4): Fix version string formatting.Mark Johnston2019-11-271-1/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=355143
* iwm: Sync device initialization and reset code with iwlwifi.Mark Johnston2019-11-073-3/+35
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354516
* iwm: Implement support for scans with "adaptive" dwell time.Mark Johnston2019-11-072-62/+139
| | | | | | | | | | This is required by 9000-series firmware. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354515
* iwm: Use the default station for all transmits.Mark Johnston2019-11-071-5/+1
| | | | | | | | | | | This is what iwlwifi seems to do, and the previous behaviour triggered firmware panics during transmit on a 9560. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354514
* iwm: Set flag for pad bytes in offload_assist.Mark Johnston2019-11-072-6/+35
| | | | | | | | | | | Though we don't otherwise use firmware's offload capabilities, we need to set this flag when the MAC header's size isn't a multiple of four. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354513
* iwm: Use antenna B for TX on 9000-series chips.Mark Johnston2019-11-071-1/+4
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354512
* iwm: Update the station add command for the new RX API.Mark Johnston2019-11-072-23/+116
| | | | | | | | | | | The firmware expects a new version of the add-station command in 9000-series chips. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354511
* iwm: Sync with iwm_run_init_mvm_ucode() with iwlwifi.Mark Johnston2019-11-071-7/+9
| | | | | | | | | | Do not configure bluetooth on newer chips, it causes firmware panics. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354510
* iwm: Fix scheduler configuration for aux and cmd queue configuration.Mark Johnston2019-11-071-12/+19
| | | | | | | | | | | | | - Configure the scheduler only for the management queue. - Fix a bug when enabling the schduler: the queues are specified using a bitmask. - Fix style in the area. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354509
* iwm: Implement the new receive path.Mark Johnston2019-11-074-98/+397
| | | | | | | | | | | | | 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: Enable all 31 tx queues.Mark Johnston2019-11-071-1/+3
| | | | | | | | | | | | | For now iwm only ever uses queue 0 and the management queue, but my 9560 raises a software error interrupt during initialization if this flag is not set. iwlwifi sets it for all 7000- and 8000-series hardware, so we might as well do it unconditionally. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354507
* iwm: Explicitly enable MSI on newer chipsets.Mark Johnston2019-11-072-0/+8
| | | | | | | | | | | 9000-series chips implement support for MSI-X interrupts and disable MSI by default. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354506
* iwm: Define the mqrx_supported capability.Mark Johnston2019-11-073-7/+12
| | | | | | | | | | | The firmware for 9000-series and newer devices has a different receive API which supports multiple queues. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354505
* iwm: Add device configuration definitions for 9000-series chips.Mark Johnston2019-11-074-0/+198
| | | | | | | | | | | | | Match such chips using the device ID. We should really be checking the subdevice as well, since a smaller number of 9460 and 9560 devices actually belong to a new series of devices and require different firmware, but that will require some extra logic in iwm_attach(). Submitted by: lwhsu, Guo Wen Jun <blockk2000@gmail.com> MFC after: 2 weeks Notes: svn path=/head/; revision=354504
* iwm: Sync the firmware tx_cmd descriptor fields with iwlwifi.Mark Johnston2019-11-072-4/+2
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354503
* iwm: Use the same delays as iwlwifi when resetting the device.Mark Johnston2019-11-072-5/+7
| | | | | | | | | | | This is required for initialization to succeed for newer device families. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354502
* iwm: Add a device family definition for 9000 chips.Mark Johnston2019-11-073-16/+18
| | | | | | | | | | | Convert existing device family checks to avoid assuming that the device family is always one of IWM_DEVICE_FAMILY_7000 or _8000. Submitted by: lwhsu, Guo Wen Jun <blockk2000@gmail.com> MFC after: 2 weeks Notes: svn path=/head/; revision=354501
* iwm: Add 9000-series RX register definitions.Mark Johnston2019-11-071-0/+46
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354500
* iwm: Add a few _prph functions needed for 9000-series chips.Mark Johnston2019-11-072-0/+25
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354499
* iwm: Sync the TLV API enum with iwlwifi.Mark Johnston2019-11-071-5/+62
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354498