mac80211: Remove redundant mesh path expiration checks
authorJavier Cardona <javier@cozybit.com>
Mon, 29 Aug 2011 20:23:06 +0000 (13:23 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 Sep 2011 19:42:32 +0000 (15:42 -0400)
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mesh_pathtbl.c

index 618f84148a7556a4cfab82fdd7e3904063dbe685..717f38a7134cd127f1027e11c8718225a4695e80 100644 (file)
@@ -359,8 +359,7 @@ struct mesh_path *mesh_path_lookup(u8 *dst, struct ieee80211_sub_if_data *sdata)
                                memcmp(dst, mpath->dst, ETH_ALEN) == 0) {
                        if (MPATH_EXPIRED(mpath)) {
                                spin_lock_bh(&mpath->state_lock);
-                               if (MPATH_EXPIRED(mpath))
-                                       mpath->flags &= ~MESH_PATH_ACTIVE;
+                               mpath->flags &= ~MESH_PATH_ACTIVE;
                                spin_unlock_bh(&mpath->state_lock);
                        }
                        return mpath;
@@ -386,8 +385,7 @@ struct mesh_path *mpp_path_lookup(u8 *dst, struct ieee80211_sub_if_data *sdata)
                    memcmp(dst, mpath->dst, ETH_ALEN) == 0) {
                        if (MPATH_EXPIRED(mpath)) {
                                spin_lock_bh(&mpath->state_lock);
-                               if (MPATH_EXPIRED(mpath))
-                                       mpath->flags &= ~MESH_PATH_ACTIVE;
+                               mpath->flags &= ~MESH_PATH_ACTIVE;
                                spin_unlock_bh(&mpath->state_lock);
                        }
                        return mpath;
@@ -420,8 +418,7 @@ struct mesh_path *mesh_path_lookup_by_idx(int idx, struct ieee80211_sub_if_data
                if (j++ == idx) {
                        if (MPATH_EXPIRED(node->mpath)) {
                                spin_lock_bh(&node->mpath->state_lock);
-                               if (MPATH_EXPIRED(node->mpath))
-                                       node->mpath->flags &= ~MESH_PATH_ACTIVE;
+                               node->mpath->flags &= ~MESH_PATH_ACTIVE;
                                spin_unlock_bh(&node->mpath->state_lock);
                        }
                        return node->mpath;