Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/if_iwn.c
RevisionDateAuthorComments
 1.101  10-Nov-2024  mlelstv Add MBUFTRACE
 1.100  03-Apr-2024  gutteridge if_iwn.c: pick up proper firmware for Centrino Wireless-N 130

Both variants should use iwlwifi-6000g2b-6 not iwlwifi-6000g2a-6. (It
seems only two specific product variants use iwlwifi-6000g2a-6. We
could simplify by reversing the sense of the test, as OpenBSD does, but
it doesn't seem to matter much, as what we now match seems to be the
full gamut possible, so the simpler diff was chosen here.)

Addresses PR kern/58105 from wandrien.dev@gmail.com, with the
PCI_PRODUCT_INTEL_WIFI_LINK_130_1 match tested by the reporter. Code
inspection of the FreeBSD driver indicates we should safely be able to
match PCI_PRODUCT_INTEL_WIFI_LINK_130_2 also.
 1.99  25-Apr-2022  gutteridge branches: 1.99.4;
Update firmware for Intel Centrino Advanced-N 6205 WiFi cards

Use the final version of firmware provided for these cards. This has
been tested with both variants of impacted iwn(4) cards (6005_2X2_1 and
6005_2X2_2, as found in a Dell E6230 and a Lenovo T420), improvements
noted.
 1.98  31-Dec-2021  riastradh sys: Use if_init wrapper function.

Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.
 1.97  19-Sep-2021  andvar fix few more typos in comments, messages and documentation.
 1.96  16-Jun-2021  riastradh if_attach and if_initialize cannot fail, don't test return value

These were originally made failable back in 2017 when if_initialize
allocated a softint in every interface for link state changes, so
that it could fail gracefully instead of panicking:

https://mail-index.NetBSD.org/source-changes/2017/10/23/msg089053.html

However, this spawned many seldom- or never-tested error branches,
which are risky to have around. And that softint in every interface
has since been replaced by a single global workqueue, because link
state changes require thread context but not low latency or high
throughput:

https://mail-index.NetBSD.org/source-changes/2020/02/06/msg113759.html

So there is no longer any reason for if_initialize to fail. (The
subroutine if_stats_init can't fail because percpu_alloc can't fail
either.)

There is a snag: the softint_establish in if_percpuq_create could
fail, potentially leading to bad consequences later on trying to use
the softint. This change doesn't introduce any new bugs because of
the snag -- if_percpuq_attach was already broken. However, the snag
can be better addressed without spawning error branches, either by
using a single softint or making softints less scarce.

(Separate commit will change the signatures of if_attach and
if_initialize to return void, scheduled to ride whatever is the next
convenient kernel bump.)

Patch and testing on amd64 and evbmips64-eb by maya@; commit message
soliloquy, and compile-testing on evbppc/i386/earmv7hf, by me.
 1.95  08-May-2021  thorpej Use pci_compatible_match().
 1.94  20-Mar-2020  sevan branches: 1.94.8;
Apply the same change as for if_iwi.c r1.114 here, as part of kern/55090.

This driver sleeps during iwn_media_change(), and thus requires an adaptive
mutex for the media lock.
 1.93  30-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.92  10-Oct-2019  bad branches: 1.92.2;
magic number police. use ETHER_ADDR_LEN.
 1.91  19-Apr-2019  gutteridge branches: 1.91.4;
if_iwn.c: add a comment noting which PCI IDs are covered by an else
statement that loads a specific firmware variant. While here, also
amend the formatting of two other comments.
 1.90  26-Jun-2018  msaitoh branches: 1.90.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.89  01-May-2018  maya GC private 802.11 rateset declarations, use the standard ones.

Build tested only.
 1.88  28-Jan-2018  christos branches: 1.88.2;
add an annotation.
 1.87  16-Jan-2018  maxv Fix overflow.
 1.86  23-Oct-2017  msaitoh If if_initialize() failed in the attach function, free resources and return.
 1.85  19-Jul-2017  mlelstv Pull in some hardware support from FreeBSD. Also fix 5GHz mode by
adapting the method described in: https://forums.freebsd.org/threads/53574/.
 1.84  02-Feb-2017  nonaka branches: 1.84.6;
wlan interfaces make interrupt routine running on softint context.

see http://mail-index.netbsd.org/tech-kern/2016/12/06/msg021281.html

tested device:
* ath at pci: AR5212, AR5424
* athn at pci: AR9287
* ipw at pci: 2100BG
* iwi at pci: 2915ABG
* iwm at pci: 3165, 7260, 8260
* iwn at pci: 4945, 6235
* ral at pci: RT2560
* rtwn at pci: RTL8192CE
 1.83  02-Feb-2017  nonaka iwn(4): use MSI if available.
 1.82  04-Jan-2017  nonaka branches: 1.82.2;
Export some 802.11 IE manipulate functions.
 1.81  08-Dec-2016  ozaki-r Apply deferred if_start framework

if_schedule_deferred_start checks if the if_snd queue contains packets,
so drivers don't need to check it by themselves.
 1.80  24-Nov-2016  hkenken bus_dmamap_sync() is required for ICT table read/write.
Tested by arm platform.
 1.79  03-Aug-2016  mlelstv be less noisy with concurrent scan requests.
 1.78  10-Jun-2016  ozaki-r branches: 1.78.2;
Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
 1.77  26-May-2016  ozaki-r Use M_GETCTX

No functional change.
 1.76  22-Sep-2015  nonaka PR/50187: Don't use DS parameter set when 5GHz channel is scanning.

XXX: pullup-7
 1.75  24-Aug-2015  pooka Remove "#ifdef INET" code. Por que? Because opt_inet.h was not included
and "#ifdef INET" was just a fancy way of saying "#ifndef NetBSD".
 1.74  09-Nov-2014  nonaka branches: 1.74.2;
Use correct IWN_HW_REV_TYPE_MASK.
 1.73  09-Nov-2014  nonaka fix error messages.
 1.72  30-Oct-2014  nonaka Add support for Intel Centrino Wireless-N 100/105/130/135/2200/2230.
From OpenBSD.
 1.71  29-Mar-2014  christos branches: 1.71.4;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.70  17-Oct-2013  christos - remove unused variables
- move debugging code inside debugging sections
 1.69  14-Sep-2013  joerg Conditionalize iwn_memwrite_2 and friends under !IEEE80211_NO_HT.
 1.68  23-Aug-2013  christos PR/48150: Noriyuki Koizumi: Add support for Intel Centrino Advanced-N 6235
Wi-Fi controller
 1.67  28-Jul-2013  prlw1 Add support for Centrino Wireless-N 1030 and Centrino Advanced-N 6230
http://mail-index.netbsd.org/tech-net/2013/01/04/msg003802.html
 1.66  15-Jun-2013  christos branches: 1.66.2;
reflect the correct OpenBSD versions we are synced with.
 1.65  21-Apr-2013  msaitoh Delete "PCI_" from PCIX and PICE capability registers.
 1.64  30-Mar-2013  christos replace function with macro
 1.63  30-Mar-2013  christos remove trailing whitespace
 1.62  30-Jan-2012  drochner branches: 1.62.2; 1.62.6;
Use pci_aprint_devinfo(9) instead of pci_devinfo+aprint_{normal,naive}
where it looks straightforward, and pci_aprint_devinfo_fancy in a few
others where drivers want to supply their own device names instead
of the pcidevs generated one. More complicated cases, where names
are composed at runtime, are left alone for now. It certainly makes
sense to simplify the drivers here rather than inventing a catch-all API.
This should serve as as example for new drivers, and also ensure
consistent output in the AB_QUIET ("boot -q") case. Also, it avoids
excessive stack usage where drivers attach child devices because the
buffer for the device name is not kept on the local stack anymore.
 1.61  08-Oct-2011  elric branches: 1.61.2; 1.61.6;
Use aprint_error_dev().
 1.60  08-Oct-2011  mbalmer Make this compile again: Use the device_xname() macro to get the devic name.
 1.59  07-Oct-2011  elric Update from OpenBSD merging in 1.111 and 1.112 with log messages:

1.112 Differential gain calibration makes the 6005 firmware crap
out, so skip it for now until we figure out why. This
probably means the device won't function optimally, but
that's better than not functioning at all. Makes my "Intel
Centrinto Advanced-N 6205" work quite well.

1.111 The 6005 and 6050-based parts need DC calibration turned
on, otherwise the firmware will crap out, at least on the
6005. First step to getting my "Intel Centrino Advanced-N
6205" to work.

Both are commited by kettenis@openbsd.org.
 1.58  28-Aug-2011  elric Revert prior inadvertent checkin.
 1.57  28-Aug-2011  elric Remove crypto/dist/heimdal and its associated build infrastructure as
it has been replaced by crypto/external/bsd/heimdal.
 1.56  21-May-2011  msaitoh Add newer Wireless WiFi Link 4965 devices, Centrino Wireless-N 1030
and Centrino Advanced-N 6230
 1.55  20-May-2011  msaitoh Add support for 6050(6250 and 6150) and 6005(6205).
TODO: update iwn.4 manpage.
 1.54  18-May-2011  dyoung #include <sys/bus.h>, not <machine/bus.h>.
 1.53  15-May-2011  christos update from OpenBSD by msaitoh. Tested on amd64.
 1.52  30-Dec-2010  jruoho branches: 1.52.2;
Use "temperature" rather than "TEMP" as the sensor name. No functional change.
 1.51  30-Dec-2010  jruoho Fill out struct ifnet::if_stop, which is required for network class devices
in pmf(9). Fixes the panic reported in PR # kern/44296.
 1.50  29-Aug-2010  christos Don't try to hold the mutex if we are disabling the card because we can
be called from an interrupt context. While this is not strictly correct,
we are SoL anyway so this does not matter.
 1.49  10-Jul-2010  christos V() the mutex when firmware is initialized, duh!
 1.48  03-Jul-2010  christos Don't use spinlocks.
 1.47  02-Jul-2010  christos - Fix the recursive iwn_init() call problem properly.
- Don't print the scan request while scanning all the time. Perhaps I will
remove this completely.
 1.46  18-Jun-2010  christos Patch from Sverre Froyen to avoid panic when an ioctl happens while the
driver is initializing.
 1.45  12-May-2010  christos Use device names from the OpenBSD iwn driver, adding and modifying device
names as needed. From Sverre Froyen
 1.44  02-May-2010  christos Replace iwn_tx from rev. 1.39 with a port of the current OpenBSD version.
Remove superfluous call to bpf_detach.
Add comments regarding porting issues and add a couple of cosmetic changes
that reduce the diffs to the OpenBSD version. From Sverre Froyen
 1.43  28-Apr-2010  christos kill stray free. from Sverre Froyen.
 1.42  23-Apr-2010  christos Align usage of *free and *alloc and clean up the firmware read code.
This fixes two panics that occur for kernels compiled with DIAGNOSTIC and
DEBUG. From Sverre Froyen
 1.41  17-Apr-2010  christos add support for the 6000. From sverre froyen
 1.40  16-Apr-2010  christos Update with newer version from Sverre Froyen
 1.39  11-Apr-2010  mrg avoid rbuf starvation. when grabbing a recieve buffer, if a local
4KB buffer isn't available, try to MEXTMALLOC() one. only if both
of these fail to we abort the recieve operation.

based on a patch from Sverre Froyen <sverre@viewmark.com>, thanks!

tested by myself, sverre and jeremy reed.
 1.38  05-Apr-2010  joerg Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.37  24-Feb-2010  dyoung branches: 1.37.2;
A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.36  19-Jan-2010  pooka branches: 1.36.2;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.35  08-Jan-2010  dyoung Expand PMF_FN_* macros.
 1.34  21-Nov-2009  njoly Cleanup boot messages, use aprint functions.
 1.33  11-Sep-2009  christos Add support for the 5100 and newer firmware. Tested also with the 4900.
Thanks to everyone for helping and testing.
 1.32  05-Sep-2009  tsutsui Invert logic around nested pmf(9) registrations for readability.
 1.31  12-May-2009  cegger use device_private().
"looks good" ad@
XXX for the device_t/softc split, please check the driver that no cases have been missed.
 1.30  07-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.29  06-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.28  22-Dec-2008  blymn branches: 1.28.2;
Pay more attention to the state of the RF kill switch, such as don't
bring the interface up when the RF is off.
 1.27  13-Nov-2008  blymn Actually declare the structures used in iwn_scan_hdr instead of using
pointer arithmetic to create the elements on the fly.

Other changes to scan routine taken from FreeBSD driver.
 1.26  07-Nov-2008  joerg Match image name with upstream distfiles.
 1.25  07-Nov-2008  dyoung *** Summary ***

When a link-layer address changes (e.g., ifconfig ex0 link
02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address. (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior. Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability. KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR. In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr. That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR. In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR. For example, pull ..._init() out of any switch
statement that looks like this:

switch (...->sa_family) {
case ...:
..._init();
...
break;
...
default:
..._init();
...
break;
}

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

switch (x & (IFF_UP|IFF_RUNNING)) {
case 0:
...
break;
case IFF_RUNNING:
...
break;
case IFF_UP:
...
break;
case IFF_UP|IFF_RUNNING:
...
break;
}

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure. Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls. In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source. In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively. Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset. Delete unnecessary casts to void *. Use
sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with
NULL instead of "testing truth". Replace some instances of (type
*)0 with NULL. Change some K&R prototypes to ANSI C, and join
lines.
 1.24  06-Nov-2008  blymn Move init of essid to the attach code.
 1.23  05-Nov-2008  blymn * Disable aborting the scan for the moment - it causes a firmware error if
a scan was never initiated which breaks WEP and open wireless connections
* Make sure the ESSID is cleared.
 1.22  20-Oct-2008  rtr branches: 1.22.2; 1.22.4;
- fix crazy condition that always evaluates to false without this
iwn_fix_channel() never gets called.
- remove hardcode to ic->ic_channels[11]

fixes a problem in associating to access points
 1.21  18-Oct-2008  blymn Make scan abort command async as newstate is called from an interrupt
context so we cannot ltsleep.
 1.20  13-Oct-2008  blymn DMA fixes thanks to rtr & skrll
Don't set tsf in auth, this stops firmware errors on WPA renegotiation
Various other tweaks that the linux driver seems to have that we did not
 1.19  20-Sep-2008  freza iwn_node_alloc(): Allocate 'iwn_node' in M_80211_NODE (which is what
ieee80211_node:node_free() expects), not M_DEVBUF. Fixes DIAGNOSTIC
crashes due to suspected double-free.
 1.18  14-Sep-2008  freza * iwn_rx_intr(): free rbuf is available if 'nb_free_entries > 0'.
This used to have '>=' resulting in kernel crash accessing NULL
rbuf under non-trivial Rx load.
 1.17  18-Aug-2008  cube - Make RX queue free list code look like in if_wpi.c, including:
- Protect RX queue free list with a mutex, as it was done in so many
network drivers now that it calls for common code, as dyoung@ points
out.

However, for now it should improve a bit iwn(4)'s stability.
 1.16  29-Jul-2008  christos fix typo.
 1.15  28-Jul-2008  christos just whitespace fixes.
 1.14  28-Jul-2008  christos fix type punned warnings.
 1.13  28-Jul-2008  christos lint wins again :-) From Anon Ymous:
- fix a mis-placed parenthesis.
- fix assignment to the wrong variable.
 1.12  26-Jul-2008  christos make sure we write little endian. From Anon Ymous
 1.11  24-Jul-2008  blymn * Add the BSS node during the auth phase so negotiation can occur
* Make the adding of a node into a function instead of duplicating code
 1.10  10-May-2008  degroote branches: 1.10.2; 1.10.4;
Fix error handling after m_pullup
 1.9  29-Mar-2008  blymn branches: 1.9.2; 1.9.4; 1.9.6;
Remove erroneous byteswap of flags - the flags are byteswapped when
assigned to the tx struct.
 1.8  29-Mar-2008  blymn Clean up trailing whitespace.
 1.7  13-Mar-2008  taca branches: 1.7.2;
Reflect change of PMF_FN_ARGS.
 1.6  11-Mar-2008  dyoung pci_disable_retry() is now a no-op, so don't call it any more.
 1.5  16-Feb-2008  ober branches: 1.5.2; 1.5.4; 1.5.8;
More cleanup. Removal of debug comments.
 1.4  10-Feb-2008  skrll branches: 1.4.2;
Use PRIu64 in a DPRINTF.
 1.3  09-Feb-2008  skrll More whitespace and RCSIds.
 1.2  09-Feb-2008  ober Clean up white space and KNF everything.
 1.1  09-Feb-2008  ober Intel PRO/Wireless LAN 4965AGN Mini-PCI Adapter Driver ported from OpenBSD
by deroote@. OK nick@ moof@
 1.4.2.4  17-Mar-2008  yamt sync with head.
 1.4.2.3  27-Feb-2008  yamt sync with head.
 1.4.2.2  11-Feb-2008  yamt sync with head.
 1.4.2.1  10-Feb-2008  yamt file if_iwn.c was added on branch yamt-lazymbuf on 2008-02-11 14:59:38 +0000
 1.5.8.4  17-Jan-2009  mjf Sync with HEAD.
 1.5.8.3  28-Sep-2008  mjf Sync with HEAD.
 1.5.8.2  02-Jun-2008  mjf Sync with HEAD.
 1.5.8.1  03-Apr-2008  mjf Sync with HEAD.
 1.5.4.1  24-Mar-2008  keiichi sync with head.
 1.5.2.2  18-Feb-2008  mjf Sync with HEAD.
 1.5.2.1  16-Feb-2008  mjf file if_iwn.c was added on branch mjf-devfs on 2008-02-18 21:05:57 +0000
 1.7.2.2  23-Mar-2008  matt sync with HEAD
 1.7.2.1  13-Mar-2008  matt file if_iwn.c was added on branch matt-armv6 on 2008-03-23 02:04:47 +0000
 1.9.6.4  10-Oct-2008  skrll Sync with HEAD.
 1.9.6.3  24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.9.6.2  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.9.6.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.9.4.7  09-Oct-2010  yamt sync with head
 1.9.4.6  11-Aug-2010  yamt sync with head.
 1.9.4.5  11-Mar-2010  yamt sync with head
 1.9.4.4  16-Sep-2009  yamt sync with head
 1.9.4.3  16-May-2009  yamt sync with head
 1.9.4.2  04-May-2009  yamt sync with head.
 1.9.4.1  16-May-2008  yamt sync with head.
 1.9.2.1  18-May-2008  yamt sync with head.
 1.10.4.2  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.10.4.1  19-Oct-2008  haad Sync with HEAD.
 1.10.2.2  31-Jul-2008  simonb Sync with head.
 1.10.2.1  28-Jul-2008  simonb Sync with head.
 1.22.4.3  15-Nov-2008  snj Pull up following revision(s) (requested by blymn in ticket #58):
sys/dev/pci/if_iwn.c: revision 1.24
Move init of essid to the attach code.
 1.22.4.2  15-Nov-2008  snj Pull up following revision(s) (requested by blymn in ticket #58):
sys/dev/pci/if_iwn.c: revision 1.23
* Disable aborting the scan for the moment - it causes a firmware error if
a scan was never initiated which breaks WEP and open wireless
connections
* Make sure the ESSID is cleared.
 1.22.4.1  09-Nov-2008  snj Pull up following revision(s) (requested by joerg in ticket #25):
sys/dev/pci/if_ipw.c: revision 1.44
sys/dev/pci/if_ipwvar.h: revision 1.14
sys/dev/pci/if_iwi.c: revision 1.76
sys/dev/pci/if_iwn.c: revision 1.26
Match image name with upstream distfiles.
 1.22.2.1  19-Jan-2009  skrll Sync with HEAD.
 1.28.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.36.2.3  22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.36.2.2  17-Aug-2010  uebayasi Sync with HEAD.
 1.36.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.37.2.4  31-May-2011  rmind sync with head
 1.37.2.3  05-Mar-2011  rmind sync with head
 1.37.2.2  03-Jul-2010  rmind sync with head
 1.37.2.1  30-May-2010  rmind sync with head
 1.52.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.61.6.1  18-Feb-2012  mrg merge to -current.
 1.61.2.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.61.2.1  17-Apr-2012  yamt sync with head
 1.62.6.3  03-Dec-2017  jdolecek update from HEAD
 1.62.6.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.62.6.1  23-Jun-2013  tls resync from head
 1.62.2.1  15-Nov-2015  bouyer Pull up following revision(s) (requested by nonaka in ticket #1330):
sys/dev/pci/if_iwnvar.h: revision 1.17
sys/dev/pci/if_iwn.c: revision 1.76
PR/50187: Don't use DS parameter set when 5GHz channel is scanning.
XXX: pullup-7
 1.66.2.2  18-May-2014  rmind sync with head
 1.66.2.1  28-Aug-2013  rmind sync with head
 1.71.4.2  06-Nov-2015  riz Pull up following revision(s) (requested by nonaka in ticket #987):
sys/dev/pci/if_iwnvar.h: revision 1.17
sys/dev/pci/if_iwn.c: revision 1.76
PR/50187: Don't use DS parameter set when 5GHz channel is scanning.
XXX: pullup-7
 1.71.4.1  28-Jan-2015  martin Pull up following revision(s) (requested by nonaka in ticket #467):
external/intel-fw-public/iwl2030/dist/iwlwifi-2030-6.ucode: revision 1.1
distrib/sets/lists/base/mi: revision 1.1091
share/man/man4/iwn.4: revision 1.13
external/intel-fw-public/iwl100/Makefile: revision 1.1
external/intel-fw-public/iwl2030/Makefile: revision 1.1
external/intel-fw-public/iwl135/Makefile: revision 1.1
sys/dev/pci/pcidevs: revision 1.1205
external/intel-fw-public/Makefile: revision 1.8
external/intel-fw-public/iwl135/dist/iwlwifi-135-6.ucode: revision 1.1
external/intel-fw-public/iwl2030/dist/LICENSE.iwlwifi-2030-ucode: revision 1.1
external/intel-fw-public/iwl105/dist/LICENSE.iwlwifi-105-ucode: revision 1.1
external/intel-fw-public/iwl2000/dist/LICENSE.iwlwifi-2000-ucode: revision 1.1
external/intel-fw-public/iwl100/dist/iwlwifi-100-5.ucode: revision 1.1
external/intel-fw-public/iwl135/dist/LICENSE.iwlwifi-135-ucode: revision 1.1
external/intel-fw-public/iwl135/dist/README.iwlwifi-135-ucode: revision 1.1
sys/dev/pci/if_iwnvar.h: revision 1.16
external/intel-fw-public/iwl2000/dist/iwlwifi-2000-6.ucode: revision 1.1
external/intel-fw-public/iwl100/dist/README.iwlwifi-100-ucode: revision 1.1
sys/dev/pci/if_iwn.c: revision 1.72
sys/dev/pci/if_iwnreg.h: revision 1.14
external/intel-fw-public/iwl105/dist/README.iwlwifi-105-ucode: revision 1.1
external/intel-fw-public/iwl100/dist/LICENSE.iwlwifi-100-ucode: revision 1.1
external/intel-fw-public/iwl2000/dist/README.iwlwifi-2000-ucode: revision 1.1
external/intel-fw-public/iwl105/dist/iwlwifi-105-6.ucode: revision 1.1
external/intel-fw-public/iwl2000/Makefile: revision 1.1
external/intel-fw-public/iwl105/Makefile: revision 1.1
external/intel-fw-public/iwl2030/dist/README.iwlwifi-2030-ucode: revision 1.1
Add some Intel Wi-Fi devices.
Add support for Intel Centrino Wireless-N 100/105/130/135/2200/2230.
From OpenBSD.
 1.74.2.8  28-Aug-2017  skrll Sync with HEAD
 1.74.2.7  05-Feb-2017  skrll Sync with HEAD
 1.74.2.6  05-Dec-2016  skrll Sync with HEAD
 1.74.2.5  05-Oct-2016  skrll Sync with HEAD
 1.74.2.4  09-Jul-2016  skrll Sync with HEAD
 1.74.2.3  29-May-2016  skrll Sync with HEAD
 1.74.2.2  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.74.2.1  22-Sep-2015  skrll Sync with HEAD
 1.78.2.3  20-Mar-2017  pgoyette Sync with HEAD
 1.78.2.2  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.78.2.1  06-Aug-2016  pgoyette Sync with HEAD
 1.82.2.1  21-Apr-2017  bouyer Sync with HEAD
 1.84.6.3  17-Apr-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1953):

sys/dev/pci/if_iwn.c: revision 1.100

if_iwn.c: pick up proper firmware for Centrino Wireless-N 130

Both variants should use iwlwifi-6000g2b-6 not iwlwifi-6000g2a-6. (It
seems only two specific product variants use iwlwifi-6000g2a-6. We
could simplify by reversing the sense of the test, as OpenBSD does, but
it doesn't seem to matter much, as what we now match seems to be the
full gamut possible, so the simpler diff was chosen here.)

Addresses PR kern/58105 from wandrien.dev%gmail.com@localhost, with the
PCI_PRODUCT_INTEL_WIFI_LINK_130_1 match tested by the reporter. Code
inspection of the FreeBSD driver indicates we should safely be able to
match PCI_PRODUCT_INTEL_WIFI_LINK_130_2 also.
 1.84.6.2  10-Dec-2017  snj Pull up following revision(s) (requested by msaitoh in ticket #427):
sys/arch/amiga/dev/if_bah_zbus.c: 1.17
sys/arch/arm/broadcom/bcm53xx_eth.c: 1.30
sys/arch/powerpc/booke/dev/pq3etsec.c: 1.32
sys/arch/usermode/dev/if_veth.c: 1.9
sys/dev/ic/an.c: 1.66
sys/dev/ic/athn.c: 1.17
sys/dev/ic/atw.c: 1.162
sys/dev/ic/bwi.c: 1.33
sys/dev/ic/dwc_gmac.c: 1.41-1.42
sys/dev/ic/malo.c: 1.10
sys/dev/ic/rt2560.c: 1.31
sys/dev/ic/rt2661.c: 1.36
sys/dev/ic/rt2860.c: 1.29
sys/dev/ic/rtw.c: 1.127
sys/dev/ic/rtwvar.h: 1.46
sys/dev/ic/smc90cx6.c: 1.71
sys/dev/ic/smc90cx6var.h: 1.12
sys/dev/ic/wi.c: 1.244
sys/dev/pci/if_ipw.c: 1.66
sys/dev/pci/if_iwi.c: 1.104
sys/dev/pci/if_iwm.c: 1.76
sys/dev/pci/if_iwn.c: 1.86
sys/dev/pci/if_rtwn.c: 1.13
sys/dev/pci/if_wm.c: 1.541
sys/dev/pci/if_wpi.c: 1.79
sys/dev/pci/ixgbe/ixgbe.c: 1.106
sys/dev/pci/ixgbe/ixv.c: 1.73 via patch
sys/dev/pcmcia/if_malo_pcmcia.c: 1.15
sys/dev/scsipi/if_se.c: 1.95
sys/dev/usb/if_upl.c: 1.60
sys/net/if.c: 1.396
sys/net/if.h: 1.241
sys/net/if_arc.h: 1.23
sys/net/if_arcsubr.c: 1.78
sys/net/if_bridge.c: 1.136-1.137
sys/net/if_etherip.c: 1.39
sys/net/if_faith.c: 1.56
sys/net/if_gif.c: 1.131
sys/net/if_loop.c: 1.96
sys/net/if_mpls.c: 1.30
sys/net/if_pppoe.c: 1.129
sys/net/if_srt.c: 1.27
sys/net/if_stf.c: 1.102
sys/net/if_tap.c: 1.100
sys/net/if_vlan.c: 1.105
sys/netinet/ip_carp.c: 1.91
sys/rump/net/lib/libshmif/if_shmem.c: 1.73-1.74
sys/rump/net/lib/libvirtif/if_virt.c: 1.55-1.56
if_initalize() and if_attach() failed when resource allocation failed
(e.g. allocating softint). Without this change, it panics. It's bad because
resource shortage really occured when a lot of pseudo interface is created.
To avoid this problem, don't panic and change return value of if_initialize()
and if_attach() to int. Caller fanction will be recover from error cleanly by
checking the return value.
Return if bah_attach_subr() failed.
If if_attach() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add some missing frees in bridge_clone_destroy().
- KNF
If error occured in bcmeth_ccb_attach(), free resources and return.
If error occured in pq3etsec_attach(), free resources and return.
If error occured in the attach function, free resources and return.
- If if_initialize() failed in athn_attach(), free resources and return.
- Add missing pmf_event_deregister() in athn_detach().
- Free resources correctly on some errors in atw_attach().
- Use apint*() insread of printf() in the attach function.
If if_initialize() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add missing dwc_gmac_free_dma_rings() and mutex_destroy() when attach
failed.
- If if_initialize() failed in the attach function, free resources and return.
- ifp is always not NULL in iwi_detach(). Check correctly with ifp->if_softc.
- If if_initialize() failed in the attach function, free resources and return.
- Fix error path in the attach function correctly.
If if_initialize() failed in the attach function, free resources and return.
If if_attach() failed in the attach function, free resources and return.
- If if_initialize() failed in the attach function, free resources and return.
- KNF
- If if_attach() failed in the attach function, free resources and return.
- KNF
Fix compile error.
Fix compile error.
We don't need '&mii', but just 'mii' for mii_detach().
Don't free sc_rthash twice
 1.84.6.1  25-Aug-2017  snj Pull up following revision(s) (requested by mlelstv in ticket #218):
sys/dev/pci/if_iwn.c: revision 1.85
sys/dev/pci/if_iwnreg.h: revision 1.17
sys/dev/pci/if_iwnvar.h: revision 1.20
Pull in some hardware support from FreeBSD. Also fix 5GHz mode by
adapting the method described in: https://forums.freebsd.org/threads/53574/.
 1.88.2.2  28-Jul-2018  pgoyette Sync with HEAD
 1.88.2.1  02-May-2018  pgoyette Synch with HEAD
 1.90.2.3  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.90.2.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.90.2.1  10-Jun-2019  christos Sync with HEAD
 1.91.4.1  17-Apr-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1825):

sys/dev/pci/if_iwn.c: revision 1.100

if_iwn.c: pick up proper firmware for Centrino Wireless-N 130

Both variants should use iwlwifi-6000g2b-6 not iwlwifi-6000g2a-6. (It
seems only two specific product variants use iwlwifi-6000g2a-6. We
could simplify by reversing the sense of the test, as OpenBSD does, but
it doesn't seem to matter much, as what we now match seems to be the
full gamut possible, so the simpler diff was chosen here.)

Addresses PR kern/58105 from wandrien.dev%gmail.com@localhost, with the
PCI_PRODUCT_INTEL_WIFI_LINK_130_1 match tested by the reporter. Code
inspection of the FreeBSD driver indicates we should safely be able to
match PCI_PRODUCT_INTEL_WIFI_LINK_130_2 also.
 1.92.2.1  29-Feb-2020  ad Sync with head.
 1.94.8.2  17-Jun-2021  thorpej Sync w/ HEAD.
 1.94.8.1  13-May-2021  thorpej Sync with HEAD.
 1.99.4.1  17-Apr-2024  martin Pull up following revision(s) (requested by riastradh in ticket #653):

sys/dev/pci/if_iwn.c: revision 1.100

if_iwn.c: pick up proper firmware for Centrino Wireless-N 130

Both variants should use iwlwifi-6000g2b-6 not iwlwifi-6000g2a-6. (It
seems only two specific product variants use iwlwifi-6000g2a-6. We
could simplify by reversing the sense of the test, as OpenBSD does, but
it doesn't seem to matter much, as what we now match seems to be the
full gamut possible, so the simpler diff was chosen here.)

Addresses PR kern/58105 from wandrien.dev%gmail.com@localhost, with the
PCI_PRODUCT_INTEL_WIFI_LINK_130_1 match tested by the reporter. Code
inspection of the FreeBSD driver indicates we should safely be able to
match PCI_PRODUCT_INTEL_WIFI_LINK_130_2 also.

RSS XML Feed