History log of /netbsd/sys/dev/pci/if_wpi.c (Results 1 – 25 of 92)
Revision Date Author Comments
# ec85fa0f 05-Dec-2021 msaitoh <msaitoh@NetBSD.org>

s/persistant/persistent/ in comment.


# bbdda93b 16-Jun-2021 riastradh <riastradh@NetBSD.org>

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

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.

show more ...


# 894be606 05-Feb-2021 christos <christos@NetBSD.org>

PR/55975: Riccardo Mottola: Don't try to lock a mutex from an interrupt context.


# f6933b7b 20-Mar-2020 sevan <sevan@NetBSD.org>

Apply the same change as for if_iwi.c r1.114 here.

This driver sleeps during wpi_media_change(), and thus requires an adaptive
mutex for the media lock.


# dd844a0f 30-Jan-2020 thorpej <thorpej@NetBSD.org>

Adopt <net/if_stats.h>.


# 70747dc1 10-Nov-2019 chs <chs@NetBSD.org>

in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.


# 6f7b1407 24-Jun-2019 jakllsch <jakllsch@NetBSD.org>

Put back correct recieve ring allocation size which was lost just over
five years ago mae culpa.

Found by msaitoh@

Should fix PR kern/54320 once pulled up.


# 4f37cd5c 22-Dec-2018 maxv <maxv@NetBSD.org>

Replace: M_COPY_PKTHDR -> m_copy_pkthdr. No functional change, since the
former is a macro to the latter.


# 79fb1406 09-Dec-2018 jdolecek <jdolecek@NetBSD.org>

use pci_intr_establish_xname() everywhere


# a8a5c538 03-Sep-2018 riastradh <riastradh@NetBSD.org>

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a n

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)

show more ...


# df702156 20-Aug-2018 riastradh <riastradh@NetBSD.org>

Suspend the getrfkill thread while we're suspended.

Otherwise it tries to futz with device registers, which doesn't work,
and who knows, maybe is bad.


# 4e052b70 20-Aug-2018 riastradh <riastradh@NetBSD.org>

What we have created, we must destroy.


# 8517c9d1 26-Jun-2018 msaitoh <msaitoh@NetBSD.org>

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 th

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.

show more ...


# 4cec6d9c 23-Oct-2017 msaitoh <msaitoh@NetBSD.org>

If if_initialize() failed in the attach function, free resources and return.


# a02ae984 23-May-2017 ozaki-r <ozaki-r@NetBSD.org>

Apply deferred if_start to more drivers

And annotate some XXX_start as it runs in softint to clarify that
it doesn't need deferred if_start.


# 5cac8917 02-Feb-2017 nonaka <nonaka@NetBSD.org>

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:

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

show more ...


# c34f2d40 02-Feb-2017 jakllsch <jakllsch@NetBSD.org>

wpi(4): use MSI if available.


# 1dc21421 08-Dec-2016 ozaki-r <ozaki-r@NetBSD.org>

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.


# 758ba73e 10-Jun-2016 ozaki-r <ozaki-r@NetBSD.org>

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 rcv

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.

show more ...


# 600d59d0 26-May-2016 ozaki-r <ozaki-r@NetBSD.org>

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# bc1e0d1c 26-May-2016 ozaki-r <ozaki-r@NetBSD.org>

Use M_GETCTX

No functional change.


# e46c1902 09-Jan-2015 bouyer <bouyer@NetBSD.org>

Take sc_rsw_mtx before calling wpi_getrfkill() from wpi_init(),
Problem reported and patch tested by chris at chriswareham.net


# 36687799 06-Jan-2015 bouyer <bouyer@NetBSD.org>

As proposed on tech-net@, introduce a new switch type, PSWITCH_TYPE_RADIO,
to be used to report to userland hardware radio switch changes.
powerd(8) will call a "radio_button" script to handle the ev

As proposed on tech-net@, introduce a new switch type, PSWITCH_TYPE_RADIO,
to be used to report to userland hardware radio switch changes.
powerd(8) will call a "radio_button" script to handle the event.
This script can e.g. start or stop wpa_supplicant.
Update wpi(4) to report PSWITCH_TYPE_RADIO events to sysmon.

show more ...


# d30eb179 19-Dec-2014 bouyer <bouyer@NetBSD.org>

Consistently take the interface down when the radio swicth is off.


# 4db8b1d1 08-Aug-2014 jmcneill <jmcneill@NetBSD.org>

wpi_fix_channel hack no longer needed with recent scanning changes


1234