mwifiex: use del_timer_sync instead of del_timer
authorAvinash Patil <patila@marvell.com>
Tue, 18 Feb 2014 23:47:55 +0000 (15:47 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 24 Feb 2014 20:21:54 +0000 (15:21 -0500)
Use SMP safe del_timer_sync instead of del_timer for cancelling
timers.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/11n_rxreorder.c
drivers/net/wireless/mwifiex/cmdevt.c
drivers/net/wireless/mwifiex/init.c
drivers/net/wireless/mwifiex/main.c

index b361257fb65e7d358bf53ae25b7a8401c41dead6..1cfdbfe2b59f91f857ffc33acf542342f10d5472 100644 (file)
@@ -142,7 +142,7 @@ mwifiex_del_rx_reorder_entry(struct mwifiex_private *priv,
        mwifiex_11n_dispatch_pkt(priv, tbl, (tbl->start_win + tbl->win_size) &
                                            (MAX_TID_VALUE - 1));
 
-       del_timer(&tbl->timer_context.timer);
+       del_timer_sync(&tbl->timer_context.timer);
 
        spin_lock_irqsave(&priv->rx_reorder_tbl_lock, flags);
        list_del(&tbl->list);
index 21544602043cd11d346ce0f5bc4dc5c4252bea6b..f4faeaf322be0f9e79862c6c2aae4cce8331a49a 100644 (file)
@@ -786,7 +786,7 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter)
        unsigned long flags;
 
        /* Now we got response from FW, cancel the command timer */
-       del_timer(&adapter->cmd_timer);
+       del_timer_sync(&adapter->cmd_timer);
 
        if (!adapter->curr_cmd || !adapter->curr_cmd->resp_skb) {
                resp = (struct host_cmd_ds_command *) adapter->upld_buf;
index a4cd2cb066edf96ee2e57b006ad25e205535891f..759492817aeb36f1699de1340ac4267f99f62f3f 100644 (file)
@@ -620,7 +620,7 @@ mwifiex_shutdown_drv(struct mwifiex_adapter *adapter)
        /* cancel current command */
        if (adapter->curr_cmd) {
                dev_warn(adapter->dev, "curr_cmd is still in processing\n");
-               del_timer(&adapter->cmd_timer);
+               del_timer_sync(&adapter->cmd_timer);
                mwifiex_recycle_cmd_node(adapter, adapter->curr_cmd);
                adapter->curr_cmd = NULL;
        }
index 4d79761b9c87e3121dee2c61151d54a5d5002cbe..f87ce28a80600feee50be98249c5d5263df4bbcd 100644 (file)
@@ -194,7 +194,7 @@ static int mwifiex_unregister(struct mwifiex_adapter *adapter)
        if (adapter->if_ops.cleanup_if)
                adapter->if_ops.cleanup_if(adapter);
 
-       del_timer(&adapter->cmd_timer);
+       del_timer_sync(&adapter->cmd_timer);
 
        /* Free private structures */
        for (i = 0; i < adapter->priv_num; i++) {