mwifiex: use del_timer_sync instead of del_timer
PATCH 1/3 mwifiex: use del_timer_sync instead of del_timer
From: Avinash Patil <[email protected]>
Use SMP safe del_timer_sync instead of del_timer for cancelling timers.
Signed-off-by Avinash Patil <[email protected]>
Signed-off-by Bing Zhao <[email protected]>
--- drivers/net/wireless/mwifiex/11n_rxreorder.c | 2 +- drivers/net/wireless/mwifiex/cmdevt.c | 2 +- drivers/net/wireless/mwifiex/init.c | 2 +- drivers/net/wireless/mwifiex/main.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/mwifiex/11n_rxreorder.c +1 -1
@@ -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);
drivers/net/wireless/mwifiex/cmdevt.c +1 -1
@@ -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;
drivers/net/wireless/mwifiex/init.c +1 -1
@@ -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 ; }
drivers/net/wireless/mwifiex/main.c +1 -1
@@ -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++) {
Signature · 1 line
1.8.2.3
PATCH 2/3 mwifiex: remove redundant del_timer
From: Avinash Patil <[email protected]>
While modifying timer, we need not delete timer.
Signed-off-by Avinash Patil <[email protected]>
Signed-off-by Bing Zhao <[email protected]>
--- drivers/net/wireless/mwifiex/11n_rxreorder.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/wireless/mwifiex/11n_rxreorder.c +0 -1
@@ -466,7 +466,6 @@ int mwifiex_11n_rx_reorder_pkt(struct mwifiex_private *priv, start_win = tbl->start_win; win_size = tbl->win_size; end_win = ((start_win + win_size) -1 ) & (MAX_TID_VALUE -1 ); -del_timer (&tbl->timer_context.timer);mod_timer (&tbl->timer_context.timer, jiffies +msecs_to_jiffies (MIN_FLUSH_TIMER_MS * win_size));
Signature · 1 line
1.8.2.3
PATCH 3/3 mwifiex: enable obss scan offload feature flag
In reply to Bing ZhaoFrom: Amitkumar Karwar <[email protected]>
We don't perform OBSS scan internally. As we intend to use corresponding feature in application, we will enable this flag.
Signed-off-by Amitkumar Karwar <[email protected]>
Signed-off-by Bing Zhao <[email protected]>
--- drivers/net/wireless/mwifiex/cfg80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/mwifiex/cfg80211.c +2 -1
@@ -2908,7 +2908,8 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter) wiphy->features |=NL80211_FEATURE_HT_IBSS |NL80211_FEATURE_INACTIVITY_TIMER | -NL80211_FEATURE_LOW_PRIORITY_SCAN ; +NL80211_FEATURE_LOW_PRIORITY_SCAN | +NL80211_FEATURE_NEED_OBSS_SCAN ;/* Reserve space for mwifiex specific private data for BSS */ wiphy->bss_priv_size =sizeof (struct mwifiex_bss_priv );
Signature · 1 line
1.8.2.3