diff options
Diffstat (limited to 'net/mac80211/mesh_pathtbl.c')
-rw-r--r-- | net/mac80211/mesh_pathtbl.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 157642f780b9..be1361b5f7ad 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c | |||
@@ -559,7 +559,7 @@ int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata) | |||
559 | hash_idx = mesh_table_hash(dst, sdata, tbl); | 559 | hash_idx = mesh_table_hash(dst, sdata, tbl); |
560 | bucket = &tbl->hash_buckets[hash_idx]; | 560 | bucket = &tbl->hash_buckets[hash_idx]; |
561 | 561 | ||
562 | spin_lock_bh(&tbl->hashwlock[hash_idx]); | 562 | spin_lock(&tbl->hashwlock[hash_idx]); |
563 | 563 | ||
564 | err = -EEXIST; | 564 | err = -EEXIST; |
565 | hlist_for_each_entry(node, n, bucket, list) { | 565 | hlist_for_each_entry(node, n, bucket, list) { |
@@ -576,7 +576,7 @@ int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata) | |||
576 | 576 | ||
577 | mesh_paths_generation++; | 577 | mesh_paths_generation++; |
578 | 578 | ||
579 | spin_unlock_bh(&tbl->hashwlock[hash_idx]); | 579 | spin_unlock(&tbl->hashwlock[hash_idx]); |
580 | read_unlock_bh(&pathtbl_resize_lock); | 580 | read_unlock_bh(&pathtbl_resize_lock); |
581 | if (grow) { | 581 | if (grow) { |
582 | set_bit(MESH_WORK_GROW_MPATH_TABLE, &ifmsh->wrkq_flags); | 582 | set_bit(MESH_WORK_GROW_MPATH_TABLE, &ifmsh->wrkq_flags); |
@@ -585,7 +585,7 @@ int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata) | |||
585 | return 0; | 585 | return 0; |
586 | 586 | ||
587 | err_exists: | 587 | err_exists: |
588 | spin_unlock_bh(&tbl->hashwlock[hash_idx]); | 588 | spin_unlock(&tbl->hashwlock[hash_idx]); |
589 | read_unlock_bh(&pathtbl_resize_lock); | 589 | read_unlock_bh(&pathtbl_resize_lock); |
590 | kfree(new_node); | 590 | kfree(new_node); |
591 | err_node_alloc: | 591 | err_node_alloc: |
@@ -688,7 +688,7 @@ int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata) | |||
688 | hash_idx = mesh_table_hash(dst, sdata, tbl); | 688 | hash_idx = mesh_table_hash(dst, sdata, tbl); |
689 | bucket = &tbl->hash_buckets[hash_idx]; | 689 | bucket = &tbl->hash_buckets[hash_idx]; |
690 | 690 | ||
691 | spin_lock_bh(&tbl->hashwlock[hash_idx]); | 691 | spin_lock(&tbl->hashwlock[hash_idx]); |
692 | 692 | ||
693 | err = -EEXIST; | 693 | err = -EEXIST; |
694 | hlist_for_each_entry(node, n, bucket, list) { | 694 | hlist_for_each_entry(node, n, bucket, list) { |
@@ -703,7 +703,7 @@ int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata) | |||
703 | tbl->mean_chain_len * (tbl->hash_mask + 1)) | 703 | tbl->mean_chain_len * (tbl->hash_mask + 1)) |
704 | grow = 1; | 704 | grow = 1; |
705 | 705 | ||
706 | spin_unlock_bh(&tbl->hashwlock[hash_idx]); | 706 | spin_unlock(&tbl->hashwlock[hash_idx]); |
707 | read_unlock_bh(&pathtbl_resize_lock); | 707 | read_unlock_bh(&pathtbl_resize_lock); |
708 | if (grow) { | 708 | if (grow) { |
709 | set_bit(MESH_WORK_GROW_MPP_TABLE, &ifmsh->wrkq_flags); | 709 | set_bit(MESH_WORK_GROW_MPP_TABLE, &ifmsh->wrkq_flags); |
@@ -712,7 +712,7 @@ int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata) | |||
712 | return 0; | 712 | return 0; |
713 | 713 | ||
714 | err_exists: | 714 | err_exists: |
715 | spin_unlock_bh(&tbl->hashwlock[hash_idx]); | 715 | spin_unlock(&tbl->hashwlock[hash_idx]); |
716 | read_unlock_bh(&pathtbl_resize_lock); | 716 | read_unlock_bh(&pathtbl_resize_lock); |
717 | kfree(new_node); | 717 | kfree(new_node); |
718 | err_node_alloc: | 718 | err_node_alloc: |
@@ -811,9 +811,9 @@ void mesh_path_flush_by_nexthop(struct sta_info *sta) | |||
811 | for_each_mesh_entry(tbl, p, node, i) { | 811 | for_each_mesh_entry(tbl, p, node, i) { |
812 | mpath = node->mpath; | 812 | mpath = node->mpath; |
813 | if (rcu_dereference(mpath->next_hop) == sta) { | 813 | if (rcu_dereference(mpath->next_hop) == sta) { |
814 | spin_lock_bh(&tbl->hashwlock[i]); | 814 | spin_lock(&tbl->hashwlock[i]); |
815 | __mesh_path_del(tbl, node); | 815 | __mesh_path_del(tbl, node); |
816 | spin_unlock_bh(&tbl->hashwlock[i]); | 816 | spin_unlock(&tbl->hashwlock[i]); |
817 | } | 817 | } |
818 | } | 818 | } |
819 | read_unlock_bh(&pathtbl_resize_lock); | 819 | read_unlock_bh(&pathtbl_resize_lock); |
@@ -884,7 +884,7 @@ int mesh_path_del(u8 *addr, struct ieee80211_sub_if_data *sdata) | |||
884 | hash_idx = mesh_table_hash(addr, sdata, tbl); | 884 | hash_idx = mesh_table_hash(addr, sdata, tbl); |
885 | bucket = &tbl->hash_buckets[hash_idx]; | 885 | bucket = &tbl->hash_buckets[hash_idx]; |
886 | 886 | ||
887 | spin_lock_bh(&tbl->hashwlock[hash_idx]); | 887 | spin_lock(&tbl->hashwlock[hash_idx]); |
888 | hlist_for_each_entry(node, n, bucket, list) { | 888 | hlist_for_each_entry(node, n, bucket, list) { |
889 | mpath = node->mpath; | 889 | mpath = node->mpath; |
890 | if (mpath->sdata == sdata && | 890 | if (mpath->sdata == sdata && |
@@ -897,7 +897,7 @@ int mesh_path_del(u8 *addr, struct ieee80211_sub_if_data *sdata) | |||
897 | err = -ENXIO; | 897 | err = -ENXIO; |
898 | enddel: | 898 | enddel: |
899 | mesh_paths_generation++; | 899 | mesh_paths_generation++; |
900 | spin_unlock_bh(&tbl->hashwlock[hash_idx]); | 900 | spin_unlock(&tbl->hashwlock[hash_idx]); |
901 | read_unlock_bh(&pathtbl_resize_lock); | 901 | read_unlock_bh(&pathtbl_resize_lock); |
902 | return err; | 902 | return err; |
903 | } | 903 | } |