Commit Graph
24 Commits
Author SHA1 Message Date
Lorenzo BianconiandFelix Fietkau 29f2bebe1a mt76: mt7615: add idle-timeout knob in mt7615 debugfs
Introduce idle-timeout knob in mt7615 debugfs in order to configure the
idle time to switch to low-power state

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-07-10 14:45:30 +02:00
Lorenzo BianconiandFelix Fietkau 94519eac69 mt76: mt7615: add runtime-pm knob in mt7615 debugfs
Introduce runtime-pm knob in mt7615 debugfs in order to enable/disable
runtime pm available in offload firmware

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-07-10 14:45:30 +02:00
Lorenzo BianconiandFelix Fietkau e3850966d7 mt76: mt7615: wake device before accessing regmap in debugfs
Make sure the device is in full-power before reading regs in debugfs

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-07-10 14:45:29 +02:00
Felix Fietkau 46bc8a0b53 mt76: mt7615: add support for accessing RF registers via MCU
Includes debugfs files for testing it.
Will be used for testmode support.

Signed-off-by: Felix Fietkau <[email protected]>
2020-06-22 21:28:35 +02:00
Lorenzo BianconiandFelix Fietkau 43febd4521 mt76: mt7615: fix lmac queue debugsfs entry
acs and wmm index are swapped in mt7615_queues_acq respect to the hw
design

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-06-07 17:01:19 +02:00
Lorenzo BianconiandFelix Fietkau 722d1f47d8 mt76: add rx queues info to mt76 debugfs
Introduce rx-queues debugfs node in order to dump rx queues status.
This would be useful for mcu fw debugging

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-04-22 18:02:07 +02:00
Lorenzo BianconiandFelix Fietkau d4e6e225bc mt76: mt7615: move core shared code in mt7615-common module
Create mt7615-common module in order to collect shared code between usb
and mmio code. Move the following source files in mt7615-common module:
- main.c
- init.c
- mcu.c
- mac.c
- debugfs.c
- eeprom.c
- trace.c

Create the following source files for mmio only source code and move them
in mt7615e module:
- pci_init.c
- dma.c
- pci_mac.c

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-04-17 14:46:00 +02:00
Lorenzo BianconiandFelix Fietkau 25d812dddc mt76: mt7663: fix aggr range entry in debugfs
Fix register definitions for aggr range counter registers for mt7663
chipset

Fixes: f40ac0f3d3c0 ("mt76: mt7615: introduce mt7663e support")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-04-08 17:59:38 +02:00
Lorenzo BianconiandFelix Fietkau d2d7bf2243 mt76: mt7615: make scs configurable per phy
Make scs configurable per phy since most of the chipsets do not
support dbdc

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-04-06 12:20:11 +02:00
Ryder LeeandFelix Fietkau 072b50c61e mt76: mt7615: add more useful Tx mib counters
Add ba_miss_cnt and ampdu_per in mib_stats.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-04-06 12:20:11 +02:00
Ryder LeeandFelix Fietkau 8bd26d6c31 mt76: mt7615: enable aggr_stats for both phy
Use bottom half of aggr_stats for second phy.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-04-06 12:20:11 +02:00
Ryder LeeandFelix Fietkau 9d555f82d3 mt76: mt7615: modify mt7615_ampdu_stat_read for each phy
This is a preliminary patch to add more Tx counters.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-04-06 12:20:11 +02:00
Lorenzo BianconiandFelix Fietkau e226309c4b mt76: mt7615: rely on mt76_queues_read for mt7622
As previous devices, mt7622 relies on multiple hw queues while for
mt7615 we have just on per band hw queue and the mcu demux the traffic
according to the packet AC. In order to dump all configured hw queues,
rely on mt76_queues_read for mt7622 in mt7615 debugfs

Signed-off-by: Lorenzo Bianconi <[email protected]>
2020-02-14 10:16:16 +01:00
Felix Fietkau db97358df4 mt76: mt7615: add support for testing hardware reset
Send an undersized corrupt packet to the DMA queue, which causes the
firmware to issue a full chip reset

Signed-off-by: Felix Fietkau <[email protected]>
2020-01-31 16:37:02 +01:00
Felix Fietkau 8f33a1e936 mt76: mt7615: report firmware log event messages
Useful for debugging firmware issues. Can be turned on via the "fw_debug"
debugfs file

Signed-off-by: Felix Fietkau <[email protected]>
2020-01-13 22:17:00 +01:00
Felix Fietkau ea41ad8bdb mt76: mt7615: defer mcu initialization via workqueue
Loading the mcu firmware and waiting for it to boot takes a long time,
which adds a significant amount to the system boot time.
Fix this by running the mcu init from a workqueue and waiting for it to
complete before starting the phy or issuing mcu commands via debugfs

Signed-off-by: Felix Fietkau <[email protected]>
2019-12-05 11:36:53 +01:00
Felix Fietkau 993683d62f mt76: mt7615: add support for registering a second wiphy via debugfs
This is only used for testing for now. In the future it will be possible to
enable the second PHY through an proper API via device tree

Signed-off-by: Felix Fietkau <[email protected]>
2019-12-03 20:04:12 +01:00
Felix Fietkau e5ea72ac71 mt76: mt7615: add multiple wiphy support for smart carrier sense
Use per-phy radio stats and tuning registers

Signed-off-by: Felix Fietkau <[email protected]>
2019-12-03 20:04:12 +01:00
Lorenzo BianconiandFelix Fietkau 696c0fc551 mt76: mt7615: collect aggregation stats
Introduce ampdu_stat entry in mt7615 debugfs in order to dump 802.11
aggr cumulative statistics

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-09-26 12:04:20 +02:00
Lorenzo BianconiandFelix Fietkau 1118b5ea76 mt76: mt7615: add queue entry in debugfs
Introduce mt7615_queues_read routine to dump hw queue related info.
Add hw ac queues statistics in mt7615 debugfs

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-09-26 12:04:20 +02:00
Lorenzo BianconiandFelix Fietkau c7f82146ef mt76: mt7615: add support to read temperature from mcu
Introduce debugfs entry to read device temperature and related cmu
command. Introduce mt7615_mcu_parse_response to parse mcu response
messages and refactor mt7615_mcu_msg_send routine

Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-09-05 17:51:19 +02:00
Lorenzo BianconiandFelix Fietkau 2becd13be7 mt76: mt7615: add Smart Carrier Sense support
Introduce Smart Carrier Sense support in order to tune device
sensitivity according to RTS error rate and False CCA reported by the
radio

Tested-by: Ryder Lee <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-08-20 15:22:21 +02:00
Ryder LeeandFelix Fietkau e604546784 mt76: mt7615: fix some checkpatch warnings
This fixes the following checkpatch warnings:

WARNING: Improper SPDX comment style
Fix blank lines.

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 8919516006 mt76: mt7615: add radar pattern test knob to debugfs
Introduce mt7615_mcu_rdd_send_pattern routine to trigger a radar pattern
detection. Moreover move debugfs related routines in a dedicated source
file.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-01 14:09:17 +02:00