#
36dba039 |
| 14-Apr-2024 |
jsg <jsg@openbsd.org> |
with empty body loops, put final semicolon on a new line for readability ok bluhm@ jca@
|
#
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 ...
|
#
eb9f82c0 |
| 20-Jul-2020 |
stsp <stsp@openbsd.org> |
The IEEE80211_F_HIDENWID flag is now part of ic_userflags, not ic_flags. Fix code which was still looking for this flag at the old location.
The 'hidenwid' feature was slightly broken as a result: T
The IEEE80211_F_HIDENWID flag is now part of ic_userflags, not ic_flags. Fix code which was still looking for this flag at the old location.
The 'hidenwid' feature was slightly broken as a result: The SSID was leaked in probe responses to wildcard probe requests. There are other trivial ways of snooping a "hidden" SSID however so this is not a big deal.
Problem reported by Mogens Jensen.
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@
|
#
bdb45ccf |
| 19-Feb-2020 |
claudio <claudio@openbsd.org> |
Similar to other wireless drivers use bpf_mtap_hdr() to prepend the radiotap header instead of using a fack mbuf in the stack. OK stsp@
|
#
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 ...
|
#
c37a468c |
| 26-Oct-2017 |
mpi <mpi@openbsd.org> |
Move common code to add/remove multicast filters to ieee80211_ioctl(9).
ok jsg@, stsp@
|
#
395800d4 |
| 12-Aug-2017 |
stsp <stsp@openbsd.org> |
Fix Coverity CID 1453237: With rt2661 chips ral(4) was writing some stack memory garbage to the hardware while setting up beacon transmission. The driver left some fields of a struct rt2661_tx_desc o
Fix Coverity CID 1453237: With rt2661 chips ral(4) was writing some stack memory garbage to the hardware while setting up beacon transmission. The driver left some fields of a struct rt2661_tx_desc on stack uninitialized. Zero out the entire struct before using it. ok mpi@
show more ...
|
#
8443256d |
| 03-Jul-2017 |
kevlo <kevlo@openbsd.org> |
Replace slot time durations with macros.
ok stsp@
|
#
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 ...
|
#
1e1858b6 |
| 13-Apr-2016 |
mpi <mpi@openbsd.org> |
G/C IFQ_SET_READY().
|
#
ef89f9e6 |
| 11-Dec-2015 |
mpi <mpi@openbsd.org> |
Replace mountroothook_establish(9) by config_mountroot(9) a narrower API similar to config_defer(9).
ok mikeb@, deraadt@
|
#
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 ...
|
#
f9ad5574 |
| 24-Nov-2015 |
mpi <mpi@openbsd.org> |
The only network driver needing <net/if_types.h> is upl(4) for IFT_OTHER.
|
#
96bfa349 |
| 20-Nov-2015 |
mpi <mpi@openbsd.org> |
Check for space on the ring before dequeuing packets.
Allows us to get rid of mq_requeue(9) and IFQ_POLL(9) because wireless drivers use a special queue for management frames.
Tested by stsp@, ok d
Check for space on the ring before dequeuing packets.
Allows us to get rid of mq_requeue(9) and IFQ_POLL(9) because wireless drivers use a special queue for management frames.
Tested by stsp@, ok dlg@, stsp@
show more ...
|
#
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 ...
|
#
351e1934 |
| 04-Nov-2015 |
dlg <dlg@openbsd.org> |
replace the ifqueues in net80211 with mbuf_queues.
the specific queues are ic_mgtq, ic_pwrsaveq, and ni_savedq. rtw had its own queue for beacons.
tested by mpi@ and jmc@ ok mpi@
|
#
d2d9c74c |
| 25-Oct-2015 |
mpi <mpi@openbsd.org> |
arp_ifinit() is no longer needed.
|
#
0871fbd6 |
| 09-Sep-2015 |
deraadt <deraadt@openbsd.org> |
sizes for free(); ok semarie
|
#
b688c74f |
| 29-Aug-2015 |
deraadt <deraadt@openbsd.org> |
firmware sizes are known; use them for free()
|
#
21dab745 |
| 14-Mar-2015 |
jsg <jsg@openbsd.org> |
Remove some includes include-what-you-use claims don't have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
#
64fa60b7 |
| 10-Feb-2015 |
mpi <mpi@openbsd.org> |
Wireless drivers call if_input() via ieee80211_input() which set `rcvif' on every received mbuf, so there's no need to initialize this pointer in the drivers.
Tested by and ok phessler@
|
#
f79ee556 |
| 22-Dec-2014 |
tedu <tedu@openbsd.org> |
unifdef INET
|
#
9b18ffb8 |
| 19-Dec-2014 |
guenther <guenther@openbsd.org> |
Use <sys/endian.h> instead of <machine/endian.h>
ok dlg@ mpi@ bcook@ millert@ miod@
|
#
aaeadf5e |
| 06-Sep-2014 |
jsg <jsg@openbsd.org> |
reduce the amount of pci includes
|