History log of /openbsd/sys/dev/ic/ath.c (Results 1 – 25 of 125)
Revision Date Author Comments
# cf96265b 10-Nov-2023 bluhm <bluhm@openbsd.org>

Make ifq and ifiq interface MP safe.

Rename ifq_set_maxlen() to ifq_init_maxlen(). This function neither
uses WRITE_ONCE() nor a mutex and is called before the ifq mutex
is initialized. The new na

Make ifq and ifiq interface MP safe.

Rename ifq_set_maxlen() to ifq_init_maxlen(). This function neither
uses WRITE_ONCE() nor a mutex and is called before the ifq mutex
is initialized. The new name expresses that it should be used only
during interface attach when there is no concurrency.

Protect ifq_len(), ifq_empty(), ifiq_len(), and ifiq_empty() with
READ_ONCE(). They can be used without lock as they only read a
single integer.

OK dlg@

show more ...


# 44956221 26-Mar-2023 jsg <jsg@openbsd.org>

unifdef
ok stsp@


# 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 ...


# 51a6fb14 11-Oct-2020 mpi <mpi@openbsd.org>

Stop exporting `wt_hwqueue' now that drivers don't advertise it.

Pointed by and ok jsg@


# 0cae21bd 10-Jul-2020 patrick <patrick@openbsd.org>

Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.

ok dlg@ tobhe@


# 98da7c78 10-Jul-2020 patrick <patrick@openbsd.org>

Change users of IFQ_PURGE() to use the "new" API.

ok dlg@ tobhe@


# 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 ...


# 6696c7f4 31-Jan-2018 stsp <stsp@openbsd.org>

Fix 11g ifmedia modes in ath(4) (shown by 'ifconfig ath0 media').

There was code which set them up but didn't include 11b channels which
are part of 11g. And there was a hack which effectively strip

Fix 11g ifmedia modes in ath(4) (shown by 'ifconfig ath0 media').

There was code which set them up but didn't include 11b channels which
are part of 11g. And there was a hack which effectively stripped important
flag bits away and wouldn't work for modes with overlapping channels (b/g).
As a result, some flags were missing from 11g channels the driver reported
to net80211, which skipped over those channels when building the media list.

This gets us one step closer to supporting the AR5424.

ok mpi@

show more ...


# c6fb4e3c 31-May-2017 stsp <stsp@openbsd.org>

The net80211 stack was providing a 'beacon miss timeout' value (in ms)
which specified how much time may elapse without beacons before drivers
begin searching for a new AP.

Drivers convert this time

The net80211 stack was providing a 'beacon miss timeout' value (in ms)
which specified how much time may elapse without beacons before drivers
begin searching for a new AP.

Drivers convert this timeout value into the amount of beacons they're allowed
to miss. Having the stack provide this number upfront simplifies things.

ok mpi@

show more ...


# 265a1ec5 11-Apr-2017 dhill <dhill@openbsd.org>

Partially revert previous mallocarray conversions that contain
constants.

The consensus is that if both operands are constant, we don't need
mallocarray. Reminded by tedu@

ok deraadt@


# 1b67e2c5 09-Apr-2017 dhill <dhill@openbsd.org>

Convert some malloc(9) to mallocarray(9)

ok deraadt@


# 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().


# 8fa13e1f 12-Jan-2016 stsp <stsp@openbsd.org>

Remove wireless turbo mode support. It is a non-standard extension
which only worked with ath(4) devices from a decade ago.
Diff tested on ath(4) hardware by me to verify that 11a/b modes still work.

Remove wireless turbo mode support. It is a non-standard extension
which only worked with ath(4) devices from a decade ago.
Diff tested on ath(4) hardware by me to verify that 11a/b modes still work.
ok reyk deraadt chris sthen kettenis

show more ...


# 9d022f3e 08-Dec-2015 tedu <tedu@openbsd.org>

No trailers has been the default and only option for 20 years, yet some
drivers still set IFF_NOTRAILERS while others do not. Remove all usage of
the flag from the drivers which in ancient times used

No trailers has been the default and only option for 20 years, yet some
drivers still set IFF_NOTRAILERS while others do not. Remove all usage of
the flag from the drivers which in ancient times used it (and the modern
drivers which blindly copied it from those drivers of yore).
suggested by guenther. ok mpi

show more ...


# 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 ...


# 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.


# 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@


# aa3cabd0 12-Jul-2014 tedu <tedu@openbsd.org>

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.


12345