26 Commits
Author SHA1 Message Date
Felix Fietkau 99ce686254 mt76: mt7603: increase dma mcu rx ring size
The ring is used for looping back tx powersave filtered frames, so it could
use some more room, in case more than one aggregate was queued

Signed-off-by: Felix Fietkau <[email protected]>
2020-01-20 12:15:56 +01:00
Felix Fietkau 99d8cd03ed mt76: mt7603: fix input validation issues for powersave-filtered frames
Before extracting the tid out of the packet, check if it was qos-data.
Only accept tid values 0-7
Also, avoid accepting the hardware queue as skb queue mapping, it could
lead to an overrun. Instead, derive the hardware queue from the tid number,
in order to avoid issues with packets being filtered multiple times.
This also fixes a mismatch between hardware and software queue indexes.

Signed-off-by: Felix Fietkau <[email protected]>
2019-12-21 17:02:53 +01:00
Felix Fietkau ee310307ad mt76: mt7603: track tx airtime for airtime fairness and survey
Poll per-station hardware counters after tx status events

Signed-off-by: Felix Fietkau <[email protected]>
2019-09-26 14:59:06 +02:00
Lorenzo BianconiandFelix Fietkau a9d2a28b39 mt76: mt7603: remove unnecessary mcu queue initialization
Remove unnecessary mcu queue initialization in mt7603_dma_init since it
has been already done in mt76_mmio_init

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-08-21 13:02:33 +02:00
Lorenzo BianconiandFelix Fietkau af860c0dec mt76: move mt76_tx_tasklet in mt76 module
Move mt76{15,03}_tx_tasklet in mt76_alloc_device in order to be used as
default tx_tasklet initialization. Remove duplicated code in
mt7603/mt7615 drivers

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-08-21 13:02:33 +02:00
Ryder LeeandFelix Fietkau 8b7bbd0176 mt76: mt7603: fix some checkpatch warnings
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]>
2019-08-20 15:21:30 +02:00
Lorenzo BianconiandFelix Fietkau 2cb46830fa mt76: move netif_napi_del in mt76_dma_cleanup
Move netif_napi_del in mt76_dma_cleanup routine since it is done
by all drivers

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-05-11 15:25:58 +02:00
Lorenzo BianconiandFelix Fietkau bce63c453c mt76: mt7603: use napi polling for tx cleanup
This allows tx scheduling and tx cleanup to run concurrently

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-05-11 15:25:58 +02:00
Felix Fietkau 688d708a43 mt76: only schedule txqs from the tx tasklet
Reduces lock contention from the tx path and improves performance

Signed-off-by: Felix Fietkau <[email protected]>
2019-03-14 22:37:30 +01:00
Felix Fietkau 5323005150 mt76: move tx tasklet to struct mt76_dev
Allows it to be scheduled from core code

Signed-off-by: Felix Fietkau <[email protected]>
2019-03-14 22:37:30 +01:00
Lorenzo BianconiandFelix Fietkau 06c917faeb mt76: introduce mt76_sw_queue data structure
Introduce mt76_sw_queue data structure in order to support new
chipsets (e.g. mt7615) that have a shared hardware queue for all traffic
identifiers. mt76_sw_queue will be used to track outstanding packets

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-03-13 12:53:23 +01:00
Felix Fietkau eb1ecc402f mt76: mt7603: notify mac80211 about buffered frames in ps queue
Also fix the size check for filtered powersave frames
Fixes a corner case with waking up clients

Signed-off-by: Felix Fietkau <[email protected]>
2019-03-03 19:21:42 +01:00
Felix Fietkau d13b065957 mt76: mt7603: fix up hardware queue index for PS filtered packets
Make the queue index match the hardware queue on which they get sent out

Signed-off-by: Felix Fietkau <[email protected]>
2019-03-03 19:21:42 +01:00
Lorenzo BianconiandFelix Fietkau 283ebbefde mt76: dma: move mt76x02_init_{tx,rx}_queue in mt76 module
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]>
2019-03-01 13:00:31 +01:00
Lorenzo BianconiandFelix Fietkau 11ab62057e mt7603: rely on mt76_tx_queue_skb_raw common routine
Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-02-18 20:39:41 +01:00
Lorenzo BianconiandFelix Fietkau cacc986701 mt7603: rely on mt76_mcu_rx_event routine
Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-02-07 14:50:23 +01:00
Felix Fietkau 8027b5d061 mt7603: remove copyright headers
No longer needed because of SPDX License Identifier

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-31 18:30:30 +01:00
Felix Fietkau ce8cc5d52d mt7603: issue PSE client reset on init
Improves reliability of module reload after tx hangs

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-22 14:09:54 +01:00
Felix Fietkau 2efa389b4c mt7603: limit station power save queue length to 64
Avoid excessive memory use, in case something goes wrong.

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-21 21:02:33 +01:00
Felix Fietkau 3ecb7f8974 mt7603: fix hardware queue assignment
The queues are ordered by priority. BK needs to be the first queue,
followed by BE

Signed-off-by: Felix Fietkau <[email protected]>
2018-11-28 21:11:05 +01:00
Felix Fietkau c09e8a489f mt7603: fix buffering of tx packets for powersave clients
Use PSE registers to loop back any pending tx packets for a client that
just went to sleep back into the MCU rx queue.
Re-queue those packets to the tx queue immediately after a client wakes up.

Signed-off-by: Felix Fietkau <[email protected]>
2018-11-20 16:18:22 +01:00
Felix Fietkau 498d716353 mt7603: fix checkpatch issues
Signed-off-by: Felix Fietkau <[email protected]>
2018-11-06 15:41:37 +01:00
Felix Fietkau d9b5324ecc mt7603: add SPDX license identifiers
Signed-off-by: Felix Fietkau <[email protected]>
2018-11-06 13:53:26 +01:00
Felix Fietkau 0b8b15f97c mt7603: use common mmio mcu struct
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-25 12:58:51 +02:00
Lorenzo BianconiandFelix Fietkau 99e04864d9 mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mmio.c
Use mt76x02_dev data structure as reference in mt76x02_mmio.c
instead of mt76_dev

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-05 20:03:54 +02:00
Felix Fietkau 62ce3245da move mt7603 source files to mt7603/
Signed-off-by: Felix Fietkau <[email protected]>
2018-09-28 18:02:01 +02:00