History log of /freebsd-current/sys/dev/iwm/if_iwm_scan.c
Revision Date Author Comments
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 355c1513 24-Oct-2021 Adrian Chadd <adrian@FreeBSD.org>

iwm: update if_iwmreg.h to the latest (as of today) openbsd changes

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


# e7065dd1 27-Nov-2019 Mark Johnston <markj@FreeBSD.org>

iwm(4): Remove _mvm from the namespace.

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


# 666c8655 07-Nov-2019 Mark Johnston <markj@FreeBSD.org>

iwm: Implement support for scans with "adaptive" dwell time.

This is required by 9000-series firmware.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation


# eff8a979 07-Nov-2019 Mark Johnston <markj@FreeBSD.org>

iwm: Simplify fw_has_{api,capa}().

No functional change intended.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation


# f33c8309 23-Jan-2019 Kyle Evans <kevans@FreeBSD.org>

iwm - Reduce gratuitous differences with Linux iwlwifi in struct naming.

* Rename some structs and struct members for firmware handling.

Submitted by: Augustin Cavalier <waddlesplash@gmail.com> (Haiku)
Obtained from: DragonFlyBSD (4b1006a6e4d0f61d48c67b46e1f791e30837db67)


# 2aa3dbb0 25-Jul-2017 Adrian Chadd <adrian@FreeBSD.org>

[iwm] if_iwm - Use chan list from ieee80211_scan_state for scan, not ic_channels.

* Limiting the channel list with "ifconfig wlan0 chanlist ..." now will
actually set the list of channels scanned by iwm.

Tested:

* Intel 7260, STA mode, setting chanlist to 1-14 and 36-254, and indeed it does what
it should!


# 112d57f2 17-Jul-2017 Adrian Chadd <adrian@FreeBSD.org>

[iwm] actually use the new rxon function now.

It turns out the /next/ dragonflybsd git actually uses the scan channel list,
so just kick this along to make the next commit easier.

Obtained from: dragonflybsd.git 53a009d6f66108b40d622ed90ea95eba5c0e5432


# fe845d8e 17-Jul-2017 Adrian Chadd <adrian@FreeBSD.org>

[iwm] if_iwm - Factor out and improve iwm_mvm_scan_rxon_flags() in if_iwm_scan.c.

From the original commit:

==

* Actually look at the first channel in the list. If it's a 2.4GHz channel,
set IWM_PHY_BAND_24 flag. The IWM_PHY_BAND_5 flag is 0 anyway, so we
don't need to look further.

* While there factor out the iwm_mvm_rrm_scan_needed() tlv capability check.

Taken-From: Linux iwlwifi
==

However, this only really does the latter. The sc_ic channel list isn't the
scan channel list, it's the /whole list/ for the set of active channels,
so I don't know what the right thing to do is here.

So I'll commit this as an intermediary commit and we'll have to revisit whether
to finish the refactor as-is.

Tested:

* Intel 7260, STA mode

Obtained from: dragonflybsd.git 53a009d6f66108b40d622ed90ea95eba5c0e5432


# 616201d1 08-May-2017 Adrian Chadd <adrian@FreeBSD.org>

[iwm] include opt_iwm.h and opt_wlan.h consistently in all files.


# 7beeab43 27-Mar-2017 Andriy Voskoboinyk <avos@FreeBSD.org>

iwm: fix build without IWM_DEBUG.

Reported by: O. Hartmann <ohartmann@walstatt.org>
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D10146


# cd20383e 24-Mar-2017 Adrian Chadd <adrian@FreeBSD.org>

[iwm] Enable Energy Based Scan (EBS).

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


# 5f00681c 24-Mar-2017 Adrian Chadd <adrian@FreeBSD.org>

[iwm] GC unused code from if_iwm_scan.c, copyied from iwn or iwlwifi/dvm.

Obtained from: dragonflybsd.git 10881df269b93c26e5ee6af629c36db5672e6e52


# a00bfbb1 22-Mar-2017 Adrian Chadd <adrian@FreeBSD.org>

[iwm] Make ucode capabilities and api flags handling more like iwlwifi.

Obtained from: dragonflybsd.git 757eecf0e6c92745aa2eee95811e573c8300850e


# 4b17c188 07-Feb-2017 Adrian Chadd <adrian@FreeBSD.org>

[iwm] Add scan abort functions, to properly cancel a running scan.

* Uses the notification wait api to wait for the corresponding scan
complete notification after sending the abort command.

Taken-From: Linux iwlwifi

Obtained from: DragonflyBSD commit b484d09d54301740f036ddf02008117f563960c2


# 2a2476b3 05-Feb-2017 Adrian Chadd <adrian@FreeBSD.org>

[iwm] Sync valid_tx_ant and valid_rx_ant mask handling with iwlwifi.

* 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


# 6349bdb3 05-Feb-2017 Adrian Chadd <adrian@FreeBSD.org>

[iwm] Sync nvm parsing code with Linux iwlwifi.

* 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


# 9afea60f 06-Sep-2016 Andriy Voskoboinyk <avos@FreeBSD.org>

iwm: fix scanning for hidden SSIDs.

Setup SSIDs in scan command so firmware will send direct probe request(s)
while scanning.

Tested by: dbkirk@gmail.com

PR: 211519
MFC after: 1 week


# 6a5bc1d1 25-Jul-2016 Sean Bruno <sbruno@FreeBSD.org>

iwm(4) synchronize driver to DragonFlyBSD version and recent f/w update.

Submitted by: Kevin Bowling (kevin.bowling@kev009.com)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D6967


# bc6cd01d 22-Jun-2016 Adrian Chadd <adrian@FreeBSD.org>

[iwm] Use vap->iv_myaddr instead of ic->ic_macaddr when vap != NULL.

ic_macaddr is only used for the initial mac address provided by NVM. We should
rather use vap->iv_myaddr when vap != NULL, to allow the MAC address
to be changed later with ifconfig(8).

Submitted by: Imre Vadasz <imre@vdsz.com>
Reviewed by: avos
Approved by: re (gjb)
Obtained from: DragonflyBSD git 4aee7a78275676d22d14c04177bd0c9377d91478
Differential Revision: https://reviews.freebsd.org/D6743


# ebb6ea56 01-Jun-2016 Adrian Chadd <adrian@FreeBSD.org>

[iwm] Clean up iwm(4) scanning logic a bit.

Submitted by: Imre Vadasz <imre@vdsz.com>
Obtained from: DragonflyBSD 8f3ffab9136e33263d424275ec28f57ad2096437


# b789292f 19-May-2016 Andriy Voskoboinyk <avos@FreeBSD.org>

iwm: add 'opt_wlan.h' include into source files.

Include net80211 options file, so IEEE80211_DEBUG_REFCNT option will be
handled correctly.


# 7a79cebf 27-Aug-2015 Gleb Smirnoff <glebius@FreeBSD.org>

Replay r286410. Change KPI of how device drivers that provide wireless
connectivity interact with the net80211 stack.

Historical background: originally wireless devices created an interface,
just like Ethernet devices do. Name of an interface matched the name of
the driver that created. Later, wlan(4) layer was introduced, and the
wlanX interfaces become the actual interface, leaving original ones as
"a parent interface" of wlanX. Kernelwise, the KPI between net80211 layer
and a driver became a mix of methods that pass a pointer to struct ifnet
as identifier and methods that pass pointer to struct ieee80211com. From
user point of view, the parent interface just hangs on in the ifconfig
list, and user can't do anything useful with it.

Now, the struct ifnet goes away. The struct ieee80211com is the only
KPI between a device driver and net80211. Details:

- The struct ieee80211com is embedded into drivers softc.
- Packets are sent via new ic_transmit method, which is very much like
the previous if_transmit.
- Bringing parent up/down is done via new ic_parent method, which notifies
driver about any changes: number of wlan(4) interfaces, number of them
in promisc or allmulti state.
- Device specific ioctls (if any) are received on new ic_ioctl method.
- Packets/errors accounting are done by the stack. In certain cases, when
driver experiences errors and can not attribute them to any specific
interface, driver updates ic_oerrors or ic_ierrors counters.

Details on interface configuration with new world order:
- A sequence of commands needed to bring up wireless DOESN"T change.
- /etc/rc.conf parameters DON'T change.
- List of devices that can be used to create wlan(4) interfaces is
now provided by net.wlan.devices sysctl.

Most drivers in this change were converted by me, except of wpi(4),
that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testing
changes to at least 8 drivers. Thanks to pluknet@, Oliver Hartmann,
Olivier Cochard, gjb@, mmoll@, op@ and lev@, who also participated in
testing.

Reviewed by: adrian
Sponsored by: Netflix
Sponsored by: Nginx, Inc.


# 49fdbf0a 08-Aug-2015 Rui Paulo <rpaulo@FreeBSD.org>

iwm: use the proper include path for iwm headers.


# d4886179 08-Aug-2015 Rui Paulo <rpaulo@FreeBSD.org>

Import OpenBSD's iwm WiFi driver for Intel 3160/7260/7265.

There are still several bugs, but I've been using it for a while now.
Thanks to all the testers and to Adrian for his help with this
driver.

This driver isn't connected to the build yet, but it will be soon.

There's no MFC planned because the driver isn't very stable yet.

Reviewed by: adrian
Obtained from: https://github.com/rpaulo/iwm
Tested by: adrian, gjb, dumbbell (others that I forgot).
Relnotes: yes