Commit Graph
153 Commits
Author SHA1 Message Date
Felix Fietkau 7daf9621ad mt7603: add survey support
Since channel active time is not available from MIB registers, emulate it
using the kernel boot time (in us)

Signed-off-by: Felix Fietkau <[email protected]>
2018-08-22 12:26:35 +02:00
Felix Fietkau d87e4b0252 mt7603: clear PSE reset bit if PSE reset fails
If the firmware is blocked, it should not continue to attempt a reset
until it is safe to do so

Signed-off-by: Felix Fietkau <[email protected]>
2018-05-20 07:57:25 +02:00
Felix Fietkau 664e32171c mt7603: add extra PSE hang check signature for MT7628
Signed-off-by: Felix Fietkau <[email protected]>
2018-05-19 10:48:48 +02:00
Felix Fietkau 20c0766c8f mt7603: adjust rx hang watchdog for MT7628
The MT7628 vendor driver checks a different DMA debug register compared to
MT7603.

Signed-off-by: Felix Fietkau <[email protected]>
2018-05-19 10:48:33 +02:00
Felix Fietkau e2eedc9229 mt7603: retry PSE reset calls
PSE reset can fail and a subsequent reset could recover it again

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-18 11:53:24 +02:00
Felix Fietkau 8c92c91abe mt7603: turn vif wcid entry back into a full mt7603_sta
The tx status reporting code needs access to mt7603_sta members for rate
status processing.

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-16 12:07:53 +02:00
Felix Fietkau a8e8921559 mt7603: add more checks to avoid dereferencing invalid pointers in wcid lookup
Signed-off-by: Felix Fietkau <[email protected]>
2018-04-15 10:14:46 +02:00
Felix Fietkau 873a7c990c mt7603: call mt76_txq_schedule_all as a barrier to prevent tx during reset
Signed-off-by: Felix Fietkau <[email protected]>
2018-04-13 11:50:19 +02:00
Felix Fietkau 9a23989932 mt7603: remove warning on rx with invalid channel info
This can happen during a watchdog reset and is harmless

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-13 10:42:01 +02:00
Felix Fietkau f36f3083ec mt7603: improve validation of rx frames
- discard packets that have no rx group 3 (signal/rate info missing)
- discard packets marked as VHT (no hardware support)
- discard packets with invalid HT rate values

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-13 10:38:35 +02:00
Felix Fietkau 9c52f36091 mt7603: pull the final rate index from the status descriptor
When doing rate probing, multiple frames might end up getting sent with
the probe rate, because of the way that rate probing is set up.
This race window is most visible with MCS rates and aggregation.

To improve rate control stats accuracy, pull the final tx rate from the
descriptor

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-12 18:17:10 +02:00
Felix Fietkau 549f43b23e mt7603: ensure that the ACK flag is set for A-MPDUs with any acked subframe
Signed-off-by: Felix Fietkau <[email protected]>
2018-04-12 12:14:23 +02:00
Felix Fietkau 3413961e36 mt7603: avoid reordering qos-null data packets
Signed-off-by: Felix Fietkau <[email protected]>
2018-02-09 11:19:11 +01:00
Felix Fietkau 9c2e03dd0a mt7603: fix rx LDPC reporting
Signed-off-by: Felix Fietkau <[email protected]>
2018-01-25 16:46:58 +01:00
Felix Fietkau 3968dae910 mt7603: fix 40 mhz channel bandwidth reporting
Signed-off-by: Felix Fietkau <[email protected]>
2018-01-25 16:44:06 +01:00
Felix Fietkau c6f8caced2 mt76: let mac80211 validate CCMP PN for fragmented frames
The rules for those are more complex and performance is not an issue
here

Signed-off-by: Felix Fietkau <[email protected]>
2018-01-25 11:29:25 +01:00
Felix Fietkau 9b2c77826d mt76: validate rx CCMP PN
Apparently hardware does not perform CCMP PN validation in hardware, so
we need to take care of this in the driver.

Signed-off-by: Felix Fietkau <[email protected]>
2018-01-22 11:06:19 +01:00
Felix Fietkau 461cdf9f01 mt76: pass the per-vif wcid to the core for multicast rx
Preparation for adding software rx CCMP PN validation

Signed-off-by: Felix Fietkau <[email protected]>
2018-01-22 11:06:17 +01:00
Felix Fietkau b0508d3044 mt76: implement A-MPDU rx reordering in the driver code
This is required for performing CCMP PN validation in software

Signed-off-by: Felix Fietkau <[email protected]>
2018-01-22 10:43:21 +01:00
Felix Fietkau 58a41f17aa mt76: get station pointer by wcid and pass it to mac80211
Avoids the rhashtable lookup based on the MAC address inside mac80211

Signed-off-by: Felix Fietkau <[email protected]>
2018-01-22 10:14:25 +01:00
Felix Fietkau ad3f8e924e mt76: add an intermediate struct for rx status information
Preparation for passing in more internal rx data via skb->cb

Signed-off-by: Felix Fietkau <[email protected]>
2018-01-21 10:48:29 +01:00
Felix Fietkau 4d4cd05966 Partially revert "mt7603: use mcu command to set timing registers, fix OFDM timeout values"
This reverts commit 268467b9a4.
It is unnecessary to go through the MCU for this.

Signed-off-by: Felix Fietkau <[email protected]>
2017-12-07 17:09:28 +01:00
Felix Fietkau 8e17d36381 mt7603: remove some harmless WARN_ONs in rx path
Discard affected packets instead. Should reduce the frequency of bogus
bug reports

Signed-off-by: Felix Fietkau <[email protected]>
2017-12-03 18:15:05 +01:00
Felix Fietkau 57a2e334ec mt7603: set tx-skip flag for powersave clients
Helps flush out frames faster

Signed-off-by: Felix Fietkau <[email protected]>
2017-12-03 17:32:34 +01:00
Felix Fietkau e953c78806 mt7603: clear wtbl PS bit for powersave responses
Avoids filtering frames that are supposed to be sent

Signed-off-by: Felix Fietkau <[email protected]>
2017-12-03 16:49:02 +01:00
Felix Fietkau 96817d63ea mt7603: make mt7603_mac_watchdog_reset() static
Signed-off-by: Felix Fietkau <[email protected]>
2017-12-03 16:49:02 +01:00
Felix Fietkau c079960b59 mt7603: clean up dma debug reads
Signed-off-by: Felix Fietkau <[email protected]>
2017-12-02 11:11:58 +01:00
Felix Fietkau d8a59901ec mt7603: warn if PSE reset fails
Signed-off-by: Felix Fietkau <[email protected]>
2017-12-02 10:50:08 +01:00
Felix Fietkau c8807b4a3c mt7603: simplify PSE reset
Skip PSE client reset, it is done by the firmware already

Signed-off-by: Felix Fietkau <[email protected]>
2017-12-02 10:49:14 +01:00
Felix Fietkau d99092baab mt7603: remove WARN_ON_ONCE for workaround checks
It can happen during normal operation and it confuses users more than it
actually helps. workaround trigger counts are still available via
debugfs

Signed-off-by: Felix Fietkau <[email protected]>
2017-12-02 10:43:39 +01:00
Felix Fietkau 8026638543 mt7603: rename MT_PSE_RESET register
It is actually a dummy control register used for communicating reset
state with the MCU firmware

Signed-off-by: Felix Fietkau <[email protected]>
2017-12-01 17:50:59 +01:00
Felix Fietkau 737cf2b6f7 mt7603: rename mt7603_mac_reset to mt7603_pse_reset
Signed-off-by: Felix Fietkau <[email protected]>
2017-12-01 17:38:39 +01:00
Felix Fietkau e78156982f update to latest mac80211/cfg80211 API changes
Signed-off-by: Hauke Mehrtens <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2017-10-05 20:50:48 +02:00
Lorenzo BianconiandFelix Fietkau 21f20b46e3 mt7603: mac: fix register configuration in mt7603_rx_dma_busy()
Signed-off-by: Lorenzo Bianconi <[email protected]>
2017-09-09 17:45:15 +02:00
Lorenzo BianconiandFelix Fietkau cb83f3329f mt7603: mac: fix logic in mt7603_tx_hang()
Signed-off-by: Lorenzo Bianconi <[email protected]>
2017-09-09 17:45:07 +02:00
Lorenzo BianconiandFelix Fietkau 8dee788e05 mt7603: mac: stop netdev queues during watchdog reset
Signed-off-by: Lorenzo Bianconi <[email protected]>
2017-07-17 10:21:59 +02:00
Lorenzo BianconiandFelix Fietkau 8a649c3b1e mt7603: mac: code optimization
Remove unnecessary return instruction and time variable in
mt7603_mac_work()

Signed-off-by: Lorenzo Bianconi <[email protected]>
2017-07-15 10:30:56 +02:00
Lorenzo BianconiandFelix Fietkau e90a81a552 mt7603: fix channel width fall back in TXWI
Signed-off-by: Lorenzo Bianconi <[email protected]>
2017-07-04 10:55:39 +02:00
Felix Fietkau c4e3deaa58 mt7603: use the real vif index in txwi header for normal tx.
Fixes rate control for multi-vif. Beacons and buffered multicast packets
still need the adjusted index

Signed-off-by: Felix Fietkau <[email protected]>
2017-07-01 16:53:18 +02:00
Felix Fietkau 32eab505a4 mt7603: set wtbl entry vif index
Signed-off-by: Felix Fietkau <[email protected]>
2017-07-01 16:46:34 +02:00
Lorenzo BianconiandFelix Fietkau cf4ba12871 mt7603: avoid tx rate sampling using no retransmissions
Since the TXWI has no room for the MRR reconfigure the MT_WTBL registers
using the sample rate as first tx rate for channel probing avoiding
very low TCP performance in a lossy environment

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2017-06-26 14:06:56 +02:00
Lorenzo BianconiandFelix Fietkau 01fb9ba096 mt7603: fix control/status retries count estimation
Refactor tx count computation for fixed_rate frames in status path

Signed-off-by: Lorenzo Bianconi <[email protected]>
2017-06-26 14:06:44 +02:00
Felix Fietkau af326156d9 mt7603: change auto rate control register initialization
Allow the hardware to fall back if rates stop working, make the first
rate fail earlier.

Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
2017-06-26 14:06:31 +02:00
Felix Fietkau 219c8dc717 mt7603: fix endian issue in CCMP PN
Signed-off-by: Felix Fietkau <[email protected]>
2017-05-26 09:40:49 +02:00
Felix Fietkau b8a7d0729e mt7603: fix rate update bw fallback index
Signed-off-by: Felix Fietkau <[email protected]>
2017-05-26 08:59:00 +02:00
Felix Fietkau 7168d59902 mt7603: reset PSE queue hang indicator bits
Signed-off-by: Felix Fietkau <[email protected]>
2017-03-21 14:47:01 +01:00
Felix Fietkau 38bae1d303 mt7603: improve reliability of the PSE reset
Signed-off-by: Felix Fietkau <[email protected]>
2017-03-21 14:44:39 +01:00
Felix Fietkau e2d298d071 mt7603: issue tx reset bit 2 before DMA reset
Signed-off-by: Felix Fietkau <[email protected]>
2017-03-21 10:44:53 +01:00
Felix Fietkau 59ce2b491b mt7603: set tx vif own MAC index (needed for beacons)
Signed-off-by: Felix Fietkau <[email protected]>
2017-03-15 14:24:44 +01:00
Felix Fietkau e54add55e0 mt7603: move napi/tasklet enable/disable outside of the locked section
Should help prevent deadlocks

Signed-off-by: Felix Fietkau <[email protected]>
2017-03-15 14:24:42 +01:00