summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Bauer2024-12-22 01:56:12 +0000
committerDavid Bauer2025-01-06 06:19:50 +0000
commit3ec7f3a512a27f8ca6402954ad2a997176103b4b (patch)
tree546ebcfbfe10ef79b3e85a56c77d375b31c991a8
parent381f6624cfb5a1beb763cb09967cb931bcd98427 (diff)
downloadopenwrt-3ec7f3a512a27f8ca6402954ad2a997176103b4b.tar.gz
mac80211: set basic-rate for mesh interfaces
Basic rates were not set for mesh-interfaces, resulting in the undesired behavior where 11s frames might be sent with a rate which was not configured. Depending on the driver, the basic rate might also be used to determine the beacon rate configured to the chip. One such example are MediaTek MT7915 platforms. Signed-off-by: David Bauer <mail@david-bauer.net>
-rwxr-xr-xpackage/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh6
-rw-r--r--package/network/config/wifi-scripts/files/usr/share/hostap/wdev.uc2
2 files changed, 7 insertions, 1 deletions
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 9e9922e0b3..52c36a8c92 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
@@ -849,6 +849,11 @@ mac80211_setup_mesh() {
[ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate"
[ -n "$mesh_id" ] && ssid="$mesh_id"
+ brstr=
+ for br in $basic_rate_list; do
+ wpa_supplicant_add_rate brstr "$br"
+ done
+
local prev
json_set_namespace wdev_uc prev
@@ -859,6 +864,7 @@ mac80211_setup_mesh() {
json_add_string freq "$freq"
json_add_string htmode "$iw_htmode"
[ -n "$mcval" ] && json_add_string mcast-rate "$mcval"
+ [ -n "$brstr" ] && json_add_string basic-rates "$brstr"
json_add_int beacon-interval "$beacon_int"
mac80211_add_mesh_params
diff --git a/package/network/config/wifi-scripts/files/usr/share/hostap/wdev.uc b/package/network/config/wifi-scripts/files/usr/share/hostap/wdev.uc
index d836a930fc..166e9403df 100644
--- a/package/network/config/wifi-scripts/files/usr/share/hostap/wdev.uc
+++ b/package/network/config/wifi-scripts/files/usr/share/hostap/wdev.uc
@@ -45,7 +45,7 @@ function iface_start(wdev)
system(cmd);
} else if (wdev.mode == "mesh") {
let cmd = [ "iw", "dev", ifname, "mesh", "join", wdev.ssid, "freq", wdev.freq, htmode ];
- for (let key in [ "mcast-rate", "beacon-interval" ])
+ for (let key in [ "basic-rates", "mcast-rate", "beacon-interval" ])
if (wdev[key])
push(cmd, key, wdev[key]);
system(cmd);