summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell/mwifiex/usb.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-24 12:29:19 +0300
committerKalle Valo <kvalo@codeaurora.org>2017-10-27 10:47:57 +0300
commit08c2eb8ec800b1b5447728af0ffeebf6346bdcf2 (patch)
tree8bfd3fea91cadaa4d9c8d299a3a45af4266fc601 /drivers/net/wireless/marvell/mwifiex/usb.c
parentdfefb9f8d082b609197f7ea852333e7a5ecc9563 (diff)
downloadlinux-08c2eb8ec800b1b5447728af0ffeebf6346bdcf2.tar.xz
mwifiex: 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: Kalle Valo <kvalo@codeaurora.org> Cc: Amitkumar Karwar <amitkarwar@gmail.com> Cc: Nishant Sarmukadam <nishants@marvell.com> Cc: Ganapathi Bhat <gbhat@marvell.com> Cc: Xinming Hu <huxm@marvell.com> Cc: Arvind Yadav <arvind.yadav.cs@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Johannes Berg <johannes.berg@intel.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Andrew Zaborowski <andrew.zaborowski@intel.com> Cc: libertas-dev@lists.infradead.org Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/usb.c')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/usb.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c
index f4f2b9b27e32..4bc244801636 100644
--- a/drivers/net/wireless/marvell/mwifiex/usb.c
+++ b/drivers/net/wireless/marvell/mwifiex/usb.c
@@ -1096,12 +1096,12 @@ postcopy_cur_buf:
return -EINPROGRESS;
}
-static void mwifiex_usb_tx_aggr_tmo(unsigned long context)
+static void mwifiex_usb_tx_aggr_tmo(struct timer_list *t)
{
struct urb_context *urb_cnxt = NULL;
struct sk_buff *skb_send = NULL;
struct tx_aggr_tmr_cnxt *timer_context =
- (struct tx_aggr_tmr_cnxt *)context;
+ from_timer(timer_context, t, hold_timer);
struct mwifiex_adapter *adapter = timer_context->adapter;
struct usb_tx_data_port *port = timer_context->port;
unsigned long flags;
@@ -1236,9 +1236,8 @@ static int mwifiex_usb_tx_init(struct mwifiex_adapter *adapter)
port->tx_aggr.timer_cnxt.port = port;
port->tx_aggr.timer_cnxt.is_hold_timer_set = false;
port->tx_aggr.timer_cnxt.hold_tmo_msecs = 0;
- setup_timer(&port->tx_aggr.timer_cnxt.hold_timer,
- mwifiex_usb_tx_aggr_tmo,
- (unsigned long)&port->tx_aggr.timer_cnxt);
+ timer_setup(&port->tx_aggr.timer_cnxt.hold_timer,
+ mwifiex_usb_tx_aggr_tmo, 0);
}
return 0;