Age | Commit message (Collapse) | Author |
|
doing a full reset. Based on a diff from Hector Martin for Asahi Linux.
ok patrick@, tobhe@
|
|
as noted by patrick@, the txctl functions already free the buffers
|
|
ok miod@
|
|
based on an initial diff by jsg@
brokenness pointed out by kn@
ok jsg@
|
|
from iwm(4), which also looks at the TX_MGMT_ONLY flag. We don't expect
that flag to be ever set for bwfm(4), but it shouldn't hurt and it keeps
things consistent across drivers.
This fixes issues with suspend/resume (including firmware crashes seen on
the M2 Macbook Air).
ok patrick@, stsp@
|
|
The net80211 stack detach routine can trigger more tasks to be scheduled,
e.g. to delete WPA keys. So let's not free the driver's taskq before
net80211 has been detached.
fixed with and ok by mpi@
Crash reported by mlarkin@ who yanked the USB cable to test our fix.
|
|
ok jsg@
|
|
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 channel on which a frame was received.
ieee80211_inputm() was expecting that ic->ic_bss->ni_chan would correspond
to the channel which is currently being scanned. This dates back to older
devices which are manually tuned to the next channel by the driver during
SCAN->SCAN state transitions.
However, this approach is very awkward for drivers which scan across a
whole range of channels in firmware. Such drivers had an ugly workaround
in place which tweaked ni_chan for each received frame.
Introduce a channel number field in the Rx info struct which drivers
can use to indicate the channel on which a frame was received.
If this field is set, net80211 will use it instead of using the current
channel of ic_bss. Use this new mechanism in all affected drivers.
Tested by jmc@, sthen@, and myself on iwm(4) and iwx(4).
Changes to iwn(4) and bwfm(4) are the same mechanical changes to get rid
of the ni_chan tweak, and are therefore expected to work.
ok sthen@ dlg@
|
|
ok deraadt@
|
|
command, which is indicated by the "scan_ver" firmware variable.
ok patrick@
|
|
for different module types, module vendors and module revisions. Make
our driver use the same naming scheme as Asahi Linux.
ok patrick@
|
|
everyone else seems to use ETHERTYPE_EAPOL, and as a bonus it also
appears to be more correct.
ok deraadt@ stsp@
|
|
divisible by 1400, the last chunk isn't marked with an end flag.
ok tobhe@
|
|
will take care of releasing them, as otherwise initialization would
fail some of the time. That chip also contains 3 of these, so make
sure we reset all of them. Necessary on Apple M1 Pro/Max.
|
|
|
|
|
|
a few more chips.
|
|
reliability when bwfm is used as an access point.
ok patrick@
|
|
data. Also add the MAC address to the nvram data when there is a
"local-mac-address" property in the device tree. This makes bwfm(4) work
with the firmware/nvram/clm_blob files provided with MacOS on the Apple
M1 Macs.
ok patrick@
|
|
device into D3 and do a hot-resume if possible. Otherwise we need to clean
up the resources to allow complete HW re-initialization to take place.
|
|
|
|
the connection because an AP is gone away, this makes sure we don't
end up picking a now non-existant AP over and over.
Another problem this works around is that when trying to re-join that
AP, the attempt to connect would not yield any event message from the
firmware, and then we would get stuck. Since we now definitely choose
a different AP, this issue does not show up.
ok stsp@
|
|
React to deauth/disassoc and link state events if we're
already past the SCAN stage.
ok stsp@
|
|
SSIDs are binary data, not NUL-terminated strings.
ok patrick@
|
|
directly after having successfully associated. In that case we should
ignore the message, because otherwise we re-scan, re-associate and then
get stuck in a loop. Ignoring the unsolicited assoc status even leads
to a successful connection.
Found by and ok gerhard@
|
|
board's compatible string, when printing an error about not being able
to load the firmware. Since most NVRAM files are board- or package-
specific, having the compatible makes it easier for us to find the
correct files, so that we can add them to the bwfm-firmware port.
ok kurt@
|
|
to load the CLM blob like the SDIO backend already does. Additionally it
is also helpful for the PCIe backend to try a file named after the device
tree compatible. Thus refactor the SDIO code and make it available for
both SDIO and PCIe.
|
|
the same time.
|
|
|
|
little bit more to do though before it can be enabled.
|
|
This works around an issue on the BCM43602 where ieee80211 calls
this too quickly during authentication and triggers "unexpected
pairwise key update" errors.
ok patrick
|
|
get_routefd() and set_user().
|
|
|
|
promiscuous mode.
ok gerhard@
|
|
splsoftnet was used for the upper layers of the network stack and
should no longer be used.
OK patrick@
|
|
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.
|
|
ok dlg@ tobhe@
|
|
on the RockPro64 WiFi module.
Note that there is no fiirmware for this chip in the bwfm-firmware package
at the moment.
ok patrick@
|
|
constraints in a separate blob, instead of in the firmware.
This .clm_blob needs to be loaded as well.
|
|
external tool to pre-process the NVRAM, even though it's simple to
do ourselves. This allows easier firmware distribution.
ok kurt@
|
|
This reduces drops caused by the ifq pressure drop mechanism and hence
increases throughput.
ok tobhe@
|
|
ok bluhm@
|
|
passive scans, which works well enough as long as you don't use
hidden networks. Even without hidden networks, using an active scan
seems to be quicker and feels like it works better.
ok stsp@
|
|
to connect, e.g. due to a timeout, we will switch the state to SCAN.
Unfortunately this skips clearing the active channel set, which
means that on a scan on all bands only the nodes on the active
channel set, which is defined by whatever node we tried to connect
to, are allowed and all other APs are ignored. Fix this by properly
calling begin_scan(). When we fail to connect and start a scan,
make sure to let the chip know that we don't want to associate
anymore.
Another issue existed when we interrupt a scan, for instance by
setting a new nwid or wpakey. In this case we didn't abort the
scan and started a new scan while the old one as still active.
This could lead to a SCAN -> SCAN transition loop.
Remove the "set ssid" event, since this would be an event in
addition to a failed auth/assoc event, which would make us try
to handle failure twice.
Discussed with and ok stsp@
|
|
Synced from iwm(4).
ok patrick@
|
|
wiping the entire cache every time a scan is triggered.
This has benefits for userland programs trying to look at scan results,
and for drivers which don't get a full view from hardware on every scan.
Nodes will still be evicted from the cache in one of several ways:
Add a new way of timing out inactive nodes which don't send a beacon
within 10 scan iterations, for client mode only. This should get rid
of stale APs if we're scanning for some time in a changing environment.
If we fail to associate a few times, the corresponding node is removed.
If net80211 transitions back to INIT state (e.g. because of a
user-initiated configuration change) all nodes are removed.
When a background scan starts all nodes will be removed. This could be
revisited later but has been intentionally left as-is for now.
Tested by myself, jmc@, benno@, procter@ on iwm(4), athn(4) and ral(4).
|
|
the limited ring for asynchronous can easily overflow.
Work around this by chaining the mbufs into a list.
Fixes a panic for jcs@
ok stsp@
|
|
|
|
all nodes and set the link down, this already happened the first
time we went to SCAN mode. This brings us in line with the net80211
stack and fixes an incomplete node list during ifconfig(8) scan.
|