wifi-scripts: allow per-IF mesh basic rate selection master
authorDavid Bauer <mail@david-bauer.net>
Tue, 7 Jan 2025 10:43:36 +0000 (11:43 +0100)
committerDavid Bauer <mail@david-bauer.net>
Tue, 7 Jan 2025 10:44:35 +0000 (11:44 +0100)
Bringing up a mesh interface using wpa_supplicant already supports a
per-VIF basic rate selection. Add the same ability when creating a mesh
VIF without wpa_supplicant.

Signed-off-by: David Bauer <mail@david-bauer.net>
package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh

index 52c36a8c926835850ac7d222cd9c8df2c8f894b0..7d6dbdd84035e23d988821694d1529648f01259c 100755 (executable)
@@ -844,13 +844,19 @@ mac80211_setup_adhoc() {
 
 mac80211_setup_mesh() {
        json_get_vars ssid mesh_id mcast_rate
+       json_get_values iface_basic_rate_list basic_rate
 
        mcval=
        [ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate"
        [ -n "$mesh_id" ] && ssid="$mesh_id"
 
+       brlist="$basic_rate_list"
+       if [ -n "$iface_basic_rate_list" ]; then
+               brlist="$iface_basic_rate_list"
+       fi
+
        brstr=
-       for br in $basic_rate_list; do
+       for br in $brlist; do
                wpa_supplicant_add_rate brstr "$br"
        done