aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-dev.h1
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-hcmd.c4
-rw-r--r--drivers/net/wireless/iwlegacy/iwl3945-base.c1
-rw-r--r--drivers/net/wireless/iwlegacy/iwl4965-base.c1
4 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-dev.h b/drivers/net/wireless/iwlegacy/iwl-dev.h
index df19d5c69e7f..2d87dba2cfa3 100644
--- a/drivers/net/wireless/iwlegacy/iwl-dev.h
+++ b/drivers/net/wireless/iwlegacy/iwl-dev.h
@@ -1077,7 +1077,6 @@ struct iwl_priv {
1077 spinlock_t hcmd_lock; /* protect hcmd */ 1077 spinlock_t hcmd_lock; /* protect hcmd */
1078 spinlock_t reg_lock; /* protect hw register access */ 1078 spinlock_t reg_lock; /* protect hw register access */
1079 struct mutex mutex; 1079 struct mutex mutex;
1080 struct mutex sync_cmd_mutex; /* enable serialization of sync commands */
1081 1080
1082 /* basic pci-network driver stuff */ 1081 /* basic pci-network driver stuff */
1083 struct pci_dev *pci_dev; 1082 struct pci_dev *pci_dev;
diff --git a/drivers/net/wireless/iwlegacy/iwl-hcmd.c b/drivers/net/wireless/iwlegacy/iwl-hcmd.c
index 9d721cbda5bb..62b4b09122cb 100644
--- a/drivers/net/wireless/iwlegacy/iwl-hcmd.c
+++ b/drivers/net/wireless/iwlegacy/iwl-hcmd.c
@@ -145,6 +145,8 @@ int iwl_legacy_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
145 int cmd_idx; 145 int cmd_idx;
146 int ret; 146 int ret;
147 147
148 lockdep_assert_held(&priv->mutex);
149
148 BUG_ON(cmd->flags & CMD_ASYNC); 150 BUG_ON(cmd->flags & CMD_ASYNC);
149 151
150 /* A synchronous command can not have a callback set. */ 152 /* A synchronous command can not have a callback set. */
@@ -152,7 +154,6 @@ int iwl_legacy_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
152 154
153 IWL_DEBUG_INFO(priv, "Attempting to send sync command %s\n", 155 IWL_DEBUG_INFO(priv, "Attempting to send sync command %s\n",
154 iwl_legacy_get_cmd_string(cmd->id)); 156 iwl_legacy_get_cmd_string(cmd->id));
155 mutex_lock(&priv->sync_cmd_mutex);
156 157
157 set_bit(STATUS_HCMD_ACTIVE, &priv->status); 158 set_bit(STATUS_HCMD_ACTIVE, &priv->status);
158 IWL_DEBUG_INFO(priv, "Setting HCMD_ACTIVE for command %s\n", 159 IWL_DEBUG_INFO(priv, "Setting HCMD_ACTIVE for command %s\n",
@@ -224,7 +225,6 @@ fail:
224 cmd->reply_page = 0; 225 cmd->reply_page = 0;
225 } 226 }
226out: 227out:
227 mutex_unlock(&priv->sync_cmd_mutex);
228 return ret; 228 return ret;
229} 229}
230EXPORT_SYMBOL(iwl_legacy_send_cmd_sync); 230EXPORT_SYMBOL(iwl_legacy_send_cmd_sync);
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c
index 5bdcc36f543f..0ee6be6a9c5d 100644
--- a/drivers/net/wireless/iwlegacy/iwl3945-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c
@@ -3815,7 +3815,6 @@ static int iwl3945_init_drv(struct iwl_priv *priv)
3815 INIT_LIST_HEAD(&priv->free_frames); 3815 INIT_LIST_HEAD(&priv->free_frames);
3816 3816
3817 mutex_init(&priv->mutex); 3817 mutex_init(&priv->mutex);
3818 mutex_init(&priv->sync_cmd_mutex);
3819 3818
3820 priv->ieee_channels = NULL; 3819 priv->ieee_channels = NULL;
3821 priv->ieee_rates = NULL; 3820 priv->ieee_rates = NULL;
diff --git a/drivers/net/wireless/iwlegacy/iwl4965-base.c b/drivers/net/wireless/iwlegacy/iwl4965-base.c
index 55851ac3add9..f781b7e225b4 100644
--- a/drivers/net/wireless/iwlegacy/iwl4965-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c
@@ -3124,7 +3124,6 @@ static int iwl4965_init_drv(struct iwl_priv *priv)
3124 INIT_LIST_HEAD(&priv->free_frames); 3124 INIT_LIST_HEAD(&priv->free_frames);
3125 3125
3126 mutex_init(&priv->mutex); 3126 mutex_init(&priv->mutex);
3127 mutex_init(&priv->sync_cmd_mutex);
3128 3127
3129 priv->ieee_channels = NULL; 3128 priv->ieee_channels = NULL;
3130 priv->ieee_rates = NULL; 3129 priv->ieee_rates = NULL;