Skip to content

Commit

Permalink
wifi-scripts: allow per-IF mesh basic rate selection
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
blocktrron committed Jan 7, 2025
1 parent fb08eab commit 912527a
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From: David Bauer <mail@david-bauer.net>
Date: Tue, 7 Jan 2025 11:43:36 +0100
Subject: wifi-scripts: allow per-IF mesh basic rate selection

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>

diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
index 368885246a73b14153ffe3c7d83627f873111742..5b5a7fabda896c978b685b89163a36bae33fcdb6 100755
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
@@ -841,13 +841,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

0 comments on commit 912527a

Please sign in to comment.