Age | Commit message (Collapse) | Author |
|
no functional change, found by smatch warnings
ok miod@ bluhm@
|
|
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@
|
|
the first cut of this diff was made with coccinelle using this spatch:
@rule@
type caddr_t;
expression m, off, len, cp;
@@
-m_copydata(m, off, len, (caddr_t)cp)
+m_copydata(m, off, len, cp)
i had fix it's opinionated idea of formatting by hand though, so
i'm not sure it was worth it.
ok deraadt@ bluhm@
|
|
In an_wait() we spin for up to (3 * hz) iterations awaiting AN_EV_CMD.
If we don't see it in a given iteration we block for up to 1 tick and
spin again.
jsg@ suggests instead blocking for 100ms at a time for up to 30
iterations.
Discussed with mpi@. Idea from jsg@. Murmurs of agreement from
claudio@ and kettenis@.
probably ok jsg@
|
|
ok dlg@ tobhe@
|
|
ieee80211 ioctl(2) implementation. Do the same for the driver
specific code of ac(4) and wi(4) wireless network devices.
OK mpi@
|
|
enforce this for the an(4) wireless network device.
found by Ilja Van Sprundel; OK dlg@ deraadt@ mpi@
|
|
The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.
No objection from millert@, ok tedu@, bluhm@
|
|
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@
|
|
|
|
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@
|
|
|
|
|
|
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@
|
|
|
|
From Brainy via Maxime Villard via tech@.
ok kettenis@
|
|
on every received mbuf, so there's no need to initialize this pointer in
the drivers.
Tested by and ok phessler@
|
|
|
|
ok mpi@ kspillner@
|
|
|
|
don't have to. Just remove these include lines.
Compiled on amd64 i386 sparc64; OK henning@ mikeb@
|
|
ok guenther millert kettenis
|
|
ok deraadt@ henning@ claudio@
|
|
these cases the xxstop function is a bit more complicated and has a flag of
some sort, but the use of that flag does not matter; DMA is already ceased
ok dlg
|
|
remove IBSS and HostAP support from net80211 and 802.11 drivers.
it can be used to shrink RAMDISK kernels for instance (like what
was done for wi(4)).
it also has the benefit of highlighting what is specific to IBSS
and HostAP modes in the code.
the cost is that we now have two code paths to maintain.
|
|
pass a pointer to an ieee80211_rxinfo structure containing those two
fields plus an extra flags field that indicates whether the frame was
decrypted by hardware or not.
required for a future fix.
|
|
|
|
See similar rum(4) commit for more info. OK mglocker@
|
|
|
|
often rely on the detach routine for cleanup. So be consistant and
careful by checking for a NULL hook before calling *hook_disestablish
in detach routines.
ok mickey@ brad@ dlg@
|
|
|
|
outbound), using a new BIOCSDIRFILT ioctl;
guidance, feedback and ok canacar@
|
|
|
|
ok mickey@
|
|
ral and NetBSD wi radiotap.
"looks ok" damien@
|
|
This brings net80211 support and support for newer hardware.
In addition ancontrol is no longer needed.
This driver does not yet work on big endian archs like the previous
one did.
"do it" deraadt@
|
|
|
|
from ray lai;
|
|
further net80211 changes. ok mickey@
|
|
- use ETHERTYPE_IP instead of magic value
- saanp -> type_ipv4
From FreeBSD
ok mickey@
|
|
|
|
{ether,atm,fddi}_ifattach already does this.
ok mcbride@ markus@ henning@
|
|
ok mickey@
|
|
|
|
repair sigcache misalignment
|
|
after ether_input_mbuf conversion); also kill some stupid spaces
|
|
Tom: I did not commit a couple of your changes.
i did not include some punctuation fixes (full stops, etc.)
mnemorable -> mnemonic: i decided memorable was probably better
instrunctions -> instruction: i kept the plural
|
|
|
|
screwed on writes though
|
|
not matter)
|