diff options
author | Pavel Machek <pavel@ucw.cz> | 2020-06-04 23:41:57 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2020-06-25 10:54:09 +0200 |
commit | 01da2e059dc326d02091a62b81a795a393e3719f (patch) | |
tree | f25bffcd47faf186e37d546cc8aa841504d19993 /net | |
parent | mac80211: fix control port tx status check (diff) | |
download | linux-01da2e059dc326d02091a62b81a795a393e3719f.tar.xz linux-01da2e059dc326d02091a62b81a795a393e3719f.zip |
mac80211: simplify mesh code
Doing mod_timer() conditionaly is easier than conditionally unlocking
and jumping around...
Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
Acked-by: Linus Lüssing <ll@simonwunderlich.de>
Link: https://lore.kernel.org/r/20200604214157.GA9737@amd
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index aa5150929996..02cde0fd08fe 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -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: |