]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c
1 // SPDX-License-Identifier: ISC
6 mt7615_radar_pattern_set(void *data
, u64 val
)
8 struct mt7615_dev
*dev
= data
;
10 return mt7615_mcu_rdd_send_pattern(dev
);
13 DEFINE_DEBUGFS_ATTRIBUTE(fops_radar_pattern
, NULL
,
14 mt7615_radar_pattern_set
, "%lld\n");
17 mt7615_scs_set(void *data
, u64 val
)
19 struct mt7615_dev
*dev
= data
;
21 mt7615_mac_set_scs(dev
, val
);
27 mt7615_scs_get(void *data
, u64
*val
)
29 struct mt7615_dev
*dev
= data
;
36 DEFINE_DEBUGFS_ATTRIBUTE(fops_scs
, mt7615_scs_get
,
37 mt7615_scs_set
, "%lld\n");
40 mt7615_radio_read(struct seq_file
*s
, void *data
)
42 struct mt7615_dev
*dev
= dev_get_drvdata(s
->private);
44 seq_printf(s
, "Sensitivity: ofdm=%d cck=%d\n",
45 dev
->ofdm_sensitivity
, dev
->cck_sensitivity
);
46 seq_printf(s
, "False CCA: ofdm=%d cck=%d\n",
47 dev
->false_cca_ofdm
, dev
->false_cca_cck
);
52 static int mt7615_read_temperature(struct seq_file
*s
, void *data
)
54 struct mt7615_dev
*dev
= dev_get_drvdata(s
->private);
58 temp
= mt7615_mcu_get_temperature(dev
, 0);
59 seq_printf(s
, "Temperature: %d\n", temp
);
64 int mt7615_init_debugfs(struct mt7615_dev
*dev
)
68 dir
= mt76_register_debugfs(&dev
->mt76
);
72 debugfs_create_file("scs", 0600, dir
, dev
, &fops_scs
);
73 debugfs_create_devm_seqfile(dev
->mt76
.dev
, "radio", dir
,
75 debugfs_create_u32("dfs_hw_pattern", 0400, dir
, &dev
->hw_pattern
);
76 /* test pattern knobs */
77 debugfs_create_u8("pattern_len", 0600, dir
,
78 &dev
->radar_pattern
.n_pulses
);
79 debugfs_create_u32("pulse_period", 0600, dir
,
80 &dev
->radar_pattern
.period
);
81 debugfs_create_u16("pulse_width", 0600, dir
,
82 &dev
->radar_pattern
.width
);
83 debugfs_create_u16("pulse_power", 0600, dir
,
84 &dev
->radar_pattern
.power
);
85 debugfs_create_file("radar_trigger", 0200, dir
, dev
,
87 debugfs_create_devm_seqfile(dev
->mt76
.dev
, "temperature", dir
,
88 mt7615_read_temperature
);