Skip to content
Snippets Groups Projects
Commit 06e421ed authored by David Bauer's avatar David Bauer
Browse files

net: mac80211: always pretend 1 Mbit/s as mesh basic rate


In order to be backwards-compatible, pretend to have 1 Mbit/s 802.11b as
basic rate regardless of the actual setting. This is required to keep
compatibility with other non-patched mesh neighbors.

Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
parent d6e74f00
No related branches found
No related tags found
No related merge requests found
From: David Bauer <mail@david-bauer.net>
Date: Tue, 7 Jan 2025 00:49:41 +0100
Subject: net: mac80211: always pretend 1 Mbit/s as mesh basic rate
In order to be backwards-compatible, pretend to have 1 Mbit/s 802.11b as
basic rate regardless of the actual setting. This is required to keep
compatibility with other non-patched mesh neighbors.
Signed-off-by: David Bauer <mail@david-bauer.net>
diff --git a/package/kernel/mac80211/patches/subsys/996-net-mac80211-always-pretend-1-Mbit-s-as-mesh-basic-r.patch b/package/kernel/mac80211/patches/subsys/996-net-mac80211-always-pretend-1-Mbit-s-as-mesh-basic-r.patch
new file mode 100644
index 0000000000000000000000000000000000000000..becb17317abb9782d4827a38c232b58939246ae1
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/996-net-mac80211-always-pretend-1-Mbit-s-as-mesh-basic-r.patch
@@ -0,0 +1,44 @@
+From 70c1812fa170ee35cdc576c886bed4bfaae1d23c Mon Sep 17 00:00:00 2001
+From: David Bauer <mail@david-bauer.net>
+Date: Tue, 7 Jan 2025 00:47:33 +0100
+Subject: [PATCH] net: mac80211: always pretend 1 Mbit/s as mesh basic rate
+
+In order to be backwards-compatible, pretend to have 1 Mbit/s 802.11b as
+basic rate regardless of the actual setting. This is required to keep
+compatibility with other non-patched mesh neighbors.
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+---
+ net/mac80211/util.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/net/mac80211/mesh.c
++++ b/net/mac80211/mesh.c
+@@ -1093,7 +1093,7 @@ ieee80211_mesh_build_beacon(struct ieee8
+ rcu_read_unlock();
+
+ if (ieee80211_put_srates_elem(skb, sband,
+- sdata->vif.bss_conf.basic_rates,
++ BIT(0),
+ rate_flags, 0, WLAN_EID_SUPP_RATES) ||
+ mesh_add_ds_params_ie(sdata, skb))
+ goto out_free;
+@@ -1106,7 +1106,7 @@ ieee80211_mesh_build_beacon(struct ieee8
+ bcn->tail = bcn->head + bcn->head_len;
+
+ if (ieee80211_put_srates_elem(skb, sband,
+- sdata->vif.bss_conf.basic_rates,
++ BIT(0),
+ rate_flags, 0, WLAN_EID_EXT_SUPP_RATES) ||
+ mesh_add_rsn_ie(sdata, skb) ||
+ mesh_add_ht_cap_ie(sdata, skb) ||
+--- a/net/mac80211/mesh_plink.c
++++ b/net/mac80211/mesh_plink.c
+@@ -283,6 +283,7 @@ static int mesh_plink_frame_tx(struct ie
+ rate_flags =
+ ieee80211_chandef_rate_flags(&sdata->vif.bss_conf.chanreq.oper);
+ basic_rates = sdata->vif.bss_conf.basic_rates;
++ basic_rates = BIT(0); /* mandatory rate */
+
+ if (ieee80211_put_srates_elem(skb, sband, basic_rates,
+ rate_flags, 0,
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment