Skip to content

Commit

Permalink
mac80211: mesh_plink: remove redundant sta_info check
Browse files Browse the repository at this point in the history
Remove unnecessory "if" statement and club it with previos "if" block.

Signed-off-by: Sunil Shahu <shshahu@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Sunil Shahu authored and Johannes Berg committed Feb 24, 2016
1 parent d4634e8 commit b8631c0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions net/mac80211/mesh_plink.c
Original file line number Diff line number Diff line change
@@ -976,6 +976,10 @@ 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 +989,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)

0 comments on commit b8631c0

Please sign in to comment.