mac80211: add support for specifying a per-device scan list
authorFelix Fietkau <nbd@nbd.name>
Mon, 28 Sep 2020 13:12:56 +0000 (15:12 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 29 Sep 2020 15:32:26 +0000 (17:32 +0200)
This is useful to bring up multiple client mode interfaces on a single
channel much faster without having to scan through a lot of channels

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
package/network/services/hostapd/files/hostapd.sh

index 17095b72059647bfed4c376536509c5c7d87ca54..42144375b477e4477ee04aea7f745d79d3cd0ce6 100644 (file)
@@ -34,6 +34,7 @@ drv_mac80211_init_device_config() {
        config_add_boolean noscan ht_coex acs_exclude_dfs
        config_add_array ht_capab
        config_add_array channels
+       config_add_array scan_list
        config_add_boolean \
                rxldpc \
                short_gi_80 \
@@ -897,6 +898,7 @@ drv_mac80211_setup() {
                rxantenna txantenna \
                frag rts beacon_int:100 htmode
        json_get_values basic_rate_list basic_rate
+       json_get_values scan_list scan_list
        json_select ..
 
        find_phy || {
index b33e8e1edc047812c38899b8aa0fb4bc512d01e0..3290358ed21ea571ac7b7683f6900b749064b1b9 100644 (file)
@@ -896,6 +896,7 @@ wpa_supplicant_prepare_interface() {
        fi
        wpa_supplicant_teardown_interface "$ifname"
        cat > "$_config" <<EOF
+${scan_list:+freq_list=$scan_list}
 $ap_scan
 $country_str
 EOF