Skip to contentSkip to conversation

net:mac80211:mesh_plink: remove redundant sta_info check

PATCH Applied Sunil Shahu 2 participants 2 messages Jan 21, 2016 – Jan 26, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net:mac80211:mesh_plink: remove redundant sta_info check

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

---
 net/mac80211/mesh_plink.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
net/mac80211/mesh_plink.c +3 -6
index bd3d55e..e5851ae 100644
@@ -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)
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 3 lines · Sunil Shahu

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

Applied.

johannes