mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-07 06:18:54 +00:00
1bfcc1ea8a
Brings lots of driver updates and API changes needed for mt76 updates. Disable iwlwifi and ath11k on 5.15, since backport is too difficult, and the only remaining targets won't need those drivers. Signed-off-by: Felix Fietkau <nbd@nbd.name>
43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
From b478e06a16a8baa00c5ecc87c1d636981f2206d5 Mon Sep 17 00:00:00 2001
|
|
From: Johannes Berg <johannes.berg@intel.com>
|
|
Date: Tue, 29 Oct 2019 10:25:25 +0100
|
|
Subject: [PATCH] mac80211: sta: randomize BA session dialog token allocator
|
|
|
|
We currently always start the dialog token generator at zero,
|
|
so the first dialog token we use is always 1. This would be
|
|
OK if we had a perfect guarantee that we always do a proper
|
|
deauth/re-auth handshake, but in IBSS mode this doesn't always
|
|
happen properly.
|
|
|
|
To make problems with block ack (aggregation) sessions getting
|
|
stuck less likely, randomize the dialog token so if we start a
|
|
new session but the peer still has old state for us, it can
|
|
better detect this.
|
|
|
|
This is really just a workaround to make things a bit more
|
|
robust than they are now - a better fix would be to do a full
|
|
authentication handshake in IBSS mode upon having discovered a
|
|
new station, and on the receiver resetting the state (removing
|
|
and re-adding the station) on receiving the authentication
|
|
packet.
|
|
|
|
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
---
|
|
net/mac80211/sta_info.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
--- a/net/mac80211/sta_info.c
|
|
+++ b/net/mac80211/sta_info.c
|
|
@@ -565,6 +565,11 @@ __sta_info_alloc(struct ieee80211_sub_if
|
|
spin_lock_init(&sta->ps_lock);
|
|
INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames);
|
|
wiphy_work_init(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
|
|
+#if LINUX_VERSION_IS_LESS(6,2,0)
|
|
+ sta->ampdu_mlme.dialog_token_allocator = prandom_u32_max(U8_MAX);
|
|
+#else
|
|
+ sta->ampdu_mlme.dialog_token_allocator = get_random_u32_below(U8_MAX);
|
|
+#endif
|
|
#ifdef CPTCFG_MAC80211_MESH
|
|
if (ieee80211_vif_is_mesh(&sdata->vif)) {
|
|
sta->mesh = kzalloc(sizeof(*sta->mesh), gfp);
|