Age | Commit message (Collapse) | Author |
|
|
|
ok stsp@
|
|
|
|
Enable ext IRQs like the Linux driver does it, not later. I did this
differently due to problems in early development that have since
been fixed.
Fixes an interrupt storm during resume which prevents things like
key installation from working, leaving the network link dead.
|
|
I recently enabled automatic recovery from firmware crashes. if loading
firmware at boot would fail with a firmware error then the init task would
call refcnt_finalize() via qwx_stop() before refcnt_init() was called and
trigger a KASSERT in the refcnt code.
ok patrick@, who also reported the problem to me and tested the fix
|
|
It is difficult to make WEP and WPA1/TKIP work with hardware crypto.
Add a comment which explains why.
Ensure that setkey task state is properly cleared when the interface
goes down. This issue was found while trying to add WEP keys for hw
crypto, but is still worth fixing in general.
Also, use m_makespace to append trailing padding for the MIC when
hardware crypto is used in combination with "raw" frame mode (not
the default), instead of blindly adjusting m_len.
ok kevlo@
|
|
ok stsp@
|
|
This reduces CPU load during interrupts, but more importantly works
around an apparent firmware bug where incoming encrypted broadcast
and multicast frames are dropped by firmware if the hardware crypto
engine is unused. (This problem also affects Linux ath11k upstream.)
Offloading CCMP to hardware hence fixes ARP and IPv6 multicast with WPA2.
However, there are known issues with WPA1 and WEP:
While the WPA1 pairwise handshake succeeds, the TKIP group key handshake
fails for unknown reasons, resulting in association failure.
WEP is broken because software crypto is skipped entirely when the driver
uses the "native wifi" frame mode. This results in all packets being sent
in plaintext while WEP is active. In the future, we should be able to fix
this by offloading WEP to hardware as well, or by setting the frame mode
back to "raw" if WEP is used.
If the TKIP/WEP issues affect you badly then take this as an opportunity
to upgrade the access point to WPA2/AES where possible.
Tested by kettenis, kevlo, and myself.
ok kevlo@
|
|
Fixes weird media: lines in ifconfig which show a mix of 802.11 modes
after switching APs, such as:
media: IEEE802.11 autoselect mode 11a (OFDM18 mode 11g)
|
|
Issue found and fix tested by dv@
|
|
On QCNFA765 the monitor status ring does not trigger any interrupts.
Unless the driver keeps polling this ring from a timer the device
will eventually lock up if this ring is enabled.
Even though we're not using this ring yet, add the tiny bits of code
required to poll it so that the next person who enables this code
won't have to waste time figuring out why the device stops working.
The monitor status ring provides details about received frames in special
TLV-format packets which the driver can parse and update statistics with.
Interesting info includes per-frame RSSI. Which we already learn from
beacons, so we don't need to enable an entire extra ring just for that.
Another reason to keep this disabled is that it triggers mbuf corruption
for reasons I haven't been able to figure out. Help welcome.
|
|
Reduces noise with QWX_DEBUG enabled.
|
|
|
|
This silences warnings about a full Rx ring which the Linux driver is
likewise suppressing. They appeared because I used the wrong error code,
ENOBUF vs. ENOSPC.
|
|
This leak is of little consequence in station mode, but would be
problematic in hostap mode.
|
|
Tweak a few things in qwx_dp_rx_tid_del_func() to make it behave
correctly on OpenBSD:
- struct dp_reo_cache_flush_elem: make ts a 64-bit count of nanoseconds
Linux uses jiffies to timestamp dp_reo_cache_flush_elem. Although
OpenBSD has a global jiffies variable, we shouldn't use it outside
of drm(4). I would rather not use our global ticks variable, either.
We can use getnsecuptime(9), a low-res 64-bit nanosecond timestamp,
as a substitute.
- qwx_dp_rx_tid_del_func: replace gettime(9) with getnsecuptime(9)
- qwx_dp_rx_tid_del_func: convert DP_REO_DESC_FREE_TIMEOUT_MS to nanoseconds
- qwx_dp_rx_tid_del_func: reverse timestamp comparison operator
This comparison is backwards. Linux uses the time_after() macro to
test whether a given entry has expired, so our ported code needs to
test whether the current uptime is greater than or equal to a given
entry's expiration time.
Joint effort with stsp@. Tested by stsp@.
ok stsp@
|
|
ESHUTDOWN is an expected thread-synchronization condition which
can be triggered via ifconfig commands. Don't warn about this.
Reported by Marco van Hulten on misc@
|
|
testing + ok phessler@
|
|
testing + ok phessler@ deraadt@
|
|
|
|
|
|
It was not yet possible to hit this code path outside of an error path.
But upcoming changes would easily trigger this and crash the kernel.
|
|
confused
OK stsp@
|
|
|
|
|
|
The request_mem_indication event handler would always allocate a new
buffer to store the firmware's request, potentially leaking an already
existing copy. Ensure that this buffer is always freed, and avoid
allocating it in the first place if we're not currently expecting this
event to occur.
All this would have surfaced the previously fixed bug with the missing
wakeup much earlier. The wakeup was always missed but when the driver
retried it would find the stale buffer from the previous event and not
even enter tsleep.
|
|
requested and OK by stsp@
|
|
Fixes spurious "qwx0: failed to send qmi memory segments: -1" error with
associated lag during 'ifconfig qwx0 down up'
|
|
This matches what iwx(4) is doing.
|
|
Fixes Tx/Rx stalls where the device ran out of free Rx buffers to use.
The device consumes buffers on the Rx refill ring out of order, which
the ring management code I wrote intially would not handle properly.
Instead of using an index into the ring where we would expect to see
a free slot which was in fact occupied, keep track of free buffers via
a bitmap.
|
|
ok phessler@
|
|
|
|
|
|
|
|
|
|
ok stsp@
|
|
|
|
|
|
|
|
|
|
|
|
We must count all Tx attempts in order to avoid the Tx shadow
timeout handler resetting Tx ring pointers when it shouldn't.
|
|
|
|
Gets rid of 'qwx_wmi_tlv_op_rx: unsupported event id 0xb001' in dmesg.
However, roaming does not work yet because the driver's newstate handler
does not handle resulting state transitions.
|
|
Not quite tested yet. It is very hard to fill the queues at present
because Tx operation will freeze when we try. To be investigated next.
|
|
Found by jsg@
|
|
Fortunately this case could only be reached with an empty firmware file.
Found by jsg@
|
|
Fixes qwx0: failed to map Tx buffer: 27
|
|
Fixes CCMP decryption errors in the Rx path.
|
|
This is sufficient to capture 802.11 frames with tcpdump -y IEEE802_11_RADIO.
Meta-data such as RSSI and channel number is not yet recorded.
|