]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.18.85/mac80211-suppress-new_peer_candidate-event-if-no-room.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.18.85 / mac80211-suppress-new_peer_candidate-event-if-no-room.patch
CommitLineData
af98e849
GKH
1From foo@baz Tue Nov 28 10:58:31 CET 2017
2From: Masashi Honma <masashi.honma@gmail.com>
3Date: Wed, 30 Nov 2016 09:06:04 +0900
4Subject: mac80211: Suppress NEW_PEER_CANDIDATE event if no room
5
6From: Masashi Honma <masashi.honma@gmail.com>
7
8
9[ Upstream commit 11197d006bcfabf0173a7820a163fcaac420d10e ]
10
11Previously, kernel sends NEW_PEER_CANDIDATE event to user land even if
12the found peer does not have any room to accept other peer. This causes
13continuous connection trials.
14
15Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
16Signed-off-by: Johannes Berg <johannes.berg@intel.com>
17Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 net/mac80211/mesh_plink.c | 14 ++++++++------
21 1 file changed, 8 insertions(+), 6 deletions(-)
22
23--- a/net/mac80211/mesh_plink.c
24+++ b/net/mac80211/mesh_plink.c
25@@ -448,12 +448,14 @@ mesh_sta_info_alloc(struct ieee80211_sub
26
27 /* Userspace handles station allocation */
28 if (sdata->u.mesh.user_mpm ||
29- sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED)
30- cfg80211_notify_new_peer_candidate(sdata->dev, addr,
31- elems->ie_start,
32- elems->total_len,
33- GFP_KERNEL);
34- else
35+ sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED) {
36+ if (mesh_peer_accepts_plinks(elems) &&
37+ mesh_plink_availables(sdata))
38+ cfg80211_notify_new_peer_candidate(sdata->dev, addr,
39+ elems->ie_start,
40+ elems->total_len,
41+ GFP_KERNEL);
42+ } else
43 sta = __mesh_sta_info_alloc(sdata, addr);
44
45 return sta;