mt76: mt7603: add upper limit for dynamic sensitivity minimum receive power

If the minimum power is raised too much, it can make it impossible for weaker
clients to connect, and there are some scenarios where the false detects will
not go down no matter how much the sensitivity is adjusted.
Fixes connectivity issues in some rare cases

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2020-02-22 10:04:37 +01:00
parent fd892bc033
commit 0a53dcda52
4 changed files with 6 additions and 1 deletions
+2
View File
@@ -123,4 +123,6 @@ void mt7603_init_debugfs(struct mt7603_dev *dev)
mt7603_radio_read);
debugfs_create_bool("dynamic_sensitivity", 0600, dir,
&dev->dynamic_sensitivity);
debugfs_create_u8("sensitivity_limit", 0600, dir,
&dev->sensitivity_limit);
}
+1
View File
@@ -540,6 +540,7 @@ int mt7603_register_device(struct mt7603_dev *dev)
dev->mphy.antenna_mask = 1;
dev->slottime = 9;
dev->sensitivity_limit = 28;
ret = mt7603_init_hardware(dev);
if (ret)
+2 -1
View File
@@ -1753,7 +1753,8 @@ mt7603_false_cca_check(struct mt7603_dev *dev)
min_signal -= 15;
false_cca = dev->false_cca_ofdm + dev->false_cca_cck;
if (false_cca > 600) {
if (false_cca > 600 &&
dev->sensitivity < -100 + dev->sensitivity_limit) {
if (!dev->sensitivity)
dev->sensitivity = -92;
else
+1
View File
@@ -144,6 +144,7 @@ struct mt7603_dev {
bool dynamic_sensitivity;
s8 sensitivity;
u8 sensitivity_limit;
u8 beacon_check;
u8 tx_hang_check;