Skip to content

Commit

Permalink
fixup! net: mac80211: always pretend 1 Mbit/s as mesh basic rate
Browse files Browse the repository at this point in the history
  • Loading branch information
blocktrron committed Jan 7, 2025
1 parent 0e8e6b0 commit 2cad4de
Showing 1 changed file with 61 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
From: David Bauer <[email protected]>
Date: Tue, 7 Jan 2025 08:54:18 +0100
Subject: fixup! net: mac80211: always pretend 1 Mbit/s as mesh basic rate

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
index 7c39618fed6b47480541a55265703d5b04323527..becb17317abb9782d4827a38c232b58939246ae1 100644
--- 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
@@ -12,23 +12,33 @@ Signed-off-by: David Bauer <[email protected]>
net/mac80211/util.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

-diff --git a/net/mac80211/util.c b/net/mac80211/util.c
-index 02b5aaad2a15..74032acadf8e 100644
---- a/net/mac80211/util.c
-+++ b/net/mac80211/util.c
-@@ -4074,10 +4074,10 @@ int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata,
- *pos++ = rates;
- for (i = 0; i < rates; i++) {
- u8 basic = 0;
-- if ((rate_flags & sband->bitrates[i].flags) != rate_flags)
-+ if (sband->bitrates[i].bitrate != 10 && (rate_flags & sband->bitrates[i].flags) != rate_flags)
- continue;
+--- a/net/mac80211/mesh.c
++++ b/net/mac80211/mesh.c
+@@ -1093,7 +1093,7 @@ ieee80211_mesh_build_beacon(struct ieee8
+ rcu_read_unlock();

-- if (need_basic && basic_rates & BIT(i))
-+ if (need_basic && sband->bitrates[i].bitrate == 10)
- basic = 0x80;
- rate = DIV_ROUND_UP(sband->bitrates[i].bitrate,
- 5 * (1 << shift));
---
-2.45.2
-
+ 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 comments on commit 2cad4de

Please sign in to comment.