Просмотр исходного кода

wifi-scripts: ucode: add support for scan_list

Speed up connecting in client mode by allowing to limit the channels that
need to be scanned.

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau 4 месяцев назад
Родитель
Сommit
9736d42141

+ 7 - 0
package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json

@@ -618,6 +618,13 @@
 			"type": "boolean",
 			"default": true
 		},
+		"scan_list": {
+			"description": "List of frequencies (in MHz) to scan when looking for networks in client mode",
+			"type": "array",
+			"items": {
+				"type": "number"
+			}
+		},
 		"short_gi_160": {
 			"description": "Short GI for 160 MHz",
 			"type": "boolean",

+ 3 - 1
package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc

@@ -190,8 +190,10 @@ export function generate(config_list, data, interface) {
 
 	interface.config.country = data.config.country_code;
 	interface.config.beacon_int = data.config.beacon_int;
+	if (data.config.scan_list)
+		interface.config.scan_list = join(" ", data.config.scan_list);
 
-	append_vars(interface.config, [ 'country', 'beacon_int' ]);
+	append_vars(interface.config, [ 'country', 'beacon_int', 'scan_list' ]);
 
 	setup_sta(data.config, interface.config);