netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net:mac80211:mesh_plink: remove redundant sta_info check
@ 2016-01-21  5:36 Sunil Shahu
  2016-01-26 13:10 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Sunil Shahu @ 2016-01-21  5:36 UTC (permalink / raw)
  To: johannes; +Cc: davem, linux-wireless, netdev, linux-kernel

Remove unnecessory "if" statement and club it with previos "if" block.

Signed-off-by: Sunil Shahu <shshahu@gmail.com>
---
 net/mac80211/mesh_plink.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index bd3d55e..e5851ae 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -976,6 +976,9 @@ mesh_plink_get_event(struct ieee80211_sub_if_data *sdata,
 			mpl_dbg(sdata, "Mesh plink error: no more free plinks\n");
 			goto out;
 		}
+		/* new matching peer */
+		event = OPN_ACPT;
+		goto out;
 	} else {
 		if (!test_sta_flag(sta, WLAN_STA_AUTH)) {
 			mpl_dbg(sdata, "Mesh plink: Action frame from non-authed peer\n");
@@ -985,12 +988,6 @@ mesh_plink_get_event(struct ieee80211_sub_if_data *sdata,
 			goto out;
 	}
 
-	/* new matching peer */
-	if (!sta) {
-		event = OPN_ACPT;
-		goto out;
-	}
-
 	switch (ftype) {
 	case WLAN_SP_MESH_PEERING_OPEN:
 		if (!matches_local)
-- 
1.9.1

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

end of thread, other threads:[~2016-01-26 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-21  5:36 [PATCH] net:mac80211:mesh_plink: remove redundant sta_info check Sunil Shahu
2016-01-26 13:10 ` Johannes Berg

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).