History log of /openbsd/sys/dev/pci/if_iwi.c (Results 1 – 25 of 149)
Revision Date Author Comments
# 0f9891f1 24-May-2024 jsg <jsg@openbsd.org>

remove unneeded includes; ok miod@


# 5b133f3f 08-Mar-2023 guenther <guenther@openbsd.org>

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@


# 52a13037 21-Apr-2022 stsp <stsp@openbsd.org>

Use memset() to initialize struct ieee80211_rxinfo properly.

Sven Wolf noticed that scans on ral(4) are buggy ever since I added a new
field to this struct. Turns out a lot of drivers were initializ

Use memset() to initialize struct ieee80211_rxinfo properly.

Sven Wolf noticed that scans on ral(4) are buggy ever since I added a new
field to this struct. Turns out a lot of drivers were initializing fields
one-by-one, leaving any newly added fields uninitialized by default.

Affected drivers may report wrong channel numbers for received beacons.
The net80211 stack will discard such beacons, assuming they were received
on the wrong channel due to signal leakage. Scanning is broken as result.

ok miod@

show more ...


# 8d2c75e4 11-Mar-2022 mpi <mpi@openbsd.org>

Constify struct cfattach.


# e1a9b71e 15-Apr-2021 stsp <stsp@openbsd.org>

Since iwi(4) doesn't call into net80211_newstate() the interface link state
must be updated by the driver in order to get packets to flow.

In case of WPA the link state was updated as a side-effect

Since iwi(4) doesn't call into net80211_newstate() the interface link state
must be updated by the driver in order to get packets to flow.

In case of WPA the link state was updated as a side-effect of a successful
WPA handshake. This commit fixes the WEP and plaintext cases.

Similar fix as recently committed to ipw(4).

Additionally, check for errors from iwi_auth_and_assoc() and keep scanning
if this function fails.

Problem confirmed and fix tested by matthieu@
ok deraadt@

show more ...


# 63bcfa73 10-Jul-2020 patrick <patrick@openbsd.org>

Change users of IFQ_DEQUEUE(), IFQ_ENQUEUE() and IFQ_LEN() to use the
"new" API.

ok dlg@ tobhe@


# f1d9eb97 30-Sep-2019 dlg <dlg@openbsd.org>

remove the "copy function" argument to bpf_mtap_hdr.

it was previously (ab)used by pflog, which has since been fixed.
apart from that nothing else used it, so we can trim the cruft.

ok kn@ claudio@

remove the "copy function" argument to bpf_mtap_hdr.

it was previously (ab)used by pflog, which has since been fixed.
apart from that nothing else used it, so we can trim the cruft.

ok kn@ claudio@ visa@
visa@ also made sure i fixed ipw(4) so i386 won't break.

show more ...


# bd3bb04c 18-Sep-2019 dlg <dlg@openbsd.org>

don't hand roll bpf_mtap_hdr functionality, just use bpf_mtap_hdr.

the radiotap code prepends a big struct to the packets, and wires
them up with the packet by putting an mbuf on the stack and using

don't hand roll bpf_mtap_hdr functionality, just use bpf_mtap_hdr.

the radiotap code prepends a big struct to the packets, and wires
them up with the packet by putting an mbuf on the stack and using
that as the head of an mbuf chain. bpf_mtap_hdr does the chain head
thing for us, so shrink this code by calling the bpf function.

there's some other drivers that do this too, so if anyone wants a
free commit they should go looking in the other wireless drivers
and do the same change.

ok claudio@

show more ...


# 8fbaf8a2 12-Sep-2019 stsp <stsp@openbsd.org>

Make wireless drivers call if_input() only once per interrupt.

This reduces drops caused by the ifq pressure drop mechanism and hence
increases throughput. Such drops are visible with e.g. 'netstat

Make wireless drivers call if_input() only once per interrupt.

This reduces drops caused by the ifq pressure drop mechanism and hence
increases throughput. Such drops are visible with e.g. 'netstat -dnI iwm0'.

Not all affected drivers have been tested yet but these changes are largely
mechanical and should be safe. As usual, please report any regressions.

With help from dlg@ and mpi@

Problem found by robert@
Tested by robert, jmc, Tracey Emer, Matthias Schmidt, florian, Björn Ketelaars
ok mpi@

show more ...


# 1df5edf4 25-Jul-2019 cheloha <cheloha@openbsd.org>

ipw, iwi, iwm, iwn, wpi(4): tsleep -> tsleep_nsec(9); ok stsp@


# 2e342c84 25-Apr-2019 kevlo <kevlo@openbsd.org>

Follow up on jmatthew's suggestion:
in x_media_change(), return the errno from ieee80211_media_change() and
do the error check from x_init().

ok stsp@, jmatthew@, phessler@


# 2fa6698e 26-Apr-2018 pirofti <pirofti@openbsd.org>

net80211: stub SIOCS80211SCAN, make ifconfig scan instant.

The following removes the functionality of the SIOCS80211SCAN ioctl.
After long discussions with stps@, mpi@, and deraadt@ we decided that

net80211: stub SIOCS80211SCAN, make ifconfig scan instant.

The following removes the functionality of the SIOCS80211SCAN ioctl.
After long discussions with stps@, mpi@, and deraadt@ we decided that
this was the correct way of fixing ifconfig scan from blocking the
network stack.

The kernel will continue scanning in the background and filling the
nodes array, but ifconfig scan commands will now basically do just a
SIOCG80211ALLNODES and pretty print the array. So the output stays the
same but is instant.

In fact, when the interface is freshly brought up, if you type fast
enough, you can see the array being filled by running multiple ifconfig
scans in sequence.

The SIOCS80211SCAN ioctl stays for now as wi(4), pgt(4) and malo(4)
still need it around. But not for long...

Another change that this introduces is the fact that ifconfig scan no
longer plays with UP and DOWN. If the interface is down it complains and
exits. This is needed in order to maintain the nodes list.

Works on iwm(4), iwn(4), urtwn(4), run(4) and athn(4).

Tested by mpi@, landry@, florian@, thanks!
OK mpi@.

show more ...


# c37a468c 26-Oct-2017 mpi <mpi@openbsd.org>

Move common code to add/remove multicast filters to ieee80211_ioctl(9).

ok jsg@, stsp@


# 85af8860 29-Mar-2017 stsp <stsp@openbsd.org>

Fix iwi(4) regressions. WPA was broken since 6.0 errata 018.
Also, the firmware was rejecting RTS frames so iwi(4) didn't work against
an OpenBSD athn(4) hostap anymore; fix the config sent to firmwa

Fix iwi(4) regressions. WPA was broken since 6.0 errata 018.
Also, the firmware was rejecting RTS frames so iwi(4) didn't work against
an OpenBSD athn(4) hostap anymore; fix the config sent to firmware.
Prompted by report from bg2200 at jamesjerkinscomputer on misc@
ok deraadt@

show more ...


# 47a8efaf 08-Mar-2017 mpi <mpi@openbsd.org>

Do not clear IFF_UP, even in the error path, clearing IFF_RUNNING
is enough.

This flag should only be set by the stack, drivers shouldn't mess
with it.

Discussed with dlg@ and mikeb@, ok mikeb@, st

Do not clear IFF_UP, even in the error path, clearing IFF_RUNNING
is enough.

This flag should only be set by the stack, drivers shouldn't mess
with it.

Discussed with dlg@ and mikeb@, ok mikeb@, stsp@

show more ...


# 88a08f2a 22-Jan-2017 dlg <dlg@openbsd.org>

move counting if_opackets next to counting if_obytes in if_enqueue.

this means packets are consistently counted in one place, unlike the
many and various ways that drivers thought they should do it.

move counting if_opackets next to counting if_obytes in if_enqueue.

this means packets are consistently counted in one place, unlike the
many and various ways that drivers thought they should do it.

ok mpi@ deraadt@

show more ...


# bdf13d2c 05-Sep-2016 tedu <tedu@openbsd.org>

convert busy flag and tsleep to rwlock as in iwm


# 6a71aa30 13-Apr-2016 mpi <mpi@openbsd.org>

G/C IFQ_SET_READY().


# de6cd8fb 25-Nov-2015 dlg <dlg@openbsd.org>

replace IFF_OACTIVE manipulation with mpsafe operations.

there are two things shared between the network stack and drivers
in the send path: the send queue and the IFF_OACTIVE flag. the send
queue i

replace IFF_OACTIVE manipulation with mpsafe operations.

there are two things shared between the network stack and drivers
in the send path: the send queue and the IFF_OACTIVE flag. the send
queue is now protected by a mutex. this diff makes the oactive
functionality mpsafe too.

IFF_OACTIVE is part of if_flags. there are two problems with that.
firstly, if_flags is a short and we dont have any MI atomic operations
to manipulate a short. secondly, while we could make the IFF_OACTIVE
operates mpsafe, all changes to other flags would have to be made
safe at the same time, otherwise a read-modify-write cycle on their
updates could clobber the oactive change.

instead, this moves the oactive mark into struct ifqueue and provides
an API for changing it. there's ifq_set_oactive, ifq_clr_oactive,
and ifq_is_oactive. these are modelled on ifsq_set_oactive,
ifsq_clr_oactive, and ifsq_is_oactive in dragonflybsd.

this diff includes changes to all the drivers manipulating IFF_OACTIVE
to now use the ifsq_{set,clr_is}_oactive API too.

ok kettenis@ mpi@ jmatthew@ deraadt@

show more ...


# cc500f3f 24-Nov-2015 mpi <mpi@openbsd.org>

No need to include <net/if_arp.h>

This header is only needed because <netinet/if_ether.h> declares a
structure that needs it. But it turns out that <net/if.h> already
includes it as workaround.

A

No need to include <net/if_arp.h>

This header is only needed because <netinet/if_ether.h> declares a
structure that needs it. But it turns out that <net/if.h> already
includes it as workaround.

A proper solution would be to stop declarting "struct ether_arp"
there. But no driver should need this header.

show more ...


# f9ad5574 24-Nov-2015 mpi <mpi@openbsd.org>

The only network driver needing <net/if_types.h> is upl(4) for IFT_OTHER.


# b5d83b91 20-Nov-2015 dlg <dlg@openbsd.org>

shuffle struct ifqueue so in flight mbufs are protected by a mutex.

the code is refactored so the IFQ macros call newly implemented ifq
functions. the ifq code is split so each discipline (priq and

shuffle struct ifqueue so in flight mbufs are protected by a mutex.

the code is refactored so the IFQ macros call newly implemented ifq
functions. the ifq code is split so each discipline (priq and hfsc
in our case) is an opaque set of operations that the common ifq
code can call. the common code does the locking, accounting (ifq_len
manipulation), and freeing of the mbuf if the disciplines enqueue
function rejects it. theyre kind of like bufqs in the block layer
with their fifo and nscan disciplines.

the new api also supports atomic switching of disciplines at runtime.
the hfsc setup in pf_ioctl.c has been tweaked to build a complete
hfsc_if structure which it attaches to the send queue in a single
operation, rather than attaching to the interface up front and
building up a list of queues.

the send queue is now mutexed, which raises the expectation that
packets can be enqueued or purged on one cpu while another cpu is
dequeueing them in a driver for transmission. a lot of drivers use
IFQ_POLL to peek at an mbuf and attempt to fit it on the ring before
committing to it with a later IFQ_DEQUEUE operation. if the mbuf
gets freed in between the POLL and DEQUEUE operations, fireworks
will ensue.

to avoid this, the ifq api introduces ifq_deq_begin, ifq_deq_rollback,
and ifq_deq_commit. ifq_deq_begin allows a driver to take the ifq
mutex and get a reference to the mbuf they wish to try and tx. if
there's space, they can ifq_deq_commit it to remove the mbuf and
release the mutex. if there's no space, ifq_deq_rollback simply
releases the mutex. this api was developed to make updating the
drivers using IFQ_POLL easy, instead of having to do significant
semantic changes to avoid POLL that we cannot test on all the
hardware.

the common code has been tested pretty hard, and all the driver
modifications are straightforward except for de(4). if that breaks
it can be dealt with later.

ok mpi@ jmatthew@

show more ...


# 3016beb6 25-Oct-2015 mpi <mpi@openbsd.org>

arp_ifinit() is no longer needed.


# 11c713bc 01-Sep-2015 deraadt <deraadt@openbsd.org>

sizes for free(), mostly related to firmwares.
ok dlg


# fbc55a51 27-May-2015 kettenis <kettenis@openbsd.org>

Use m_defrag(9) instead of rolling our own inlined version.

ok mikeb@


123456