When setting chan->max_power after registering the wiphy, chan->max_reg_power
needs to be used as a limit
Signed-off-by: Felix Fietkau <[email protected]>
For the external PA (TSSI OFF) case, the target power needs to be read
from a different location in EEPROM
Signed-off-by: Felix Fietkau <[email protected]>
Introduce a knob in mt7603 debugfs in order to enable/disable
energy detection based on CCA thresholds
Signed-off-by: Lorenzo Bianconi <[email protected]>
- tx power is stored in the channels after ieee80211_register_hw, so
chan->orig_mpwr needs to be updated as well
- for non-TSSI devices, mt76x2e needs to use a different target power value
from the EEPROM
- fix a rounding error in a few places (need to round up, not down)
Signed-off-by: Felix Fietkau <[email protected]>
Now that the sequence number allocation is fixed, we can finally send a BAR
at powersave wakeup time to refresh the receiver side reorder window
Signed-off-by: Felix Fietkau <[email protected]>
If the MT_TXD3_SN_VALID flag is not set in the tx descriptor, the hardware
assigns the sequence number. However, the rest of the code assumes that the
sequence number specified in the 802.11 header gets transmitted.
This was causing issues with the aggregation setup, which worked for the
initial one (where the sequence numbers were still close), but not for
further teardown/re-establishing of sessions.
Additionally, the overwrite of the TID sequence number in WTBL2 was resetting
the hardware assigned sequence numbers, causing them to drift further apart.
Fix this by using the software assigned sequence numbers
Signed-off-by: Felix Fietkau <[email protected]>
__sw_hweight8() is only defined if CONFIG_GENERIC_HWEIGHT is enabled.
The function that works on all architectures is hweight8().
Signed-off-by: Felix Fietkau <[email protected]>
The previous version only accidentally disabled A-MSDU deaggregation by
using the wrong mask for rx length configuration, which left previous
length value in place.
Fix the length and initialize the register completely to keep A-MSDU
de-aggregation remaining disabled
Signed-off-by: Felix Fietkau <[email protected]>
In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().
Fixes: c8846e101502 ("mt76: add driver for MT7603E and MT7628/7688")
Signed-off-by: Wei Yongjun <[email protected]>
These packets have no txwi entry in the ring, so tracking via tx status does
not work. To prevent PS poll requests from being unanswered, end the service
period right away
Signed-off-by: Felix Fietkau <[email protected]>
Use the correct variable in the check. Fixes an uninitialized variable warning
Reported-by: Gustavo A. R. Silva <[email protected]>
Fixes: c8846e1015022 ("mt76: add driver for MT7603E and MT7628/7688")
Signed-off-by: Felix Fietkau <[email protected]>
Move mt76x02_init_tx_queue and mt76x02_init_rx_queue in mt76
module in order to be reused adding support for mt7603 driver
and remove duplicated code.
Squash mt76x02_init_tx_queue and mt76x02_init_rx_queue in
mt76_dma_alloc_queue
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Move mt76x02_set_irq_mask in mt76 module in order to be reused
adding support for mt7603 driver and remove duplicated code
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
The vendor driver also does not enable it, and it has been shown to cause
some issues. It can be re-enabled for testing through debugfs
Signed-off-by: Felix Fietkau <[email protected]>
The tx ba window size which is set to HW should not
exceed the actual window size of the ba session,
otherwise the HW might aggregate more packets than
what's negotiated.
Signed-off-by: Felix Fietkau <[email protected]>
For some reason the BMC queue flush does not work properly if packets were
queued for a BSS0_n interface (secondary vif).
Work around this issue by using the DMA scheduler to filter the queue before
issueing the BMC queue flush.
Signed-off-by: Felix Fietkau <[email protected]>
Sync CCK values with reference driver.
Use OFDM values obtained from the hardware reset value
Stop tx/rx on change only using the ARB_SCR register
Signed-off-by: Felix Fietkau <[email protected]>
The hardware needs to be notified of peers using dynamic SMPS mode
Fixes using dual-stream rates on some clients (e.g. Intel)
Signed-off-by: Felix Fietkau <[email protected]>
Clear pending PSE request bit in order to avoid having it trigger by the
firmware at a bad point in time.
Only clear AC queue stuck bits if the PSE reset succeeded
Signed-off-by: Felix Fietkau <[email protected]>
The hardware cannot report accurate tx A-MPDU length information, so tell rate
control to ignore it. Improves tx rate selection
Signed-off-by: Felix Fietkau <[email protected]>