[arch-projects] [netctl][PATCH] Allow limiting the frequencies to scan (FS#37032)

Jouke Witteveen j.witteveen at gmail.com
Wed Oct 23 08:06:47 EDT 2013


This is especially useful to enforce connecting in the 5 GHz band.

Signed-off-by: Jouke Witteveen <j.witteveen at gmail.com>
---
 docs/netctl.profile.5.txt | 4 ++++
 src/lib/wpa               | 1 +
 2 files changed, 5 insertions(+)

diff --git a/docs/netctl.profile.5.txt b/docs/netctl.profile.5.txt
index 17f0537..0eac7c3 100644
--- a/docs/netctl.profile.5.txt
+++ b/docs/netctl.profile.5.txt
@@ -235,6 +235,10 @@ of the `wireless' type:
 'AdHoc='::
     Whether or not to use ad-hoc mode. Defaults to `++no++'.
 
+'ScanFrequencies='::
+    A space-separated list of frequencies in MHz to scan when searching
+    for the network. Defaults to all available frequencies.
+
 'Priority='::
     Priority group for the network. In case of automatic profile
     selection, the matched network with the highest priority will be
diff --git a/src/lib/wpa b/src/lib/wpa
index ff6d9ab..dea95d5 100644
--- a/src/lib/wpa
+++ b/src/lib/wpa
@@ -247,6 +247,7 @@ wpa_make_config_block() {
     [[ $AP ]] && echo "bssid=${AP,,}"
     is_yes "${Hidden:-no}" && echo "scan_ssid=1"
     is_yes "${AdHoc:-no}" && echo "mode=1"
+    [[ $ScanFrequencies ]] && echo "scan_freq=$ScanFrequencies"
     [[ $Priority ]] && echo "priority=$Priority"
 }
 
-- 
1.8.4.1



More information about the arch-projects mailing list