Lorenzo Bianconi and Felix Fietkau
a0cbd4b677
mt76: move mt76{0,2} mcu shared code in mt76x02_mcu.c
...
Move shared mt76x2/mt76x0 mcu shared code in a common file
and remove duplicated code
Signed-off-by: Lorenzo Bianconi <[email protected] >
2018-09-12 13:16:50 +02:00
Lorenzo Bianconi and Felix Fietkau
425e7e0032
mt76: move __iomem regs in mt76_mmio
...
Move __iomem regs pointer in mt76_mmio data structure
Signed-off-by: Lorenzo Bianconi <[email protected] >
2018-09-12 13:16:50 +02:00
Lorenzo Bianconi and Felix Fietkau
26909cdcb4
mt76: introduce mmio data structure in mt76_dev
...
Introduce mt76_mmio data structure in mt76_dev and
move mt76x2_mcu in mt76_mmio. This is a preliminary
patch to unify mcu code between mt76x02{e,u} drivers
Signed-off-by: Lorenzo Bianconi <[email protected] >
2018-09-12 13:16:50 +02:00
Lorenzo Bianconi and Felix Fietkau
46ba81c8f0
mt76x2: use mt76_dev instead of mt76x2_dev in mt76x2_tx_queue_mcu
...
Use mt76_dev data structure instead of mt76x2_dev one in
mt76x2_tx_queue_mcu routine. This is a preliminary patch
to share mcu code between mt76x2e and mt76x0e
Signed-off-by: Lorenzo Bianconi <[email protected] >
2018-09-12 13:16:50 +02:00
Lorenzo Bianconi and Felix Fietkau
5a79f17160
mt76x02: move TXD/RXD/MCU definitions in mt76x02_dma.h
...
Introduce mt76x02_dma.h header file to contain mt76x02 dma
related definitions
Signed-off-by: Lorenzo Bianconi <[email protected] >
2018-09-12 13:16:50 +02:00
Lorenzo Bianconi and Felix Fietkau
b85e072e4d
mt76: move mt76_qsel definition in dma.h
...
Move mt76_qsel definition in dma.h in order to be reused in mt76x0
driver. Moreover remove empty mt76x2_dma.h header file
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Stanislaw Gruszka <[email protected] >
2018-09-11 13:49:19 +02:00
Stanislaw Gruszka and Felix Fietkau
3977f4881c
mt76: unify txwi and rxwi structures
...
txwi and rxwi are the same for mt76x0 and mt76x2.
Signed-off-by: Stanislaw Gruszka <[email protected] >
2018-09-11 13:49:19 +02:00
Stanislaw Gruszka and Felix Fietkau
a69033307e
mt76: unify AC to hw queue mapping
...
Use the same AC to hardware queue mappings for all subdrivers.
Note: this change BK and BE mappings for USB drivers.
Signed-off-by: Stanislaw Gruszka <[email protected] >
2018-09-11 13:49:19 +02:00
Lorenzo Bianconi and Felix Fietkau
61c4c614b0
mt76: add mt76x2_common to mt76x2-common module
...
Move core related code shared between mt76x2 and mt76x2u in
mt76x2-common module
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Kalle Valo <[email protected] >
2018-09-11 13:49:19 +02:00
Lorenzo Bianconi and Felix Fietkau
f76e25fe5a
mt76x2: fix WMM parameter configuration
...
Fix hw queue configuration since mt76x2 devices use a reverse queue
enumeration respect to mac80211 one:
- 0: AC_BE
- 1: AC_BK
- 2: AC_VI
- 3: AC_VO
The issue can be reproduced sending two concurrent flow using
two separate queues:
- VO: 20Mbps UDP traffic
- BE: TCP traffic
In this scenario the UDP traffic will be blocked by the TCP one.
Fix it configuring properly WMM hw queue parameters
Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Tested-by: Gaetano Catalli <[email protected] >
Signed-off-by: Gaetano Catalli <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
2018-01-18 19:10:20 +01:00
Felix Fietkau
ff60d1482c
mt76: increase rx ring size for mt76x2
...
Should improve performance under load
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 16:26:45 +01:00
Rosen Penev and Felix Fietkau
e7647871da
Fix errors found by cppcheck
...
Mismatching declarations as well as unused results.
Signed-off-by: Rosen Penev <[email protected] >
2017-10-27 12:15:53 +02:00
Felix Fietkau
892543eb79
Revert "mt76x2: fix queue mapping in mt76x2_conf_tx()"
...
This reverts commit adf1bbd03c .
A report indicates that this causes a tx/rx throughput regression
Signed-off-by: Felix Fietkau <[email protected] >
2016-11-05 10:42:38 +01:00
Lorenzo Bianconi and Felix Fietkau
adf1bbd03c
mt76x2: fix queue mapping in mt76x2_conf_tx()
...
Signed-off-by: Gaetano Catalli <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
2016-11-03 12:25:13 +01:00
Felix Fietkau
d7f5112c09
mt76x2: fix checkpatch warnings
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-09-04 18:59:22 +02:00
Felix Fietkau
b300bdc42e
use the new bitfield accessor macros
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-09-04 17:37:26 +02:00
Felix Fietkau
53c1b7f6ac
update my email address
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-09-04 17:33:28 +02:00
Felix Fietkau
ced81a3458
relicense to ISC (except for util.h which is based on GPL'd kernel code
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-07-12 08:38:46 +02:00
Felix Fietkau
9779a98658
let mt76_queue_tx_cleanup take a queue id instead of a pointer
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-25 21:13:30 +01:00
Felix Fietkau
079ad90fe2
update copyright lines
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-25 18:09:13 +01:00
Felix Fietkau
9e305ef093
add rx helper function which uses ieee80211_rx_napi
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-08 15:06:21 +01:00
Felix Fietkau
fa3ee92842
unify tx completion handling, allow a driver callback to clean up tx skbs
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-06 16:14:02 +01:00
Felix Fietkau
2dfb9faa78
add support for queueing frames spanning multiple descriptors
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-05 01:15:35 +01:00
Felix Fietkau
b08f5433d1
tx: move dma mapping code to core, unify tx callbacks into one that prepares tx_info, skb and txwi
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-03 20:14:53 +01:00
Felix Fietkau
a6d7949f67
move rx polling to core
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-03 15:51:17 +01:00
Felix Fietkau
6b80f6c8dd
pass queue index instead of pointer to rx_skb callback
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-03 15:10:33 +01:00
Felix Fietkau
812bcc3a78
mt76x2: move rx queue processing to core
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-03 14:51:07 +01:00
Felix Fietkau
859aa10d4d
move initial rx queue fill to a new queue init function
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-03 14:37:09 +01:00
Felix Fietkau
fc646f34e0
rename mt76_dma_init to mt76_dma_attach
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-03 14:19:12 +01:00
Felix Fietkau
92367b3bb9
move dma cleanup to core
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-03 14:17:17 +01:00
Felix Fietkau
f79b92dde5
mt76x2: move rx queues to struct mt76_dev
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-03 14:03:53 +01:00
Felix Fietkau
435c5408a1
mt76x2: implement fragmented rx support
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-01 23:16:51 +01:00
Felix Fietkau
1a099a26d1
mt76x2: fix headroom handling and buffer length check
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-01 22:04:58 +01:00
Felix Fietkau
1b5492bd23
dma: tell the driver if the buffer was the last one
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-01 21:50:08 +01:00
Felix Fietkau
b490d249d5
avoid napi_alloc_frag when called from tasklet
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-01-28 20:43:08 +01:00
Felix Fietkau
0bbfb5653f
move dma rx cleanup to core
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-01-28 20:35:26 +01:00
Felix Fietkau
0f896990cd
core: use page fragments for rx buffers
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-01-28 14:54:01 +01:00
Lorenzo Bianconi and Felix Fietkau
33f7384719
mt76x2_dma: simplify mt76x2_init_tx_queue() signature
...
Remove unused mcu parameter from mt76x2_init_tx_queue() signature
Signed-off-by: Lorenzo Bianconi <[email protected] >
2016-01-22 20:44:47 +01:00
Lorenzo Bianconi and Felix Fietkau
88395adf18
mt76x2_dma: initialize rx buf_offset in mt76x2_dma_init()
...
Move rx buf_offset initialization in mt76x2_dma_init() since
mt76x2_dma_cleanup() is called just in mt76pci_remove(). This allows to use
MT_RX_HEADROOM greater than mt76x2_rxwi size.
Move sanity checks on mt76x2_{t,r}xwi size in mt76x2_dma_init() as well
Signed-off-by: Lorenzo Bianconi <[email protected] >
2016-01-22 20:44:36 +01:00
Felix Fietkau
206b0dd3d8
move tx queue cleanup locking and scheduling call to core
...
Signed-off-by: Felix Fietkau <[email protected] >
2015-12-17 15:57:04 +01:00
Felix Fietkau
1389db799a
move txwi cache to core
...
Signed-off-by: Felix Fietkau <[email protected] >
2015-12-17 15:50:01 +01:00
Felix Fietkau
73956b2f60
mt76x2: make txwi cache storage area opaque in preparation for moving it to generic code
...
Signed-off-by: Felix Fietkau <[email protected] >
2015-12-17 15:49:59 +01:00
Felix Fietkau
57fea83360
mt76x2: rename struct mt76_txwi to mt76x2_txwi
...
Signed-off-by: Felix Fietkau <[email protected] >
2015-12-17 01:22:56 +01:00
Felix Fietkau
fdfbc8477d
move remaining tx swq_queued tracking to core
...
Signed-off-by: Felix Fietkau <[email protected] >
2015-12-16 20:46:19 +01:00
Felix Fietkau
e7b9bd8934
move dma rx fill to common code
...
Signed-off-by: Felix Fietkau <[email protected] >
2015-12-16 20:41:49 +01:00
Felix Fietkau
43d5b84989
move tx scheduling code to common
...
Signed-off-by: Felix Fietkau <[email protected] >
2015-12-16 19:04:06 +01:00
Felix Fietkau
a08c4a3cd4
add a driver ops struct to allow mt76 to call into driver specific code, will be used for queueing tx packets (incl. mac header processing)
...
Signed-off-by: Felix Fietkau <[email protected] >
2015-12-16 18:38:39 +01:00
Felix Fietkau
645c93fefc
move tx queues to struct mt76_dev
...
Signed-off-by: Felix Fietkau <[email protected] >
2015-12-16 18:22:41 +01:00
Felix Fietkau
42b9c4db0a
move wcid and txq struct to mt76.h in preparation for making tx scheduling code more generic
...
Signed-off-by: Felix Fietkau <[email protected] >
2015-12-16 17:45:46 +01:00
Felix Fietkau
09b677d777
move rx dma descriptor processing logic to common code
...
Signed-off-by: Felix Fietkau <[email protected] >
2015-12-06 23:11:58 +01:00