Skip to content

Commit

Permalink
mac80211: simplify mesh code
Browse files Browse the repository at this point in the history
Doing mod_timer() conditionaly is easier than conditionally unlocking
and jumping around...

Signed-off-by: Pavel Machek (CIP) <[email protected]>
Acked-by: Linus Lüssing <[email protected]>
Link: https://lore.kernel.org/r/20200604214157.GA9737@amd
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
pavelmachek authored and jmberg-intel committed Jun 25, 2020
1 parent 86a1b9d commit 01da2e0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions net/mac80211/mesh_hwmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,11 +1105,8 @@ void mesh_path_start_discovery(struct ieee80211_sub_if_data *sdata)
ttl, lifetime, 0, ifmsh->preq_id++, sdata);

spin_lock_bh(&mpath->state_lock);
if (mpath->flags & MESH_PATH_DELETED) {
spin_unlock_bh(&mpath->state_lock);
goto enddiscovery;
}
mod_timer(&mpath->timer, jiffies + mpath->discovery_timeout);
if (!(mpath->flags & MESH_PATH_DELETED))
mod_timer(&mpath->timer, jiffies + mpath->discovery_timeout);
spin_unlock_bh(&mpath->state_lock);

enddiscovery:
Expand Down

0 comments on commit 01da2e0

Please sign in to comment.