aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@cozybit.com>2012-10-20 22:03:10 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-23 13:52:52 -0400
commit9a90bc81914ee77edcd6eb7e881639b7f7bf1667 (patch)
tree41e11a1dce7c1708459f9e8d9aa5a713a9c3dcdb /net
parent746a336582a7e05082ab4efbb43f5357858f629a (diff)
mac80211: mesh STAs only process mesh beacons
Before, a mesh STA would execute some code on behalf of AP or IBSS beacons. Since the mesh stack currently does not consider anything but other mesh STAs interesting, limit processing to just these and save a little overhead. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mesh.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 5bed4fd5ee19..a350cab4b339 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -703,8 +703,10 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
703 ieee802_11_parse_elems(mgmt->u.probe_resp.variable, len - baselen, 703 ieee802_11_parse_elems(mgmt->u.probe_resp.variable, len - baselen,
704 &elems); 704 &elems);
705 705
706 /* ignore beacons from secure mesh peers if our security is off */ 706 /* ignore non-mesh or secure / unsecure mismatch */
707 if (elems.rsn_len && sdata->u.mesh.security == IEEE80211_MESH_SEC_NONE) 707 if ((!elems.mesh_id || !elems.mesh_config) ||
708 (elems.rsn && sdata->u.mesh.security == IEEE80211_MESH_SEC_NONE) ||
709 (!elems.rsn && sdata->u.mesh.security != IEEE80211_MESH_SEC_NONE))
708 return; 710 return;
709 711
710 if (elems.ds_params && elems.ds_params_len == 1) 712 if (elems.ds_params && elems.ds_params_len == 1)
@@ -717,8 +719,7 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
717 if (!channel || channel->flags & IEEE80211_CHAN_DISABLED) 719 if (!channel || channel->flags & IEEE80211_CHAN_DISABLED)
718 return; 720 return;
719 721
720 if (elems.mesh_id && elems.mesh_config && 722 if (mesh_matches_local(sdata, &elems))
721 mesh_matches_local(sdata, &elems))
722 mesh_neighbour_update(sdata, mgmt->sa, &elems); 723 mesh_neighbour_update(sdata, mgmt->sa, &elems);
723 724
724 if (ifmsh->sync_ops) 725 if (ifmsh->sync_ops)