netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/80211: simplify mesh code
@ 2020-06-04 21:41 Pavel Machek
  2020-06-16  8:30 ` Linus Lüssing
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2020-06-04 21:41 UTC (permalink / raw)
  To: johannes, davem, kuba, linux-wireless, netdev, trivial

[-- Attachment #1: Type: text/plain, Size: 995 bytes --]


Doing mod_timer() conditionaly is easier than conditionally unlocking
and jumping around...

Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>

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:

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: net/80211: simplify mesh code
  2020-06-04 21:41 [PATCH] net/80211: simplify mesh code Pavel Machek
@ 2020-06-16  8:30 ` Linus Lüssing
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Lüssing @ 2020-06-16  8:30 UTC (permalink / raw)
  To: linux-wireless, Pavel Machek, Pavel Machek, johannes
  Cc: davem, kuba, netdev, trivial, Linus Lüssing

Acked-by: Linus Lüssing <ll@simonwunderlich.de>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-16  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-04 21:41 [PATCH] net/80211: simplify mesh code Pavel Machek
2020-06-16  8:30 ` Linus Lüssing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).