Move aggregation stats array per-phy instead of share it between multiple
interfaces. This is a preliminary patch to add mt7996 driver support.
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Switch to use le32/16_get_bits() to simplfy codes and specify
the size explicitly to avoid potential issues.
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Instead of just taking the maximum per-chain signal strength values,
add an approximation for the sum of the combined signal.
This should more accurately reflect the real signal strength, especially
if the per-chain signal strength values are close to each other
Signed-off-by: Felix Fietkau <[email protected]>
Leave more time to abort transmissions (which could happen at low CCK rates)
Only warn if the last filter command is stuck
Signed-off-by: Felix Fietkau <[email protected]>
MAC80211 doesn't care any decryption error in 802.3 path, so received
frame will be dropped if HW tell us that the cipher configuration is not
matched as well as the header has been translated to 802.3. This case only
appears when IEEE80211_FCTL_PROTECTED is 0 and cipher suit is not none in
the corresponding HW entry.
The received frame is only reported to monitor interface if HW decryption
block tell us there is ICV error or CCMP/BIP/WPI MIC error. Note in this
case the reported frame is decrypted 802.11 frame and the payload may be
malformed due to mismatched key.
Signed-off-by: Xing Song <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Remove mt76_wcid pointer from mt76_tx_status_check signature since it is
always set to NULL
Tested-by: [email protected]
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
napi_schedule() can call __raise_softirq_irqoff(), which can perform softirq
handling, so it must not be called in a pure process context with BH enabled.
Signed-off-by: Felix Fietkau <[email protected]>
The iv from RXD is only for TKIP_RSC/CCMP_PN/GCMP_PN, and it needs a
check for CCMP header insertion. Move mt76_cipher_type to mt76.h to
reduce duplicated code.
Signed-off-by: Xing Song <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
After DMA reset, tx status information for queued frames will never arrive.
Flush the queue to free skbs immediately instead of waiting for a timeout
Signed-off-by: Felix Fietkau <[email protected]>
Frame reception timestamp (low 32-bits) that indicates the value of the
local TSF timer value at the time the first bit of the MAC header in the
received frame (PPDU unit) arriving at the MAC.
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Move mac_work delayed_work and mac_work_count in mt76_phy since it is
used by all drivers. This is a preliminary patch to create a common mcu
library used by mt7615 and mt7921 drivers
Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Move hw data queues in mt76_phy from mt76_dev since mt7915 supports per
phy hw queues in dbdc mode
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Move mcu queue to a dedicated array q_mcu in mt76_dev structure.
This is a preliminary patch to move data queues in mt76_phy and properly
support dbdc
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This is a preliminary patch to move data queues in mt76_phy and properly
support dbdc
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Now that AQL works well on all mt76 drivers, completely replace the arbitrary
burst sizing and number of bursts logic for tx scheduling.
For the short period of time in which AQL does not work well yet, limit each
stations to 16 in-flight packets that have no estimated tx time.
This should avoid filling the queue if a station connects and queues up a
large number of packets before rate control information is available, especially
with hardware rate control
Signed-off-by: Felix Fietkau <[email protected]>
mt7615 and newer drivers do not need this, since they use sequence number offload
Moving this code also reduces the number of callsites to make it easier to review
Signed-off-by: Felix Fietkau <[email protected]>
All drivers before MT7915 have a limit of 128 WCID entries. Stop relying
on ARRAY_SIZE(dev->mt76.wcid), since it no longer reflects that limit.
Fixes: 49e649c3e0a6 ("mt76: adjust wcid size to support new 802.11ax generation")
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
A switch from one rate index to the next only happens when tx count from
the current slot is greater than MT7615_RATE_RETRY, which is 1 has to be
subtracted from count, instead of added to it.
Signed-off-by: Felix Fietkau <[email protected]>
Sometimes mt7615_mac_set_timing gets called while the slot time is still
configured to 20. Ensure that in this case it always uses the OFDM CFend
rate.
Signed-off-by: Felix Fietkau <[email protected]>
The hardware requirements for A-MPDU density are entirely on the tx side,
not the rx side. Because of that, the IE value should stay at 0 and the
minimum value should instead be enforced in WTBL/TXWI
MT7615 has no restrictions here
Signed-off-by: Felix Fietkau <[email protected]>
If the minimum power is raised too much, it can make it impossible for weaker
clients to connect, and there are some scenarios where the false detects will
not go down no matter how much the sensitivity is adjusted.
Fixes connectivity issues in some rare cases
Signed-off-by: Felix Fietkau <[email protected]>
Move mac_txdone tracepoint in common code in order to
be reused by mt7603 and mt7615 drivers
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Add support for an extra wiphy in mt76_set_channel and mt76_get_survey
This is preparation for supporting multiple wiphys per device to support the
concurrent dual-band feature of MT7615D
Signed-off-by: Felix Fietkau <[email protected]>
This is preparation for supporting multiple wiphys per device to support the
concurrent dual-band feature of MT7615D
Signed-off-by: Felix Fietkau <[email protected]>
Fix possible out-of-bound access of status rates array in
mt7615_fill_txs/mt7603_fill_txs routines
Fixes: c5211e997eca ("mt76: mt7603: rework and fix tx status reporting")
Fixes: 4af81f02b49c ("mt76: mt7615: sync with mt7603 rate control changes")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Host time is used to calculate the channel active time on mt7603 and mt7615.
Use the same on mt76x02 and move the lock to core code to get rid of some
duplicated code.
Signed-off-by: Felix Fietkau <[email protected]>
MT_MIB_STAT_PSCCA only counts rx CCA busy time, which does not include
tx time. MT_MIB_STAT_CCA counts full busy time, including Rx, Tx and NAV
Signed-off-by: Felix Fietkau <[email protected]>
Report total rx airtime for valid stations as BSS rx time in survey
mt7615 is left out for now, it will be supported later by reading
hardware counters instead of calculating airtime in software
Signed-off-by: Felix Fietkau <[email protected]>
Move mt76_channel_state() from mt76.h to mac80211.c
Preparation for updating channel state from more places in the drivers/core
Signed-off-by: Felix Fietkau <[email protected]>
Introduce ampdu_stat entry in mt7603 debugfs in order to dump 802.11
aggr cumulative statistics
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Move survey_time field in mt76_dev in order to be reused adding survey
support to mt7615 driver
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This fixes the following checkpatch warnings:
WARNING: Improper SPDX comment style
CHECK: No space is necessary after a cast
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>