Commit e9415009 authored by Felix Fietkau's avatar Felix Fietkau

mt76: mt7603: make dynamic sensitivity adjustment configurable via debugfs

In some cases it may be useful for debugging to disable this feature
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 633348f2
......@@ -123,4 +123,6 @@ void mt7603_init_debugfs(struct mt7603_dev *dev)
mt7603_radio_read);
debugfs_create_u8("sensitivity_limit", 0600, dir,
&dev->sensitivity_limit);
debugfs_create_bool("dynamic_sensitivity", 0600, dir,
&dev->dynamic_sensitivity);
}
......@@ -541,6 +541,7 @@ int mt7603_register_device(struct mt7603_dev *dev)
dev->slottime = 9;
dev->sensitivity_limit = 28;
dev->dynamic_sensitivity = true;
ret = mt7603_init_hardware(dev);
if (ret)
......
......@@ -1727,6 +1727,9 @@ mt7603_false_cca_check(struct mt7603_dev *dev)
int min_signal;
u32 val;
if (!dev->dynamic_sensitivity)
return;
val = mt76_rr(dev, MT_PHYCTRL_STAT_PD);
pd_cck = FIELD_GET(MT_PHYCTRL_STAT_PD_CCK, val);
pd_ofdm = FIELD_GET(MT_PHYCTRL_STAT_PD_OFDM, val);
......
......@@ -142,6 +142,7 @@ struct mt7603_dev {
u8 ed_strict_mode;
u8 ed_strong_signal;
bool dynamic_sensitivity;
s8 sensitivity;
u8 sensitivity_limit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment