]>
Commit | Line | Data |
---|---|---|
af98e849 GKH |
1 | From foo@baz Tue Nov 28 10:58:31 CET 2017 |
2 | From: Masashi Honma <masashi.honma@gmail.com> | |
3 | Date: Wed, 30 Nov 2016 09:06:04 +0900 | |
4 | Subject: mac80211: Suppress NEW_PEER_CANDIDATE event if no room | |
5 | ||
6 | From: Masashi Honma <masashi.honma@gmail.com> | |
7 | ||
8 | ||
9 | [ Upstream commit 11197d006bcfabf0173a7820a163fcaac420d10e ] | |
10 | ||
11 | Previously, kernel sends NEW_PEER_CANDIDATE event to user land even if | |
12 | the found peer does not have any room to accept other peer. This causes | |
13 | continuous connection trials. | |
14 | ||
15 | Signed-off-by: Masashi Honma <masashi.honma@gmail.com> | |
16 | Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |
17 | Signed-off-by: Sasha Levin <alexander.levin@verizon.com> | |
18 | Signed-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; |