Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314817
b: refs/heads/master
c: 7ebfa46
h: refs/heads/master
i:
  314815: 4b696df
v: v3
  • Loading branch information
Chun-Yeow Yeoh authored and Johannes Berg committed Jun 18, 2012
1 parent f0392bc commit 798b318
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 19 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: d6a4ed6fe0a0d4790941e7f13e56630b8b9b053d
refs/heads/master: 7ebfa46973aa239f79fbd4651ddeed5c92df45b2
43 changes: 25 additions & 18 deletions trunk/net/mac80211/mesh_hwmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,11 +771,6 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
bool root_is_gate;

ttl = rann->rann_ttl;
if (ttl <= 1) {
ifmsh->mshstats.dropped_frames_ttl++;
return;
}
ttl--;
flags = rann->rann_flags;
root_is_gate = !!(flags & RANN_FLAG_IS_GATE);
orig_addr = rann->rann_addr;
Expand Down Expand Up @@ -812,37 +807,49 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
}
}

if (!(SN_LT(mpath->sn, orig_sn)) &&
!(mpath->sn == orig_sn && metric < mpath->rann_metric)) {
rcu_read_unlock();
return;
}

if ((!(mpath->flags & (MESH_PATH_ACTIVE | MESH_PATH_RESOLVING)) ||
(time_after(jiffies, mpath->last_preq_to_root +
root_path_confirmation_jiffies(sdata)) ||
time_before(jiffies, mpath->last_preq_to_root))) &&
!(mpath->flags & MESH_PATH_FIXED)) {
!(mpath->flags & MESH_PATH_FIXED) && (ttl != 0)) {
mhwmp_dbg("%s time to refresh root mpath %pM", sdata->name,
orig_addr);
mesh_queue_preq(mpath, PREQ_Q_F_START | PREQ_Q_F_REFRESH);
mpath->last_preq_to_root = jiffies;
}

if ((SN_LT(mpath->sn, orig_sn) || (mpath->sn == orig_sn &&
metric < mpath->rann_metric)) && ifmsh->mshcfg.dot11MeshForwarding) {
mpath->sn = orig_sn;
mpath->rann_metric = metric + metric_txsta;
mpath->is_root = true;
/* Recording RANNs sender address to send individually
* addressed PREQs destined for root mesh STA */
memcpy(mpath->rann_snd_addr, mgmt->sa, ETH_ALEN);

if (root_is_gate)
mesh_path_add_gate(mpath);

if (ttl <= 1) {
ifmsh->mshstats.dropped_frames_ttl++;
rcu_read_unlock();
return;
}
ttl--;

if (ifmsh->mshcfg.dot11MeshForwarding) {
mesh_path_sel_frame_tx(MPATH_RANN, flags, orig_addr,
cpu_to_le32(orig_sn),
0, NULL, 0, broadcast_addr,
hopcount, ttl, cpu_to_le32(interval),
cpu_to_le32(metric + metric_txsta),
0, sdata);
mpath->sn = orig_sn;
mpath->rann_metric = metric + metric_txsta;
/* Recording RANNs sender address to send individually
* addressed PREQs destined for root mesh STA */
memcpy(mpath->rann_snd_addr, mgmt->sa, ETH_ALEN);
}

mpath->is_root = true;

if (root_is_gate)
mesh_path_add_gate(mpath);

rcu_read_unlock();
}

Expand Down

0 comments on commit 798b318

Please sign in to comment.