diff options
Diffstat (limited to 'net/mac80211/mesh_pathtbl.c')
-rw-r--r-- | net/mac80211/mesh_pathtbl.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 75e4b6022b86..3c2bcb2de844 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c | |||
@@ -288,7 +288,7 @@ static void mesh_path_move_to_queue(struct mesh_path *gate_mpath, | |||
288 | struct mesh_path *from_mpath, | 288 | struct mesh_path *from_mpath, |
289 | bool copy) | 289 | bool copy) |
290 | { | 290 | { |
291 | struct sk_buff *skb, *cp_skb; | 291 | struct sk_buff *skb, *cp_skb = NULL; |
292 | struct sk_buff_head gateq, failq; | 292 | struct sk_buff_head gateq, failq; |
293 | unsigned long flags; | 293 | unsigned long flags; |
294 | int num_skbs; | 294 | int num_skbs; |
@@ -711,6 +711,7 @@ int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata) | |||
711 | new_mpath->flags = 0; | 711 | new_mpath->flags = 0; |
712 | skb_queue_head_init(&new_mpath->frame_queue); | 712 | skb_queue_head_init(&new_mpath->frame_queue); |
713 | new_node->mpath = new_mpath; | 713 | new_node->mpath = new_mpath; |
714 | init_timer(&new_mpath->timer); | ||
714 | new_mpath->exp_time = jiffies; | 715 | new_mpath->exp_time = jiffies; |
715 | spin_lock_init(&new_mpath->state_lock); | 716 | spin_lock_init(&new_mpath->state_lock); |
716 | 717 | ||
@@ -843,8 +844,7 @@ static void mesh_path_node_reclaim(struct rcu_head *rp) | |||
843 | struct mpath_node *node = container_of(rp, struct mpath_node, rcu); | 844 | struct mpath_node *node = container_of(rp, struct mpath_node, rcu); |
844 | struct ieee80211_sub_if_data *sdata = node->mpath->sdata; | 845 | struct ieee80211_sub_if_data *sdata = node->mpath->sdata; |
845 | 846 | ||
846 | if (node->mpath->timer.function) | 847 | del_timer_sync(&node->mpath->timer); |
847 | del_timer_sync(&node->mpath->timer); | ||
848 | atomic_dec(&sdata->u.mesh.mpaths); | 848 | atomic_dec(&sdata->u.mesh.mpaths); |
849 | kfree(node->mpath); | 849 | kfree(node->mpath); |
850 | kfree(node); | 850 | kfree(node); |
@@ -1046,8 +1046,7 @@ static void mesh_path_node_free(struct hlist_node *p, bool free_leafs) | |||
1046 | mpath = node->mpath; | 1046 | mpath = node->mpath; |
1047 | hlist_del_rcu(p); | 1047 | hlist_del_rcu(p); |
1048 | if (free_leafs) { | 1048 | if (free_leafs) { |
1049 | if (mpath->timer.function) | 1049 | del_timer_sync(&mpath->timer); |
1050 | del_timer_sync(&mpath->timer); | ||
1051 | kfree(mpath); | 1050 | kfree(mpath); |
1052 | } | 1051 | } |
1053 | kfree(node); | 1052 | kfree(node); |
@@ -1094,7 +1093,6 @@ int mesh_pathtbl_init(void) | |||
1094 | tbl_mpp->free_node = &mesh_path_node_free; | 1093 | tbl_mpp->free_node = &mesh_path_node_free; |
1095 | tbl_mpp->copy_node = &mesh_path_node_copy; | 1094 | tbl_mpp->copy_node = &mesh_path_node_copy; |
1096 | tbl_mpp->mean_chain_len = MEAN_CHAIN_LEN; | 1095 | tbl_mpp->mean_chain_len = MEAN_CHAIN_LEN; |
1097 | /* XXX: not needed */ | ||
1098 | tbl_mpp->known_gates = kzalloc(sizeof(struct hlist_head), GFP_ATOMIC); | 1096 | tbl_mpp->known_gates = kzalloc(sizeof(struct hlist_head), GFP_ATOMIC); |
1099 | INIT_HLIST_HEAD(tbl_mpp->known_gates); | 1097 | INIT_HLIST_HEAD(tbl_mpp->known_gates); |
1100 | 1098 | ||