Age | Commit message (Collapse) | Author |
|
in x_media_change(), return the errno from ieee80211_media_change() and
do the error check from x_init().
ok stsp@, jmatthew@, phessler@
|
|
a 16-bit value, so we have to use letoh16() instead of letoh32().
Also properly cast it to signed, so that it can be sign-extended
properly.
ok stsp@
|
|
ok patrick@ mpi@
|
|
error cases.
|
|
This task is used to deliver mbufs (for events, not data), but it's
possible that the queue overruns. In that case it does leak mbufs.
For now, assert the size to see if we hit the issue.
|
|
ifconfig asks for such information.
ok patrick@
|
|
the network stack since the stack will create the node for us if we
pass the ibss stack. On assocation request the node already has to
exist, so we error out if we don't have a record of the node. Fixes
hostap on 5 GHz channels, since now the node's channel is recorded
correctly.
|
|
sent in order. Otherwise it is possible that the key is set before
we send out the EAPOL packet, or that packets are sent out before
the key is set. Thus modify the SDIO backend to put both types into
the same internal TX queue, which will be sent asynchronously.
Discussed with bluhm@
|
|
|
|
check.
|
|
specific receive path into the generic receive path, since PCIe
supplied packets can be misaligned as well.
|
|
seen by Coverity CID 1470240. Cast the ieee80211_frame struct pointer
to uint8_t to address concerns raised by Coverity CID 1470239 and CID
1470237.
ok stsp@
|
|
not in INIT state. Otherwise we can have bogus state changes on ifconfig
down. Also don't try to end a scan if we were not scanning.
|
|
the channel specification (channel, freq, bandwidth, control channel)
which is parsed and understood by the bwfm(4) firmware. Another part
is that we shouldn't start a scan if the channel is selected by the
user, otherwise we override the chosen channel. The remaining part is
bringing the device down properly. If it's not disabled properly, we
cannot bring it up again.
ok stsp@
|
|
and initialize bwfm(4) later in the case that the firmware was not
available on bootup and was only later installed.
ok stsp@
|
|
accessed using the Chipcommon core anymore.
|
|
ids. So far we were only able to have one command in flight at a time
and race conditions could easily lead to unexpected behaviour, especia-
lly combined with a slow bus and timeouts. With this rework we send or
enqueue a control packet command and wait for replies to happen. Thus
we can have multiple control packets in flight and a reply with the
correct id will wake us up.
|
|
they flush old nodes and set the interface link state to down, like the
framework does.
OK stsp@ pirofti@
|
|
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@.
|
|
don't fault on strict alignment architectures.
|
|
alignment can be variable, it's better to move taking care of alignment
into the BCDC receive code.
|
|
ifq dequeue semantics. This basically means we need to check for
available space before dequeuing a packet. As soon as we dequeue
a packet we commit to it. On the PCIe backend this check can not
be done easily since the flowring depends on the packet contents and
we cannot take a peek. When there is no flowring we cache the mbuf
and send it out as soon as the flowring opened up. Then the ifq can
be restarted and traffic can flow. Typically we usually run out of
packet ids, which can be checked without consulting the packet. The
flowring probably never becomes full as the bwfm(4) firmware takes
the packets off the ring without actually sending them out.
Discussed with dlg@
|
|
function so it can be shared with the SDIO attachment driver.
|
|
in the SDIO bus glue.
|
|
version of the SOCRAM one.
|
|
|
|
a state transitioning race condition. Event packets, like completing
authentication and the following association completion, are usually
received shortly after another. The code that handles those events is
scheduled using a task, so it can easily happen that the state change
caused by the authentication packet was not done before the following
association event arrived. By moving the event packet handling into the
same context as the state task we serialize the processing and remove
the race condition. Fixes connecting to the 5GHz WiFi AP used at a2k18.
ok stsp@
|
|
transitions, which means those state transition won't be shown in dmesg
in interface debug mode. Make drivers print these transitions themselves.
ok patrick@
|
|
handle, into a debug printf. Also do not print a pointer to kernel buffers
so that we don't leak kernel addresses.
Spotted by and ok stsp@
|
|
with nicer integer equivalents.
Spotted by and ok stsp@
|
|
apply the channel to the node, like iwm(4) does, when supplying the
scan response to the net80211 stack. Our stack uses this information
for node selection so it's elementary for it to be correct.
Tested by jcs@
|
|
point including WPA2 support. We now have a different event mask per
mode, so that events that are only useful for STA mode don't interfere
with HOSTAP mode. Power savings is disabled when we act as AP. The
connection events generate 802.11 frames for handling auth/assoc and
deauth/deassoc so that our stack takes note of the connecting nodes.
|
|
settings.
|
|
happens when we successfully associate and the AP tries to initiate the
WPA2 handshake but we haven't received the asynchronous ASSOC event yet.
Dropping the packet will make the AP retry, and at that point we should
have successfully associated. While there, don't feed the event packets
to our network stack. It's been helpful for debugging but now it's time
to let go.
|
|
reached the RUN state, this probably means that we have roamed to
a different AP. In that case throw us back into SCAN mode and let
the stack look for a new AP to connect to. In the future it might
be worthwhile to use the ROAM event information to read the new AP
information to adjust our stack, but that is further down the road.
|
|
we have to move to the "trying to" ASSOC state. When association has
finished we will receive an ASSOC event, so that we can move into the
RUN state. After that point we will receive ethernet packets and the
WPA2 handshake can occur. The SET_SSID event will now only be used to
bring us back into SCAN when it notes an error, as it often completes
after we have already done the WPA2 handshake and can not be used to
switch between the different states.
|
|
push the mbuf allocation down into the USB attachment code and now pass
an mbuf to the bwfm(4) receive function.
|
|
for-loops. Oops.
|
|
Intel machines.
|
|
we chose instead of any AP the firmware chooses based on the SSID.
|
|
variable.
|
|
fix up the code for the Cortex-R4 which works the same.
|
|
|
|
|
|
the PCIe-based BCM43602's firmware in the PCI attachment driver.
|
|
|
|
a user perspective, it's rather horrible from a security perspective.
Especially since there has not only been the KRACK attack, but also
exploited wireless firmware. Thus this commit changes the way that
bwfm(4) is integrated into our network stack. Instead of making it
an Ethernet controller with some WiFi capability, deeply integrate
it into the net80211 stack. This way we can do the WPA handshake in
software and we don't have to reimplement or copy too much code from
the net80211 stack. Some code taken from NetBSD where Jared McNeill
committed bwfm(4) with net80211 integration as well.
Discussed with and "looks good" stsp@
|
|
be properly enabled by the correct ioctls.
|
|
which can handle those ioctls quite well for us.
|
|
send us any answers to our request.
|