aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/main.h
diff options
context:
space:
mode:
authorBing Zhao <bzhao@marvell.com>2014-02-27 22:35:12 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-02-28 14:33:40 -0500
commitfa0ecbb9905d985a77e76801ba1153394ba593e8 (patch)
tree65b9a9e5fece3e020b82b14e4cf1479a0eec6372 /drivers/net/wireless/mwifiex/main.h
parent6b7dce12b3e810a107735ab9e701f2be4e75db29 (diff)
mwifiex: remove global variable cmd_wait_q_required
There is a race condition while queuing synchronous command and asynchronous command requested from different threads, because the wait_q_enabled flag is set based on a global variable cmd_wait_q_required. The issue is fixed by removing this global variable and using a unified function with an argument 'sync' passed into the function. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/main.h')
-rw-r--r--drivers/net/wireless/mwifiex/main.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index cb1148f0de69..6c04baa5bcf9 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -779,7 +779,6 @@ struct mwifiex_adapter {
779 struct mwifiex_dbg dbg; 779 struct mwifiex_dbg dbg;
780 u8 arp_filter[ARP_FILTER_MAX_BUF_SIZE]; 780 u8 arp_filter[ARP_FILTER_MAX_BUF_SIZE];
781 u32 arp_filter_size; 781 u32 arp_filter_size;
782 u16 cmd_wait_q_required;
783 struct mwifiex_wait_queue cmd_wait_q; 782 struct mwifiex_wait_queue cmd_wait_q;
784 u8 scan_wait_q_woken; 783 u8 scan_wait_q_woken;
785 spinlock_t queue_lock; /* lock for tx queues */ 784 spinlock_t queue_lock; /* lock for tx queues */
@@ -839,11 +838,8 @@ int mwifiex_process_event(struct mwifiex_adapter *adapter);
839int mwifiex_complete_cmd(struct mwifiex_adapter *adapter, 838int mwifiex_complete_cmd(struct mwifiex_adapter *adapter,
840 struct cmd_ctrl_node *cmd_node); 839 struct cmd_ctrl_node *cmd_node);
841 840
842int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no, 841int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no,
843 u16 cmd_action, u32 cmd_oid, void *data_buf); 842 u16 cmd_action, u32 cmd_oid, void *data_buf, bool sync);
844
845int mwifiex_send_cmd_sync(struct mwifiex_private *priv, uint16_t cmd_no,
846 u16 cmd_action, u32 cmd_oid, void *data_buf);
847 843
848void mwifiex_cmd_timeout_func(unsigned long function_context); 844void mwifiex_cmd_timeout_func(unsigned long function_context);
849 845