| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
ok stsp jsg
|
|
|
|
|
|
| |
OK dlg@, bluhm@
No Opinion mpi@
Not against it claudio@
|
|
|
|
|
|
|
|
|
|
| |
Calculating "remain" by subtracting the offset after every parsed MPDU
is wrong and not necessary. "offset" always points to the current position
in the receive buffer and the maximum size of the buffer is fixed,
thus knowing "offset" is sufficient for finding "maxlen".
Found by and fix from Christian Erhardt
ok stsp@
|
|
|
|
|
|
|
| |
This extra data seems to trigger an assertion in the firmware and
the Linux iwlwifi driver does not send this data either.
tested by Nicola Dell'Uomo and jmc@
|
|
|
|
| |
Pointed by and ok jsg@
|
|
|
|
|
|
|
|
|
|
|
| |
from an access point or is put down via ifconfig. Otherwise new Rx block ack
sessions could be refused upon reassociation due to a bogus counter value.
Found by zxystd from the OpenIntelWireless project (drivers for macOS).
Testing by jmc@, kevlo@, and Sven Falempin.
ok phessler@ mpi@ kevlo@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case of AX201 we need to be careful about which devices are matched by
the driver because devices with technical differences share the same PCI
product ID. The driver must additionally match against a table of known
PCI subsystem product IDs to identify an AX201 device correctly.
For consistency, I wrote similar matching code for AX200 devices. This matches
my AX200 device correctly but fails to recognize some other devices which were
previously attached and working.
Turns out the Linux driver seems to use AX200 subsystem product IDs merely
for marketing purposes. It makes the operating system advertise some AX200
devices with distinct trademarked names. There are no technical differences
that concern the driver and there is no exhaustive list of possible AX200
subsystem product IDs. So just match them all.
Problem reported by Bobby Reynolds.
|
|
|
|
|
|
|
|
|
|
| |
Matching firmware can be installed with fw_update(1).
Align our device initialization sequence more closely to how Linux does it.
We still use a different MSI-X configuration but register values written
up to that point are now identical.
patrick@ provided help with debugging several issues along way, thanks!
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The iwx(4) command queue has 256 entries in hardware. The Linux driver
contains an abstraction layer which allows it to allocate just 32 command
queue entries in software. Because I misunderstood how this works iwx(4)
ended up with 32 command queue entries, but without a shim which presents
these 32 entries as 256 entries to hardware.
Our command queue size was later bumped to 64 to make fatal firmware errors
during initialization disappear. The problem was still not fully understood
at that time. I didn't realize that firmware errors coincided with the
command queue index wrapping around.
Hardware expects the queue to wrap at 256 entries so fix this problem for
good in a simple way: Allocate 256 entries for the command queue, just
like iwm(4) does.
This will allow us to enable background scanning on iwx(4), which so far
triggered firmware errors due to additional scan commands causing the
command queue index to wrap at 64.
|
|
|
|
|
|
| |
"new" API.
ok dlg@ tobhe@
|
|
|
|
|
| |
The -48 firmware image has been available via fw_update(4) for
about 4 weeks by now. It is contained in iwx-firmware-20191022p1.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Add declarations of "version 2" scan flags from iwlwifi and prepare the
iwx_scan_channel_cfg_umac struct for life beyond version 1.
None of this is needed yet. But we will need this at some point and I've
already written the diff, hoping it would prevent firmware errors (which
of course it didn't).
|
|
|
|
|
|
| |
Compared to iwm(4) devices the BE and BK fifo numbers have been swapped
in iwx(4) hardware. This has no real consequences for us since we send
all frames at the same access category, but I'm fixing the mapping anyway.
|
|
|
|
|
|
| |
The driver will turn the device off and print a message to dmesg if the
firmware signals critical temperature. It looks like the firmware will
also make use of a Tx-backoff mechanism to regulate device temperature.
|
|
|
|
|
|
|
|
| |
Firmware will add SSIDs specified via the scan command to its probe requests.
There is no need to copy an SSID into the template.
This code path is not used yet because active scanning mode is still
disabled in this driver.
|
|
|
|
|
|
|
|
|
|
| |
The data structure for the scan command contains a union which represents
various versions of the scan command. The driver wrote to the scan_priority
field in version 1 data regardless of the scan command version actually
expected by firmware.
Perform that write only for scan command version 1, as intended.
Testing suggests that this prevents occasional firmware errors during scans.
|
|
|
|
|
|
|
|
|
| |
template.
This code path is not used yet because active scanning mode is still
disabled in this driver.
ok kn@
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a "fatal firmware error" at run-time.
Thanks again to Sara Sharon who provided the hint that the error trace
I was looking at indicated that the firmware was running into a problem
while trying to flush its Tx queues, and that this could be related to
the Tx byte count table not being maintained properly.
Tested by sven falempin and myself.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Much thanks to Sara Sharon who helped me by providing hints about new
firmware behaviour.
Contrary to older iwn(4) and iwm(4) devices, key material is no longer part
of the Tx command. Instead, firmware will encrypt outgoing traffic as soon
as the station associated with a Tx queue has an encryption key configured.
Each Tx queue is created with an associated station ID (which in our case is
a constant and represents the AP) and a traffic identifier (TID). The driver
was configuring data Tx queues with the "management TID". This magic TID value
bypasses hardware encryption and resulted in plaintext frames being sent while
received frames were decrypted as expected since the station had a key.
This behaviour looked rather strange and was difficult for me to debug.
The clues which Sara provided led to the solution:
iwx(4) must configure data Tx queues with the "non-QOS TID" in order to
allow for encryption in the firmware's data Tx path.
The rest of the offload mechanism works as it did on iwn(4) and iwm(4).
Tested by sven falempin and myself.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The firmware will notify the driver when it decides to change Tx rate.
Based on those notifications the driver updates the value displayed by
ifconfig. This is similar to how bwfm(4) and urtwn(4) handle this.
Offloading Tx rate selection should allow us to eventually delete AMRR/MiRA
support code from iwx(4). That code is disabled for now, not yet deleted.
For now, the driver restricts firmware Tx rate selection to 11n/20MHz mode
because that's what net80211 can support.
|
|
|
|
|
|
|
| |
while building a scan command for the firmware. This isn't the right place
to set our address, which has already been set during driver initialization.
ok mpi@ kettenis@
|
|
|
|
|
|
|
|
|
| |
With iwn(4) and iwm(4) this was only required for Tx aggregation, which
we don't use yet in iwx(4). But it looks like iwx(4) firmware will run
into fatal errors if we neglect to update this table. The Linux iwlwifi
driver always updates this table so firmware could be relying on it.
Tested by jcs@, sven falempin, and myself.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On iwx(4) devices there is no two-step firmware loading process with an
INIT and RT image, as was the case with iwn(4) and iwm(4).
Loading the image twice leaves firmware in a semi-operational state with
problems such as fatal firmware errors and missing regulatory domain
update notifications.
Tested by jcs@, sven falempin, and myself.
ok patrick@
|
|
|
|
|
|
|
|
|
|
|
|
| |
iwx(4) devices have a hardware component (the "communications hub")
that can detect which country it is running in. The firmware will
then inform the driver about the auto-detected regulatory domain.
For now, just print a message which shows the detected regulatory domain
if 'ifconfig iwx0 debug' is enabled. It is up to the driver whether it
wants to react to regulatory domain updates.
Tested by jcs@, sven falempin, and myself.
|
|
|
|
|
|
|
|
|
| |
parser inherited from iwm(4).
The old parsing code is merely disabled for now and will be deleted later.
Deleting the old code at the same time would result in a very untidy diff.
Tested by jcs@, sven falempin, and myself.
|
|
|
|
|
|
|
| |
Allocate the context info DMA region at attach time rather than when loading
firwmare. Prevents this allocation from failing due to memory fragmentation.
Tested by sven falempin and myself.
|
|
|
|
|
|
|
|
|
|
|
| |
iwx_alloc_tx_ring() and iwx_tx() used different constants when computing
the Tx queue ID. Make them use the same.
Fortunately, this bug was harmless since we ended up using Tx queue 5 in
both places. It would have broken badly as soon as we started using
multiple Tx queues.
ok mpi@
|
| |
|
|
|
|
|
|
| |
This does not switch to newer firmware yet. The driver currently fails to
send frames when -48 firmware is used. And the -48 firmware image is not
yet available in fw_update(1).
|
|
|
|
|
|
|
|
| |
This command doesn't seem to be needed with the ax200 device we currently
support. But it does not hurt and will be needed for other devices this
driver intends to support in the future.
ok mpi@
|
|
|
|
|
|
|
|
|
| |
The iwx(4) driver intends to disable bluetooth. The command we sent to the
firmware says "wifi only", but also enabled a bluetooth module. This seems
to work as intended but is ambiguous. Linux also leaves all modules disabled
in wifi-only mode. So do not enable any BT modules in the BT_COEX command.
ok mpi@
|
|
|
|
|
|
| |
station table. The Tx flush operation depends on the station being present.
Avoids a fatal firmware error when the driver moves out of AUTH state.
|
|
|
|
|
|
|
|
| |
Some firmware versions don't expect LMAC_5G_INDEX in the binding command.
Set that value under the same conditions as the Linux driver does, which
makes this command work on -48 firmware.
ok mpi@
|
|
|
|
|
|
|
|
| |
Newer iwx(4) firmware versions will require a larger beacon filter command.
The extra fields fields are initialized to zero even on Linux but newer
firmware will require a size change anyway.
ok mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iwx(4) firmware understands two different variants of these commands.
Both variants are documented with the same command API version number,
but they use different sizes for an embedded struct which contains
information about channels. Which variant to use depends on whether
the firmware advertises support for the "ULTRA_HB_CHANNELS" feature.
The code I wrote to handle both cases had a bug in case this feature is
not supported: The channel info size difference was only accounted for
while computing the command's length, but not while writing command data.
This bug does not affect devices presently matched by iwx(4).
But it is possible that other devices may need this fix in the future.
So, for now, fix the buggy code path instead of removing it.
ok mpi@
|
|
|
|
|
|
|
|
|
| |
This flag restricts a wireless driver to MCS0 - MCS7 for both transmission
and reception. It can be set to work around packet loss in 11n mode caused
by unused antenna connectors on a MIMO-capable wireless network device.
man page tweak from tracey@
ok deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During a transmit burst, e.g. while tcpbench is running, iwm and iwx will
queue up to 224 frames on the Tx ring.
Rate control will make decisions a lot more often than just every 224 frames.
Which means that results were reported and evaluated even if they did not
correspond to the most recently chosen rate, spoiling the data available
to the rate control algorithm.
Prevent this problem by only reporting frames which match the currently
chosen Tx rate.
ok mpi@
|
|
|
|
| |
No functional change.
|
|
|
|
|
| |
This fix is needed for benchmarking MiRa against a fixed Tx rate, since
MiRA will also use SGI if available.
|
| |
|
| |
|
|
|
|
| |
include the CRC trailer in the minimum length check for regular frames.
|
| |
|
|
|
|
|
|
|
|
| |
- use a distinct station ID for monitor STA
- set station type to "general purpose" instead of "link"
- use "any address" (zero) as station address instead of broadcast address
- use the inject monitor Tx queue
- accept multicast frames
|
|
|
|
|
|
|
|
|
|
|
| |
Rx interrupt handling can lead to a race where the interrupt is handled
before the shared data was updated. As a workaround each "real" interrupt
enables the "periodic" Rx interrupt which triggers after 8 ms and detects
any dangling Rx activity. If dangling Rx activity was detected the periodic
interrupt is restarted, if not it stays disabled until the next "real" Rx
interrupt is handled.
The periodic interrupt is not supposed to write IWX_CSR_FH_INT_STATUS
unless it has detected dangling Rx activity.
|
|
The iwx(4) driver is based on code from iwm(4) and Linux iwlwifi.
We are using a separate driver for this hardware family to avoid introducing
even more complexity to iwm(4). Firmware loading and the Tx machinery in
particular work differently compared to iwm(4) devices.
Device firmware can be installed with fw_update(8).
These devices support Tx rate scaling and Tx aggregation in firmware but we
leave this disabled for now and adapt the Tx rate with MiRa/AMRR instead.
Active scans (scans with probe requests) and background scans don't work yet.
Otherwise this driver has the same feature set as iwm(4).
|