mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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]>
This commit is contained in:
@@ -71,6 +71,33 @@ mt7615_dbdc_get(void *data, u64 *val)
|
||||
DEFINE_DEBUGFS_ATTRIBUTE(fops_dbdc, mt7615_dbdc_get,
|
||||
mt7615_dbdc_set, "%lld\n");
|
||||
|
||||
static int
|
||||
mt7615_fw_debug_set(void *data, u64 val)
|
||||
{
|
||||
struct mt7615_dev *dev = data;
|
||||
|
||||
if (!mt7615_wait_for_mcu_init(dev))
|
||||
return 0;
|
||||
|
||||
dev->fw_debug = val;
|
||||
mt7615_mcu_fw_log_2_host(dev, dev->fw_debug ? 2 : 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
mt7615_fw_debug_get(void *data, u64 *val)
|
||||
{
|
||||
struct mt7615_dev *dev = data;
|
||||
|
||||
*val = dev->fw_debug;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_DEBUGFS_ATTRIBUTE(fops_fw_debug, mt7615_fw_debug_get,
|
||||
mt7615_fw_debug_set, "%lld\n");
|
||||
|
||||
static int
|
||||
mt7615_ampdu_stat_read(struct seq_file *file, void *data)
|
||||
{
|
||||
@@ -222,6 +249,7 @@ int mt7615_init_debugfs(struct mt7615_dev *dev)
|
||||
debugfs_create_file("ampdu_stat", 0400, dir, dev, &fops_ampdu_stat);
|
||||
debugfs_create_file("scs", 0600, dir, dev, &fops_scs);
|
||||
debugfs_create_file("dbdc", 0600, dir, dev, &fops_dbdc);
|
||||
debugfs_create_file("fw_debug", 0600, dir, dev, &fops_fw_debug);
|
||||
debugfs_create_devm_seqfile(dev->mt76.dev, "radio", dir,
|
||||
mt7615_radio_read);
|
||||
debugfs_create_u32("dfs_hw_pattern", 0400, dir, &dev->hw_pattern);
|
||||
|
||||
Reference in New Issue
Block a user