diff options
author | Thomas Pedersen <thomas@cozybit.com> | 2013-03-04 16:06:12 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-03-06 10:36:12 -0500 |
commit | a6dad6a26e15f2f9269eea41b756c8cf0971b2bc (patch) | |
tree | d2a70dcb7f9cb3711270bcb3be5e44ce99734b85 /net/mac80211/mesh_plink.c | |
parent | eef941e6d6be8bce72b5c2963b69f948be4df7a7 (diff) |
mac80211: support userspace MPM
Earlier mac80211 would check whether some kind of mesh
security was enabled, when the real question was "is the
MPM in userspace"?
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r-- | net/mac80211/mesh_plink.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 08df966320b8..e259951b0219 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -437,8 +437,9 @@ mesh_sta_info_alloc(struct ieee80211_sub_if_data *sdata, u8 *addr, | |||
437 | { | 437 | { |
438 | struct sta_info *sta = NULL; | 438 | struct sta_info *sta = NULL; |
439 | 439 | ||
440 | /* Userspace handles peer allocation when security is enabled */ | 440 | /* Userspace handles station allocation */ |
441 | if (sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED) | 441 | if (sdata->u.mesh.user_mpm || |
442 | sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED) | ||
442 | cfg80211_notify_new_peer_candidate(sdata->dev, addr, | 443 | cfg80211_notify_new_peer_candidate(sdata->dev, addr, |
443 | elems->ie_start, | 444 | elems->ie_start, |
444 | elems->total_len, | 445 | elems->total_len, |
@@ -670,6 +671,10 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, | |||
670 | if (len < IEEE80211_MIN_ACTION_SIZE + 3) | 671 | if (len < IEEE80211_MIN_ACTION_SIZE + 3) |
671 | return; | 672 | return; |
672 | 673 | ||
674 | if (sdata->u.mesh.user_mpm) | ||
675 | /* userspace must register for these */ | ||
676 | return; | ||
677 | |||
673 | if (is_multicast_ether_addr(mgmt->da)) { | 678 | if (is_multicast_ether_addr(mgmt->da)) { |
674 | mpl_dbg(sdata, | 679 | mpl_dbg(sdata, |
675 | "Mesh plink: ignore frame from multicast address\n"); | 680 | "Mesh plink: ignore frame from multicast address\n"); |