aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2011-08-29 16:23:06 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-09-13 15:42:32 -0400
commitad99d141144c4996c810fe75f04c387214ca360a (patch)
tree3490e5241724185cbe6655275bf4e4f08a350754 /net/mac80211
parentf5e50cd0757cc97cd1caded0d3f07ff09b5319e4 (diff)
mac80211: Remove redundant mesh path expiration checks
Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mesh_pathtbl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 618f84148a75..717f38a7134c 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -359,8 +359,7 @@ struct mesh_path *mesh_path_lookup(u8 *dst, struct ieee80211_sub_if_data *sdata)
359 memcmp(dst, mpath->dst, ETH_ALEN) == 0) { 359 memcmp(dst, mpath->dst, ETH_ALEN) == 0) {
360 if (MPATH_EXPIRED(mpath)) { 360 if (MPATH_EXPIRED(mpath)) {
361 spin_lock_bh(&mpath->state_lock); 361 spin_lock_bh(&mpath->state_lock);
362 if (MPATH_EXPIRED(mpath)) 362 mpath->flags &= ~MESH_PATH_ACTIVE;
363 mpath->flags &= ~MESH_PATH_ACTIVE;
364 spin_unlock_bh(&mpath->state_lock); 363 spin_unlock_bh(&mpath->state_lock);
365 } 364 }
366 return mpath; 365 return mpath;
@@ -386,8 +385,7 @@ struct mesh_path *mpp_path_lookup(u8 *dst, struct ieee80211_sub_if_data *sdata)
386 memcmp(dst, mpath->dst, ETH_ALEN) == 0) { 385 memcmp(dst, mpath->dst, ETH_ALEN) == 0) {
387 if (MPATH_EXPIRED(mpath)) { 386 if (MPATH_EXPIRED(mpath)) {
388 spin_lock_bh(&mpath->state_lock); 387 spin_lock_bh(&mpath->state_lock);
389 if (MPATH_EXPIRED(mpath)) 388 mpath->flags &= ~MESH_PATH_ACTIVE;
390 mpath->flags &= ~MESH_PATH_ACTIVE;
391 spin_unlock_bh(&mpath->state_lock); 389 spin_unlock_bh(&mpath->state_lock);
392 } 390 }
393 return mpath; 391 return mpath;
@@ -420,8 +418,7 @@ struct mesh_path *mesh_path_lookup_by_idx(int idx, struct ieee80211_sub_if_data
420 if (j++ == idx) { 418 if (j++ == idx) {
421 if (MPATH_EXPIRED(node->mpath)) { 419 if (MPATH_EXPIRED(node->mpath)) {
422 spin_lock_bh(&node->mpath->state_lock); 420 spin_lock_bh(&node->mpath->state_lock);
423 if (MPATH_EXPIRED(node->mpath)) 421 node->mpath->flags &= ~MESH_PATH_ACTIVE;
424 node->mpath->flags &= ~MESH_PATH_ACTIVE;
425 spin_unlock_bh(&node->mpath->state_lock); 422 spin_unlock_bh(&node->mpath->state_lock);
426 } 423 }
427 return node->mpath; 424 return node->mpath;