Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1171ebb0 authored by Masashi Honma's avatar Masashi Honma Committed by Greg Kroah-Hartman
Browse files

mac80211: Suppress NEW_PEER_CANDIDATE event if no room




[ Upstream commit 11197d006bcfabf0173a7820a163fcaac420d10e ]

Previously, kernel sends NEW_PEER_CANDIDATE event to user land even if
the found peer does not have any room to accept other peer. This causes
continuous connection trials.

Signed-off-by: default avatarMasashi Honma <masashi.honma@gmail.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9d825502
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -448,12 +448,14 @@ mesh_sta_info_alloc(struct ieee80211_sub_if_data *sdata, u8 *addr,

	/* Userspace handles station allocation */
	if (sdata->u.mesh.user_mpm ||
	    sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED)
	    sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED) {
		if (mesh_peer_accepts_plinks(elems) &&
		    mesh_plink_availables(sdata))
			cfg80211_notify_new_peer_candidate(sdata->dev, addr,
							   elems->ie_start,
							   elems->total_len,
							   GFP_KERNEL);
	else
	} else
		sta = __mesh_sta_info_alloc(sdata, addr);

	return sta;