mac80211: Convert timers to use timer_setup()

In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Kees Cook
2017-10-16 16:35:49 -07:00
committed by Johannes Berg
parent 32a72bbd5d
commit 34f11cd329
11 changed files with 50 additions and 59 deletions

View File

@@ -399,8 +399,7 @@ struct mesh_path *mesh_path_new(struct ieee80211_sub_if_data *sdata,
skb_queue_head_init(&new_mpath->frame_queue);
new_mpath->exp_time = jiffies;
spin_lock_init(&new_mpath->state_lock);
setup_timer(&new_mpath->timer, mesh_path_timer,
(unsigned long) new_mpath);
timer_setup(&new_mpath->timer, mesh_path_timer, 0);
return new_mpath;
}