summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/debugfs.c
AgeCommit message (Collapse)Author
2021-10-20mt76: rely on phy pointer in mt76_register_debugfs_fops routine signatureLorenzo Bianconi
This is a preliminary patch to create a mt76 debugfs subir for ext-phy. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-20mt76: debugfs: improve queue node readabilityLorenzo Bianconi
Improve {xmit,rx}-queue debugfs node readability Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-20mt76: overwrite default reg_ops if necessaryLorenzo Bianconi
Introduce mt76_register_debugfs_fops routine in order to define per-driver regs file operations and make sure the device is up before reading or writing its registers Fixes: 1d8efc741df8 ("mt76: mt7921: introduce Runtime PM support") Fixes: de5ff3c9d1a2 ("mt76: mt7615: introduce pm_power_save delayed work") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-21mt76: debugfs: introduce napi_threaded nodeLorenzo Bianconi
Introduce napi_threaded debugfs knob in order to enable/disable NAPI threaded support Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-12-04mt76: move tx hw data queues in mt76_phyLorenzo Bianconi
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 <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-24mt76: remove struct mt76_sw_queueFelix Fietkau
All members except for the struct mt76_queue pointer have been removed Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-24mt76: rely on AQL for burst size limits on tx queueingFelix Fietkau
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 <nbd@nbd.name>
2020-07-21mt76: rely on register macrosLorenzo Bianconi
For consistency with the rest of the code always rely on defined macros for register access Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-07-21mt76: usb: rely on mt76_for_each_q_rxLorenzo Bianconi
Rely on mt76_for_each_q_rx whenever possible in order to simply the code Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-05-28mt76: only iterate over initialized rx queuesFelix Fietkau
Fixes the following reported crash: [ 2.361127] BUG: spinlock bad magic on CPU#0, modprobe/456 [ 2.361583] lock: 0xffffa1287525b3b8, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 [ 2.362250] CPU: 0 PID: 456 Comm: modprobe Not tainted 4.14.177 #5 [ 2.362751] Hardware name: HP Meep/Meep, BIOS Google_Meep.11297.75.0 06/17/2019 [ 2.363343] Call Trace: [ 2.363552] dump_stack+0x97/0xdb [ 2.363826] ? spin_bug+0xa6/0xb3 [ 2.364096] do_raw_spin_lock+0x6a/0x9a [ 2.364417] mt76_dma_rx_fill+0x44/0x1de [mt76] [ 2.364787] ? mt76_dma_kick_queue+0x18/0x18 [mt76] [ 2.365184] mt76_dma_init+0x53/0x85 [mt76] [ 2.365532] mt7615_dma_init+0x3d7/0x546 [mt7615e] [ 2.365928] mt7615_register_device+0xe6/0x1a0 [mt7615e] [ 2.366364] mt7615_mmio_probe+0x14b/0x171 [mt7615e] [ 2.366771] mt7615_pci_probe+0x118/0x13b [mt7615e] [ 2.367169] pci_device_probe+0xaf/0x13d [ 2.367491] driver_probe_device+0x284/0x2ca [ 2.367840] __driver_attach+0x7a/0x9e [ 2.368146] ? driver_attach+0x1f/0x1f [ 2.368451] bus_for_each_dev+0xa0/0xdb [ 2.368765] bus_add_driver+0x132/0x204 [ 2.369078] driver_register+0x8e/0xcd [ 2.369384] do_one_initcall+0x160/0x257 [ 2.369706] ? 0xffffffffc0240000 [ 2.369980] do_init_module+0x60/0x1bb [ 2.370286] load_module+0x18c2/0x1a2b [ 2.370596] ? kernel_read_file+0x141/0x1b9 [ 2.370937] ? kernel_read_file_from_fd+0x46/0x71 [ 2.371320] SyS_finit_module+0xcc/0xf0 [ 2.371636] do_syscall_64+0x6b/0xf7 [ 2.371930] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 [ 2.372344] RIP: 0033:0x7da218ae4199 [ 2.372637] RSP: 002b:00007fffd0608398 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 2.373252] RAX: ffffffffffffffda RBX: 00005a705449df90 RCX: 00007da218ae4199 [ 2.373833] RDX: 0000000000000000 RSI: 00005a7052e73bd8 RDI: 0000000000000006 [ 2.374411] RBP: 00007fffd06083e0 R08: 0000000000000000 R09: 00005a705449d540 [ 2.374989] R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000000000 [ 2.375569] R13: 00005a705449def0 R14: 00005a7052e73bd8 R15: 0000000000000000 Reported-by: Sean Wang <sean.wang@mediatek.com> Fixes: d3377b78cec6 ("mt76: add HE phy modes and hardware queue") Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-05-12mt76: add rx queues info to mt76 debugfsLorenzo Bianconi
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 <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-11-20mt76: move queue debugfs entry to driver specific codeLorenzo Bianconi
Move queue debugfs entry to driver specific code since mt7615 devices rely on a different queue layout Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: switch to SPDX tag instead of verbose boilerplate textRyder Lee
No functional change intended. Add SPDX identifiers to all remaining files in /mt76. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: introduce mt76_sw_queue data structureLorenzo Bianconi
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 <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-10-01mt76: move rate_txpower handler in mt76 debugfsLorenzo Bianconi
Move rate_txpower handler in mt76 debugfs in order to be reused in mt76x0 driver and remove duplicated code Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-10-01mt76: move seq_put_array in mt76-core moduleLorenzo Bianconi
Move seq_put_array utility routine in mt76-core module in order to be reused in mt76x0 driver Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-03-27wireless: Use octal not symbolic permissionsJoe Perches
Prefer the direct use of octal for permissions. Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace and some typing. Miscellanea: o Whitespace neatening around these conversions. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-08mt76: fix debugfs_simple_attr.cocci warningsFengguang Wu
drivers/net/wireless/mediatek/mt76/debugfs.c:36:0-23: WARNING: fops_regval should be defined with DEFINE_DEBUGFS_ATTRIBUTE Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Semantic patch information: Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() imposes some significant overhead as compared to DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe(). Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Fixes: a5f6039c8f9c ("mt76: add driver code for MT76x2e") CC: Felix Fietkau <nbd@nbd.name> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-12-07mt76: add common code shared between multiple chipsetsFelix Fietkau
This will be used by drivers for MT76x2e, MT7603e and MT7628 Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>