diff options
author | Ondřej Lysoněk <ondrej.lysonek@seznam.cz> | 2017-03-09 10:34:36 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-03-16 10:54:04 +0100 |
commit | 5c19dfbe964f4bbb38c1868b851adf4855fc93ff (patch) | |
tree | be46e1521ef51cdadee19013daf6bdbd2fcb65b8 | |
parent | mac80211: reject/clear user rate mask if not usable (diff) | |
download | linux-5c19dfbe964f4bbb38c1868b851adf4855fc93ff.tar.xz linux-5c19dfbe964f4bbb38c1868b851adf4855fc93ff.zip |
mac80211: Use setup_timer instead of init_timer for mesh path
Use setup_timer() and setup_deferrable_timer() to set the data and
function timer fields. It makes the code cleaner and will allow for
easier change of the timer struct internals.
Signed-off-by: Ondřej Lysoněk <ondrej.lysonek@seznam.cz>
Cc: Jiri Slaby <jslaby@suse.cz>
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: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/mac80211/mesh_pathtbl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 98a3b1c0c338..97269caafecd 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -397,11 +397,10 @@ struct mesh_path *mesh_path_new(struct ieee80211_sub_if_data *sdata, new_mpath->sdata = sdata; new_mpath->flags = 0; skb_queue_head_init(&new_mpath->frame_queue); - new_mpath->timer.data = (unsigned long) new_mpath; - new_mpath->timer.function = mesh_path_timer; new_mpath->exp_time = jiffies; spin_lock_init(&new_mpath->state_lock); - init_timer(&new_mpath->timer); + setup_timer(&new_mpath->timer, mesh_path_timer, + (unsigned long) new_mpath); return new_mpath; } |