The NetBSD Project

CVS log for src/sys/dev/pci/if_iwm.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / pci

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.90: download - view: text, markup, annotated - select for diffs
Sun Nov 10 11:44:36 2024 UTC (4 weeks, 1 day ago) by mlelstv
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +3 -2 lines
Add MBUFTRACE

Revision 1.89: download - view: text, markup, annotated - select for diffs
Fri Feb 9 06:01:03 2024 UTC (10 months ago) by mlelstv
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +19 -11 lines
Fix DMA sync sizes.
Don't panic for inconsistent queue counter, just print an error to console.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Thu Sep 21 09:31:50 2023 UTC (14 months, 2 weeks ago) by msaitoh
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +3 -3 lines
s/ for for / for / in comment.

Revision 1.85.6.2: download - view: text, markup, annotated - select for diffs
Sun Aug 1 22:42:25 2021 UTC (3 years, 4 months ago) by thorpej
Branches: thorpej-i2c-spi-conf
Diff to: previous 1.85.6.1: preferred, colored; branchpoint 1.85: preferred, colored; next MAIN 1.86: preferred, colored
Changes since revision 1.85.6.1: +83 -102 lines
Sync with HEAD.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Thu Jun 24 09:17:53 2021 UTC (3 years, 5 months ago) by riastradh
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +83 -102 lines
iwm(4): Disentangle attach.

Don't attach a half-baked interface and then detach it and then
reattach it after mountroot when we can read firmware; just defer
attaching the interface altogether until mountroot.

Likely fixes some panics I've seen every now and then at boot with
iwm(4).

Revision 1.85.6.1: download - view: text, markup, annotated - select for diffs
Thu Jun 17 04:46:29 2021 UTC (3 years, 5 months ago) by thorpej
Branches: thorpej-i2c-spi-conf
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +3 -9 lines
Sync w/ HEAD.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Wed Jun 16 00:21:18 2021 UTC (3 years, 5 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +3 -9 lines
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.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Fri May 22 20:27:16 2020 UTC (4 years, 6 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +8 -3 lines
This driver sleeps during iwm_media_change(), and thus requires an
adaptive mutex for the media lock.

Revision 1.83.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:09 2020 UTC (4 years, 8 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.83: preferred, colored; next MAIN 1.84: preferred, colored
Changes since revision 1.83: +10 -10 lines
Merge changes from current as of 20200406

Revision 1.83.10.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:19:10 2020 UTC (4 years, 9 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.83: preferred, colored; next MAIN 1.84: preferred, colored
Changes since revision 1.83: +10 -10 lines
Sync with head.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Thu Jan 30 06:03:34 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +10 -10 lines
Adopt <net/if_stats.h>.

Revision 1.78.2.2: download - view: text, markup, annotated - select for diffs
Sat Jul 28 04:37:46 2018 UTC (6 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.78.2.1: preferred, colored; branchpoint 1.78: preferred, colored; next MAIN 1.79: preferred, colored
Changes since revision 1.78.2.1: +6 -6 lines
Sync with HEAD

Revision 1.83: download - view: text, markup, annotated - select for diffs
Tue Jun 26 06:48:01 2018 UTC (6 years, 5 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, jdolecek-ncqfixes-base, jdolecek-ncqfixes, isaki-audio2-base, isaki-audio2, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: phil-wifi, ad-namecache
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +6 -6 lines
 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.

Revision 1.78.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 25 07:25:51 2018 UTC (6 years, 5 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +16 -3 lines
Sync with HEAD

Revision 1.82: download - view: text, markup, annotated - select for diffs
Fri Jun 8 11:18:23 2018 UTC (6 years, 6 months ago) by knakahara
Branches: MAIN
CVS tags: pgoyette-compat-0625
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +9 -3 lines
iwm(4) workaround as ifp->if_hwdl can be set only once. Advised nonaka@n.o and ozaki-r@n.o, thanks.

To avoid for iwm(4) to set if_hwdl before loading firmware, use local address
as dummy. See sys/net/if.c::if_set_sadl().

Revision 1.81: download - view: text, markup, annotated - select for diffs
Fri Jun 8 11:09:24 2018 UTC (6 years, 6 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +7 -2 lines
Fix "ifconfig iwm0" failures reported by ryoon@n.o. Advised nonaka@n.o and ozaki-r@n.o, thanks.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Wed Jun 6 01:49:08 2018 UTC (6 years, 6 months ago) by maya
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +3 -3 lines
Remove duplicate ;

Revision 1.79: download - view: text, markup, annotated - select for diffs
Tue Jun 5 12:17:18 2018 UTC (6 years, 6 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +5 -3 lines
Fix panic on boot with iwm(4). Advised by nonaka@n.o, thanks.

XXX pullup-8

Revision 1.78: download - view: text, markup, annotated - select for diffs
Sun Jan 21 18:12:37 2018 UTC (6 years, 10 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +3 -2 lines
CID-1427736: Appease coverity using KASSERT

Revision 1.77: download - view: text, markup, annotated - select for diffs
Wed Jan 10 18:39:50 2018 UTC (6 years, 11 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -2 lines
Match Intel Dual Band Wireless AC 3168. The code already supports it.

Revision 1.73.2.3: download - view: text, markup, annotated - select for diffs
Tue Jan 2 10:20:33 2018 UTC (6 years, 11 months ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Diff to: previous 1.73.2.2: preferred, colored; branchpoint 1.73: preferred, colored; next MAIN 1.74: preferred, colored
Changes since revision 1.73.2.2: +3 -3 lines
Pull up following revision(s) (requested by ozaki-r in ticket #456):
	sys/arch/arm/sunxi/sunxi_emac.c: 1.9
	sys/dev/ic/dwc_gmac.c: 1.43-1.44
	sys/dev/pci/if_iwm.c: 1.75
	sys/dev/pci/if_wm.c: 1.543
	sys/dev/pci/ixgbe/ixgbe.c: 1.112
	sys/dev/pci/ixgbe/ixv.c: 1.74
	sys/kern/sys_socket.c: 1.75
	sys/net/agr/if_agr.c: 1.43
	sys/net/bpf.c: 1.219
	sys/net/if.c: 1.397, 1.399, 1.401-1.403, 1.406-1.410, 1.412-1.416
	sys/net/if.h: 1.242-1.247, 1.250, 1.252-1.257
	sys/net/if_bridge.c: 1.140 via patch, 1.142-1.146
	sys/net/if_etherip.c: 1.40
	sys/net/if_ethersubr.c: 1.243, 1.246
	sys/net/if_faith.c: 1.57
	sys/net/if_gif.c: 1.132
	sys/net/if_l2tp.c: 1.15, 1.17
	sys/net/if_loop.c: 1.98-1.101
	sys/net/if_media.c: 1.35
	sys/net/if_pppoe.c: 1.131-1.132
	sys/net/if_spppsubr.c: 1.176-1.177
	sys/net/if_tun.c: 1.142
	sys/net/if_vlan.c: 1.107, 1.109, 1.114-1.121
	sys/net/npf/npf_ifaddr.c: 1.3
	sys/net/npf/npf_os.c: 1.8-1.9
	sys/net/rtsock.c: 1.230
	sys/netcan/if_canloop.c: 1.3-1.5
	sys/netinet/if_arp.c: 1.255
	sys/netinet/igmp.c: 1.65
	sys/netinet/in.c: 1.210-1.211
	sys/netinet/in_pcb.c: 1.180
	sys/netinet/ip_carp.c: 1.92, 1.94
	sys/netinet/ip_flow.c: 1.81
	sys/netinet/ip_input.c: 1.362
	sys/netinet/ip_mroute.c: 1.147
	sys/netinet/ip_output.c: 1.283, 1.285, 1.287
	sys/netinet6/frag6.c: 1.61
	sys/netinet6/in6.c: 1.251, 1.255
	sys/netinet6/in6_pcb.c: 1.162
	sys/netinet6/ip6_flow.c: 1.35
	sys/netinet6/ip6_input.c: 1.183
	sys/netinet6/ip6_output.c: 1.196
	sys/netinet6/mld6.c: 1.90
	sys/netinet6/nd6.c: 1.239-1.240
	sys/netinet6/nd6_nbr.c: 1.139
	sys/netinet6/nd6_rtr.c: 1.136
	sys/netipsec/ipsec_output.c: 1.65
	sys/rump/net/lib/libnetinet/netinet_component.c: 1.9-1.10
kmem_intr_free kmem_intr_[z]alloced memory
the underlying pools are the same but api-wise those should match
Unify IFEF_*_MPSAFE into IFEF_MPSAFE
There are already two flags for if_output and if_start, however, it seems such
MPSAFE flags are eventually needed for all if_XXX operations. Having discrete
flags for each operation is wasteful of if_extflags bits. So let's unify
the flags into one: IFEF_MPSAFE.
Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so
we can change them without breaking backward compatibility of the releases
(though the kernel version of -current should be bumped).
Note that if an interface have both MP-safe and non-MP-safe operations at a
time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe
opeartions take the kernel lock.
Proposed on tech-kern@ and tech-net@
Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch
It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..."
scattered all over the source code and makes it easy to identify remaining
KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE.
No functional change
Hold KERNEL_LOCK on if_ioctl selectively based on IFEF_MPSAFE
If IFEF_MPSAFE is set, hold the lock and otherwise don't hold.
This change requires additions of KERNEL_LOCK to subsequence functions from
if_ioctl such as ifmedia_ioctl and ifioctl_common to protect non-MP-safe
components.
Proposed on tech-kern@ and tech-net@
Ensure to hold if_ioctl_lock when calling if_flags_set
Fix locking against myself on ifpromisc
vlan_unconfig_locked could be called with holding if_ioctl_lock.
Ensure to not turn on IFF_RUNNING of an interface until its initialization completes
And ensure to turn off it before destruction as per IFF_RUNNING's description
"resource allocated". (The description is a bit doubtful though, I believe the
change is still proper.)
Ensure to hold if_ioctl_lock on if_up and if_down
One exception for if_down is if_detach; in the case the lock isn't needed
because it's guaranteed that no other one can access ifp at that point.
Make if_link_queue MP-safe if IFEF_MPSAFE
if_link_queue is a queue to store events of link state changes, which is
used to pass events from (typically) an interrupt handler to
if_link_state_change softint. The queue was protected by KERNEL_LOCK so far,
but if IFEF_MPSAFE is enabled, it becomes unsafe because (perhaps) an interrupt
handler of an interface with IFEF_MPSAFE doesn't take KERNEL_LOCK. Protect it
by a spin mutex.
Additionally with this change KERNEL_LOCK of if_link_state_change softint is
omitted if NET_MPSAFE is enabled.
Note that the spin mutex is now ifp->if_snd.ifq_lock as well as the case of
if_timer (see the comment).
Use IFADDR_WRITER_FOREACH instead of IFADDR_READER_FOREACH
At that point no other one modifies the list so IFADDR_READER_FOREACH
is unnecessary. Use of IFADDR_READER_FOREACH is harmless in general though,
if we try to detect contract violations of pserialize, using it violates
the contract. So avoid using it makes life easy.
Ensure to call if_addr_init with holding if_ioctl_lock
Get rid of outdated comments
Fix build of kernels without ether
By throwing out if_enable_vlan_mtu and if_disable_vlan_mtu that
created a unnecessary dependency from if.c to if_ethersubr.c.
PR kern/52790
Rename IFNET_LOCK to IFNET_GLOBAL_LOCK
IFNET_LOCK will be used in another lock, if_ioctl_lock (might be renamed then).
Wrap if_ioctl_lock with IFNET_* macros (NFC)
Also if_ioctl_lock perhaps needs to be renamed to something because it's now
not just for ioctl...
Reorder some destruction routines in if_detach
- Destroy if_ioctl_lock at the end of the if_detach because it's used in various
  destruction routines
- Move psref_target_destroy after pr_purgeif because we want to use psref in
  pr_purgeif (otherwise destruction procedures can be tricky)
Ensure to call if_mcast_op with holding IFNET_LOCK
Note that CARP doesn't deal with IFNET_LOCK yet.
Remove IFNET_GLOBAL_LOCK where it's unnecessary because IFNET_LOCK is held
Describe which lock is used to protect each member variable of struct ifnet
Requested by skrll@
Write a guideline for converting an interface to IFEF_MPSAFE
Requested by skrll@
Note that IFNET_LOCK must not be held in softint
Don't set IFEF_MPSAFE unless NET_MPSAFE at this point
Because recent investigations show that interfaces with IFEF_MPSAFE need to
follow additional restrictions to work with the flag safely. We should enable it
on an interface by default only if the interface surely satisfies the
restrictions, which are described in if.h.
Note that enabling IFEF_MPSAFE solely gains a few benefit on performance because
the network stack is still serialized by the big kernel locks by default.

Revision 1.73.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 10:10:24 2017 UTC (7 years ago) by snj
Branches: netbsd-8
Diff to: previous 1.73.2.1: preferred, colored; branchpoint 1.73: preferred, colored
Changes since revision 1.73.2.1: +12 -7 lines
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

Revision 1.76.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:07 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.76.2.1: preferred, colored; branchpoint 1.76: preferred, colored; next MAIN 1.77: preferred, colored
Changes since revision 1.76.2.1: +8304 -0 lines
update from HEAD

Revision 1.76.2.1
Mon Oct 23 09:28:38 2017 UTC (7 years, 1 month ago) by jdolecek
Branches: tls-maxphys
FILE REMOVED
Changes since revision 1.76: +0 -8304 lines
file if_iwm.c was added on branch tls-maxphys on 2017-12-03 11:37:07 +0000

Revision 1.76: download - view: text, markup, annotated - select for diffs
Mon Oct 23 09:28:38 2017 UTC (7 years, 1 month ago) by msaitoh
Branches: MAIN
CVS tags: tls-maxphys-base-20171202
Branch point for: tls-maxphys
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +12 -7 lines
- If if_initialize() failed in the attach function, free resources and return.
- Fix error path in the attach function correctly.

Revision 1.29.2.11: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:52:05 2017 UTC (7 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.29.2.10: preferred, colored; branchpoint 1.29: preferred, colored; next MAIN 1.30: preferred, colored
Changes since revision 1.29.2.10: +393 -49 lines
Sync with HEAD

Revision 1.75.2.3: download - view: text, markup, annotated - select for diffs
Wed Jul 26 15:58:58 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-2-RELEASE
Diff to: previous 1.75.2.2: preferred, colored; branchpoint 1.75: preferred, colored; next MAIN 1.76: preferred, colored
Changes since revision 1.75.2.2: +3 -2 lines
Pull up following revision(s) (requested by nonaka in ticket #1459):
	sys/dev/pci/if_iwm.c: revision 1.72
iwm(4): match Wireless 8265 device.

Revision 1.75.2.2: download - view: text, markup, annotated - select for diffs
Tue Jul 25 19:43:03 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-7
Diff to: previous 1.75.2.1: preferred, colored; branchpoint 1.75: preferred, colored
Changes since revision 1.75.2.1: +8367 -0 lines
Apply patch (requested by nonaka in ticket #1413):
iwm(4): Add a driver for Intel Wireless 726x, 316x, 826x and 416x series.
Ported from OpenBSD.

Revision 1.75.2.1
Sun Jul 23 10:55:00 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-7
FILE REMOVED
Changes since revision 1.75: +0 -8299 lines
file if_iwm.c was added on branch netbsd-7 on 2017-07-25 19:43:03 +0000

Revision 1.75: download - view: text, markup, annotated - select for diffs
Sun Jul 23 10:55:00 2017 UTC (7 years, 4 months ago) by para
Branches: MAIN
CVS tags: nick-nhusb-base-20170825
Branch point for: netbsd-7
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +3 -3 lines
kmem_intr_free kmem_intr_[z]alloced memory

the underlying pools are the same but api-wise those should match

Revision 1.73.2.1: download - view: text, markup, annotated - select for diffs
Sat Jun 10 06:17:01 2017 UTC (7 years, 6 months ago) by snj
Branches: netbsd-8
CVS tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -3 lines
Pull up following revision(s) (requested by nonaka in ticket #21):
	sys/dev/pci/if_iwm.c: revision 1.74
fix typo.
reported by ryo@.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Fri Jun 9 04:48:58 2017 UTC (7 years, 6 months ago) by nonaka
Branches: MAIN
CVS tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -3 lines
fix typo.

reported by ryo@.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Thu Jun 1 02:45:11 2017 UTC (7 years, 6 months ago) by chs
Branches: MAIN
CVS tags: netbsd-8-base
Branch point for: netbsd-8
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +2 -22 lines
remove checks for failure after memory allocation calls that cannot fail:

  kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Fri May 19 14:18:10 2017 UTC (7 years, 6 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +3 -2 lines
iwm(4): match Wireless 8265 device.

Revision 1.61.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:53:47 2017 UTC (7 years, 7 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.61: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61: +500 -118 lines
Sync with HEAD

Revision 1.42.2.3: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:29 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.42.2.2: preferred, colored; branchpoint 1.42: preferred, colored; next MAIN 1.43: preferred, colored
Changes since revision 1.42.2.2: +874 -311 lines
Sync with HEAD

Revision 1.71: download - view: text, markup, annotated - select for diffs
Tue Mar 14 23:59:26 2017 UTC (7 years, 8 months ago) by nonaka
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +391 -28 lines
iwm(4): update firmware to maintained core release.

firmware from https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware.git/tree/?id=4b9559fb0565f582a21a4070a81a3b6a7d77610b

Revision 1.29.2.10: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:29 2017 UTC (7 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.29.2.9: preferred, colored; branchpoint 1.29: preferred, colored
Changes since revision 1.29.2.9: +3562 -2601 lines
Sync with HEAD

Revision 1.70: download - view: text, markup, annotated - select for diffs
Thu Feb 2 10:05:35 2017 UTC (7 years, 10 months ago) by nonaka
Branches: MAIN
CVS tags: nick-nhusb-base-20170204
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +20 -27 lines
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

Revision 1.69: download - view: text, markup, annotated - select for diffs
Sat Jan 21 05:54:06 2017 UTC (7 years, 10 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +12 -12 lines
PR/51797: initialize hardware completely when receiving a deauth frame from AP.

avoid "iwm0: fatal firmware error".

Revision 1.68: download - view: text, markup, annotated - select for diffs
Sat Jan 21 05:46:57 2017 UTC (7 years, 10 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +12 -8 lines
more block network interrupt.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Sat Jan 21 05:43:24 2017 UTC (7 years, 10 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +3 -3 lines
increase command response timeout value.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Sat Jan 21 05:40:47 2017 UTC (7 years, 10 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +3 -3 lines
include <sys/intr.h> for softint(9).

Revision 1.65: download - view: text, markup, annotated - select for diffs
Thu Jan 19 11:24:05 2017 UTC (7 years, 10 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +50 -42 lines
newstate should be blocked network interrupt, because it called iwm_start.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Tue Jan 17 08:47:32 2017 UTC (7 years, 10 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +17 -6 lines
show NVM channel flags when AB_DEBUG is set.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Tue Jan 17 08:44:31 2017 UTC (7 years, 10 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +6 -3 lines
more acknowledge interrupts from iwn(4).

Revision 1.62: download - view: text, markup, annotated - select for diffs
Tue Jan 17 08:35:16 2017 UTC (7 years, 10 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +5 -5 lines
only bus_dmamap_sync(9) once for ICT region.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Fri Jan 13 11:21:47 2017 UTC (7 years, 10 months ago) by nonaka
Branches: MAIN
CVS tags: bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +277 -197 lines
iwm(4): 3165 works fine with iwlwifi-7265D-17.ucode firmware.

firmware from http://git.kernel.org/cgit/linux/kernel/git/iwlwifi/linux-firmware.git/tree/?id=be8a6fcba2e48e00674d1f35e6def56e2268039c

Revision 1.60: download - view: text, markup, annotated - select for diffs
Tue Jan 10 08:40:27 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +42 -10 lines
check LAR support in NVM for 8260/4165.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Tue Jan 10 07:34:04 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +81 -14 lines
Add apmg_wake_up_wa support from DragonFly BSD.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Tue Jan 10 05:54:03 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +8 -12 lines
iwm(4): 8260 works now. 4165 may works too.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Tue Jan 10 04:27:04 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +3 -2 lines
set NULL after free.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Mon Jan 9 12:45:49 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +7 -7 lines
Apply OpenBSD if_iwm.c rev.1.148.

> While setting up the basic rate bitmask for iwm's firmware, if the AP does
> not specify basic rates for either the CCK or OFDM set, add just the most
> basic rate to that set (1 Mbit/s in case of CCK, 6 Mbit/s in case of OFDM).
> This behaviour matches what code comments seem to imply.

> The previous code would add all possible basic rates in such cases.
> So if all basic rates were CCK only, the code would add all possible OFDM basic
> rates on top. Then the firmware would send some frames at too high rates, e.g.
> RTS frames would be sent at 24Mbit/s which is a bit risky on noisy channels.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Mon Jan 9 10:42:45 2017 UTC (7 years, 11 months ago) by khorben
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +4 -2 lines
Do not use the "flags" field uninitialized

A backport if iwm(4) (to netbsd-7) does not build without this change.

LGTM nonaka@

Revision 1.54: download - view: text, markup, annotated - select for diffs
Mon Jan 9 09:15:54 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +5 -5 lines
Added enum iwm_tx_pm_timeouts from FreeBSD.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Mon Jan 9 08:10:25 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +7 -9 lines
cosmetic.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Mon Jan 9 08:05:14 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +3 -3 lines
use correct header size.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Sun Jan 8 08:29:23 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +5 -7 lines
fix indent

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun Jan 8 07:42:00 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +93 -84 lines
iwm(4): make interrupt routine running on softint context.

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

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sun Jan 8 06:49:10 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +4 -4 lines
use pci_intr_establish_xname(9).

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sun Jan 8 06:48:06 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +8 -8 lines
twiddle bpf related.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun Jan 8 06:23:29 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +7 -9 lines
cosmetic

Revision 1.42.2.2: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:33 2017 UTC (7 years, 11 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.42.2.1: preferred, colored; branchpoint 1.42: preferred, colored
Changes since revision 1.42.2.1: +3193 -2432 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.46: download - view: text, markup, annotated - select for diffs
Wed Jan 4 03:05:24 2017 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
CVS tags: pgoyette-localcount-20170107
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -61 lines
Export some 802.11 IE manipulate functions.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun Dec 18 02:18:29 2016 UTC (7 years, 11 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +3245 -2426 lines
iwm(4): Sync with OpenBSD.

7265 works fine.
7260 and 3160 maybe work.
7265D, 3165 and 8260 not work yet.

if_iwm.c: r1.147.
if_iwmreg.h: r1.19 without r1.16.
if_iwmvar.h: r1.24.

firmware is taken from https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi
- iwlwifi-7260-ucode-16.242414.0.tgz
- iwlwifi-3160-ucode-16.242414.0.tgz
- iwlwifi-7265-ucode-16.242414.0.tgz
- iwlwifi-8000-ucode-16.242414.0.tgz

Revision 1.44: download - view: text, markup, annotated - select for diffs
Thu Dec 8 01:12:01 2016 UTC (8 years ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +5 -4 lines
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.

Revision 1.42.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 4 14:49:09 2016 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +3 -3 lines
Sync with HEAD

Revision 1.29.2.9: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:55:43 2016 UTC (8 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.29.2.8: preferred, colored; branchpoint 1.29: preferred, colored
Changes since revision 1.29.2.8: +3 -3 lines
Sync with HEAD

Revision 1.43: download - view: text, markup, annotated - select for diffs
Fri Sep 23 19:53:52 2016 UTC (8 years, 2 months ago) by maya
Branches: MAIN
CVS tags: pgoyette-localcount-20161104, nick-nhusb-base-20161204, nick-nhusb-base-20161004
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +3 -3 lines
Fix inverted logic in iwm(4).

The PROT_REQUIRE flag in should be set for data frames above a certain
length, but we were setting it for !data frames above a certain length,
which makes no sense at all.

- taken from all other BSDs (OpenBSD, FreeBSD, DragonflyBSD...)

Revision 1.29.2.8: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:04 2016 UTC (8 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.29.2.7: preferred, colored; branchpoint 1.29: preferred, colored
Changes since revision 1.29.2.7: +3 -3 lines
Sync with HEAD

Revision 1.42: download - view: text, markup, annotated - select for diffs
Fri Jun 10 13:27:14 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907, localcount-20160914
Branch point for: pgoyette-localcount
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +3 -3 lines
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.

Revision 1.29.2.7: download - view: text, markup, annotated - select for diffs
Sun May 29 08:44:21 2016 UTC (8 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.29.2.6: preferred, colored; branchpoint 1.29: preferred, colored
Changes since revision 1.29.2.6: +3 -3 lines
Sync with HEAD

Revision 1.41: download - view: text, markup, annotated - select for diffs
Thu May 26 05:01:12 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20160529
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -3 lines
Use M_GETCTX

No functional change.

Revision 1.29.2.6: download - view: text, markup, annotated - select for diffs
Sat Mar 19 11:30:10 2016 UTC (8 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.29.2.5: preferred, colored; branchpoint 1.29: preferred, colored
Changes since revision 1.29.2.5: +4 -2 lines
Sync with HEAD

Revision 1.40: download - view: text, markup, annotated - select for diffs
Tue Feb 9 08:32:11 2016 UTC (8 years, 10 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +4 -2 lines
Introduce softint-based if_input

This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!

Revision 1.29.2.5: download - view: text, markup, annotated - select for diffs
Sun Dec 27 12:09:50 2015 UTC (8 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.29.2.4: preferred, colored; branchpoint 1.29: preferred, colored
Changes since revision 1.29.2.4: +6 -18 lines
Sync with HEAD (as of 26th Dec)

Revision 1.39: download - view: text, markup, annotated - select for diffs
Fri Nov 6 14:22:17 2015 UTC (9 years, 1 month ago) by nonaka
Branches: MAIN
CVS tags: nick-nhusb-base-20151226
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +2 -14 lines
Always use pci_intr_alloc(9)/pci_intr_release(9).

Revision 1.38: download - view: text, markup, annotated - select for diffs
Wed Oct 14 02:16:51 2015 UTC (9 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +6 -6 lines
Remove leading whitespaces and kind

Revision 1.29.2.4: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:05:59 2015 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.29.2.3: preferred, colored; branchpoint 1.29: preferred, colored
Changes since revision 1.29.2.3: +160 -90 lines
Sync with HEAD

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Jul 24 15:43:38 2015 UTC (9 years, 4 months ago) by nonaka
Branches: MAIN
CVS tags: nick-nhusb-base-20150921
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +9 -17 lines
Use pci_intr_alloc().

Revision 1.36: download - view: text, markup, annotated - select for diffs
Wed Jul 22 15:18:01 2015 UTC (9 years, 4 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +153 -75 lines
iwm(4) can read the firmware image from disk when interface up.
This change is useful for full-disk encryption environment.

Revision 1.29.2.3: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:09 2015 UTC (9 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.29.2.2: preferred, colored; branchpoint 1.29: preferred, colored
Changes since revision 1.29.2.2: +66 -5 lines
Sync with HEAD

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri May 22 15:32:21 2015 UTC (9 years, 6 months ago) by nonaka
Branches: MAIN
CVS tags: nick-nhusb-base-20150606
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +4 -4 lines
Limit the number of dma segments used for transmitting packets to
IWM_NUM_OF_TBS - 2.  We have IWM_NUM_OF_TBS slots, but use two of those
for sending commands to the firmware.

From OpenBSD rev. 1.41.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sat May 16 07:58:19 2015 UTC (9 years, 6 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +10 -2 lines
should be able to use 5GHz wireless network.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Fri May 15 08:44:15 2015 UTC (9 years, 6 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +5 -18 lines
if_iwm use unified establish API.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Apr 29 03:35:09 2015 UTC (9 years, 7 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +30 -3 lines
Added control debugging output via sysctl.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Tue Apr 28 15:38:02 2015 UTC (9 years, 7 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +36 -2 lines
Use MSI instead of legacy INTx, if available.

should fix PR/49663.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Wed Apr 15 05:40:48 2015 UTC (9 years, 7 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +7 -2 lines
Register iwm(4) with pmf(9).

Patch from Pierre Pronchery.

Revision 1.29.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 6 15:18:10 2015 UTC (9 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.29.2.1: preferred, colored; branchpoint 1.29: preferred, colored
Changes since revision 1.29.2.1: +6873 -0 lines
Sync with HEAD

Revision 1.29.2.1
Thu Mar 26 14:42:56 2015 UTC (9 years, 8 months ago) by skrll
Branches: nick-nhusb
FILE REMOVED
Changes since revision 1.29: +0 -6873 lines
file if_iwm.c was added on branch nick-nhusb on 2015-04-06 15:18:10 +0000

Revision 1.29: download - view: text, markup, annotated - select for diffs
Thu Mar 26 14:42:56 2015 UTC (9 years, 8 months ago) by nonaka
Branches: MAIN
CVS tags: nick-nhusb-base-20150406
Branch point for: nick-nhusb
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +8 -5 lines
Not all iwm hardware supports the 5GHz band.  Make setting 11a rates
and scanning conditional on the 5GHz support bit in the nvm.

From OpenBSD rev. 1.39. Arranged by me.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Mar 7 13:54:57 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +16 -16 lines
Fix radiotap and fixed rates.  Radiotap was reporting the wrong rate for
data frames and fixed rates weren't really fixed and were converted into
the wrong hardware rate.

From OpenBSD rev.1.36.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sat Mar 7 11:52:53 2015 UTC (9 years, 9 months ago) by khorben
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -3 lines
Avoid kmem_free(NULL) in iwm_read_firmware()

This code path can be hit if the firmware failed to load, for instance
if the file is not present on the filesystem. In this case
firmware_open() fails, and fw->fw_rawdata never gets allocated in the
first place.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Wed Mar 4 16:55:11 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +4 -3 lines
stop the calibration timeout when stopping the interface.

From OpenBSD rev.1.35.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Mar 4 16:53:32 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +6 -4 lines
Set/clear the IWM_MAC_FILTER_IN_BEACON flag under conditions that match what
Linux does.

From OpenBSD rev.1.34.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Mar 3 09:54:55 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +14 -22 lines
Fix 11a support.

From OpenBSD rev.1.33.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Mar 3 09:45:58 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +4 -3 lines
Make setting the MAC context bit for 11g protection when transmitting
OFDM frames conditional on the node via IEEE80211_F_USEPROT.

From OpenBSD rev.1.31.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Tue Mar 3 09:41:31 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -3 lines
Don't set CTS to self.  Linux stopped setting this back in
dc271ee0d04d12d6bfabacbec803289a7072fbd9 as it is known
to cause problems.

From OpenBSD rev.1.30.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Mar 3 09:34:40 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -3 lines
sc_fixed_ridx is initialised to 0 but tested as it it were initialised
to -1.  The result of this is tx frames were always sent out at fixed
rate 0 instead of ni_txrate.

Match the iwn behaviour and test ic_fixed_rate for -1 instead.

From OpenBSD rev.1.29.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Mar 3 09:27:35 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +4 -4 lines
Correctly set lowest_present_ofdm in iwm_mvm_ack_rates().
From OpenBSD rev.1.28.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue Mar 3 09:22:06 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -3 lines
init error to 0 in iwm_send_cmd().
From OpenBSD rev.1.27.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Tue Mar 3 09:16:56 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +4 -3 lines
match iwn and init txrate at lowest available bit-rate.
From OpenBSD rev.1.26.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Tue Mar 3 09:10:45 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +30 -22 lines
workaround for interrupt coalescing bug not needed on 7265.
From OpenBSD if_iwm.c rev.1.25, if_iwmvar.h rev.1.7.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Mar 2 12:07:27 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -4 lines
Correctly set lowest_present_ofdm in iwm_mvm_ack_rates().
From OpenBSD rev.1.23.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Feb 25 12:41:15 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +5 -4 lines
Display code number of unhandled packet.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue Feb 24 12:57:58 2015 UTC (9 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +4 -3 lines
Work around Coverity CIDs 127102{0,1}: Confused by the comparison
nrates > __arraycount(lq->rs_table), coverity erroneously binds nrates
to the range [0..16), whereas it is really bound to [0..15) by
ni->ni_rates.rs_nrates (IEEE80211_RATE_MAXSIZE). We add an explicit comparison
to unconfuse it that will always succeed.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Feb 24 02:26:15 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -6 lines
Revert previous change.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Feb 23 13:09:37 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +7 -3 lines
CID 1271021: Overrunning array "in->in_ridx" of 15 bytes at byte offset 15 using index "i" (which evaluates to 15).

http://mail-index.netbsd.org/coverity-updates/2015/02/21/msg000115.html

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Feb 20 16:16:06 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +36 -2 lines
Make the iwm(4) hardware receive filter pass multicast traffic from OpenBSD.
Fixes inet6 autoconf, for example.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Feb 20 15:03:53 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -3 lines
Don't return success when hw is not ready.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Feb 17 09:18:45 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +5 -5 lines
fix compile failure with IWM_DEBUG on i386.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Feb 16 13:22:19 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +59 -59 lines
whitespace

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Feb 16 13:16:00 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -2 lines
Fix compile failure with clang.
Pointed out by Herbert J. Skuhra.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Feb 14 05:00:23 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +8 -3 lines
print error message when fail to load firmware.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Feb 13 18:57:47 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +78 -57 lines
iwm(4) works now, but 2.4GHz only.

> iwm0 at pci2 dev 0 function 0: Intel Dual Band Wireless AC 3160 (rev. 0x83)
> iwm0: interrupting at ioapic0 pin 18
> iwm0: hw rev: 0x160, fw ver 25.228 (API ver 9), address XX:XX:XX:XX:XX:XX
> iwm0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
> iwm0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Feb 13 18:02:32 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +412 -386 lines
Make some functions and variables static.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Fri Feb 13 17:40:13 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +133 -120 lines
Convert printf() to aprint_*().

Revision 1.2: download - view: text, markup, annotated - select for diffs
Fri Feb 13 17:14:06 2015 UTC (9 years, 9 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +213 -225 lines
Sync with OpenBSD if_iwm.c rev.1.18.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Feb 7 13:20:00 2015 UTC (9 years, 10 months ago) by pooka
Branches: MAIN
Add a driver for Intel Centrino 7260 and similar wireless cards.
Supported devices should more or less match ones supported
by the Linux iwlwifi mvm driver.  Sponsored by genua mbh for OpenBSD.

This is probably the world's first Canadian cross device driver: it was
created for OpenBSD by writing and porting a NetBSD driver which was
developed in a rump kernel in Linux userspace.

Note: I don't have access to the hardware anymore, so this version is
not tested and not enabled by default.  While I tried to be careful in
adding the NetBSD bits back, it's probable that there's a snafu or two.
Feel free to send private email in case you have the hardware and there
are issues.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>