Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300697
b: refs/heads/master
c: fe40cb6
h: refs/heads/master
i:
  300695: c0b344a
v: v3
  • Loading branch information
Ashok Nagarajan authored and John W. Linville committed Apr 11, 2012
1 parent 11637ba commit 8486fb7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9ebb61a23d90703344fc609fbee8da67b1e7456c
refs/heads/master: fe40cb6274988852aa5a84440d8f81c00cea4028
15 changes: 10 additions & 5 deletions trunk/net/mac80211/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ static void ieee80211_mesh_housekeeping_timer(unsigned long data)
*
* @ie: information elements of a management frame from the mesh peer
* @sdata: local mesh subif
* @basic_rates: BSSBasicRateSet of the peer candidate
*
* This function checks if the mesh configuration of a mesh point matches the
* local mesh configuration, i.e. if both nodes belong to the same mesh network.
*/
bool mesh_matches_local(struct ieee802_11_elems *ie, struct ieee80211_sub_if_data *sdata)
bool mesh_matches_local(struct ieee802_11_elems *ie,
struct ieee80211_sub_if_data *sdata, u32 basic_rates)
{
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
struct ieee80211_local *local = sdata->local;
Expand All @@ -94,6 +96,9 @@ bool mesh_matches_local(struct ieee802_11_elems *ie, struct ieee80211_sub_if_dat
(ifmsh->mesh_auth_id == ie->mesh_config->meshconf_auth)))
goto mismatch;

if (sdata->vif.bss_conf.basic_rates != basic_rates)
goto mismatch;

/* disallow peering with mismatched channel types for now */
if (ie->ht_operation &&
(local->_oper_channel_type !=
Expand Down Expand Up @@ -656,12 +661,12 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
if (!channel || channel->flags & IEEE80211_CHAN_DISABLED)
return;

supp_rates = ieee80211_sta_get_rates(local, &elems,
band, &basic_rates);

if (elems.mesh_id && elems.mesh_config &&
mesh_matches_local(&elems, sdata)) {
supp_rates = ieee80211_sta_get_rates(local, &elems,
band, &basic_rates);
mesh_matches_local(&elems, sdata, basic_rates))
mesh_neighbour_update(mgmt->sa, supp_rates, sdata, &elems);
}

if (ifmsh->sync_ops)
ifmsh->sync_ops->rx_bcn_presp(sdata,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/mac80211/mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ int ieee80211_new_mesh_header(struct ieee80211s_hdr *meshhdr,
int mesh_rmc_check(u8 *addr, struct ieee80211s_hdr *mesh_hdr,
struct ieee80211_sub_if_data *sdata);
bool mesh_matches_local(struct ieee802_11_elems *ie,
struct ieee80211_sub_if_data *sdata);
struct ieee80211_sub_if_data *sdata, u32 basic_rates);
void mesh_ids_set_default(struct ieee80211_if_mesh *mesh);
void mesh_mgmt_ies_add(struct sk_buff *skb,
struct ieee80211_sub_if_data *sdata);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/mac80211/mesh_plink.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
rx_status->band, &basic_rates);

if (ftype != WLAN_SP_MESH_PEERING_CLOSE &&
(!mesh_matches_local(&elems, sdata))) {
(!mesh_matches_local(&elems, sdata, basic_rates))) {
matches_local = false;
switch (ftype) {
case WLAN_SP_MESH_PEERING_OPEN:
Expand Down

0 comments on commit 8486fb7

Please sign in to comment.