mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 19:31:55 +00:00
42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
From 104d639b041c4a51002bfb7ba2b2eddb1c23cf80 Mon Sep 17 00:00:00 2001
|
|
From: Shaul Triebitz <shaul.triebitz@intel.com>
|
|
Date: Sun, 24 Jul 2022 11:07:32 +0300
|
|
Subject: [PATCH] wifi: mac80211: properly set old_links when removing a link
|
|
|
|
In ieee80211_sta_remove_link, valid_links is set to
|
|
the new_links before calling drv_change_sta_links, but
|
|
is used for the old_links.
|
|
|
|
Fixes: cb71f1d136a6 ("wifi: mac80211: add sta link addition/removal")
|
|
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
|
|
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
---
|
|
net/mac80211/sta_info.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
|
|
index b354906..3822665 100644
|
|
--- a/net/mac80211/sta_info.c
|
|
+++ b/net/mac80211/sta_info.c
|
|
@@ -2823,6 +2823,7 @@ hash:
|
|
void ieee80211_sta_remove_link(struct sta_info *sta, unsigned int link_id)
|
|
{
|
|
struct ieee80211_sub_if_data *sdata = sta->sdata;
|
|
+ u16 old_links = sta->sta.valid_links;
|
|
|
|
lockdep_assert_held(&sdata->local->sta_mtx);
|
|
|
|
@@ -2830,8 +2831,7 @@ void ieee80211_sta_remove_link(struct sta_info *sta, unsigned int link_id)
|
|
|
|
if (test_sta_flag(sta, WLAN_STA_INSERTED))
|
|
drv_change_sta_links(sdata->local, sdata, &sta->sta,
|
|
- sta->sta.valid_links,
|
|
- sta->sta.valid_links & ~BIT(link_id));
|
|
+ old_links, sta->sta.valid_links);
|
|
|
|
sta_remove_link(sta, link_id, true);
|
|
}
|
|
--
|
|
2.17.1
|
|
|