aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-09-10 04:16:41 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-09-14 05:56:39 -0400
commit3a736bcb18f797996064cf18f4eecc4b3e46d39a (patch)
tree3b79c3cdc0fc5a1fa8a02293e1eb12cdce12e74d
parentf7f89e7baef643788f09d9629012ea1612d827bb (diff)
iwlwifi: trans: don't configure the set_active in SCD for dvm
This configuration is not needed for dvm, and it actually broke it. Reported-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h2
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/ops.c1
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/internal.h2
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/trans.c1
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/tx.c6
5 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index c89985a58803..eb31648d6213 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -377,6 +377,7 @@ enum iwl_trans_status {
377 * if unset 4k will be the RX buffer size 377 * if unset 4k will be the RX buffer size
378 * @bc_table_dword: set to true if the BC table expects the byte count to be 378 * @bc_table_dword: set to true if the BC table expects the byte count to be
379 * in DWORD (as opposed to bytes) 379 * in DWORD (as opposed to bytes)
380 * @scd_set_active: should the transport configure the SCD for HCMD queue
380 * @queue_watchdog_timeout: time (in ms) after which queues 381 * @queue_watchdog_timeout: time (in ms) after which queues
381 * are considered stuck and will trigger device restart 382 * are considered stuck and will trigger device restart
382 * @command_names: array of command names, must be 256 entries 383 * @command_names: array of command names, must be 256 entries
@@ -392,6 +393,7 @@ struct iwl_trans_config {
392 393
393 bool rx_buf_size_8k; 394 bool rx_buf_size_8k;
394 bool bc_table_dword; 395 bool bc_table_dword;
396 bool scd_set_active;
395 unsigned int queue_watchdog_timeout; 397 unsigned int queue_watchdog_timeout;
396 const char *const *command_names; 398 const char *const *command_names;
397}; 399};
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c
index 87f278cc9b2c..5d8c562d1a78 100644
--- a/drivers/net/wireless/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/iwlwifi/mvm/ops.c
@@ -460,6 +460,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
460 460
461 trans_cfg.cmd_queue = IWL_MVM_CMD_QUEUE; 461 trans_cfg.cmd_queue = IWL_MVM_CMD_QUEUE;
462 trans_cfg.cmd_fifo = IWL_MVM_TX_FIFO_CMD; 462 trans_cfg.cmd_fifo = IWL_MVM_TX_FIFO_CMD;
463 trans_cfg.scd_set_active = true;
463 464
464 snprintf(mvm->hw->wiphy->fw_version, 465 snprintf(mvm->hw->wiphy->fw_version,
465 sizeof(mvm->hw->wiphy->fw_version), 466 sizeof(mvm->hw->wiphy->fw_version),
diff --git a/drivers/net/wireless/iwlwifi/pcie/internal.h b/drivers/net/wireless/iwlwifi/pcie/internal.h
index a4fedc4a7448..1aea6b66c594 100644
--- a/drivers/net/wireless/iwlwifi/pcie/internal.h
+++ b/drivers/net/wireless/iwlwifi/pcie/internal.h
@@ -257,6 +257,7 @@ iwl_pcie_get_scratchbuf_dma(struct iwl_txq *txq, int idx)
257 * @cmd_queue - command queue number 257 * @cmd_queue - command queue number
258 * @rx_buf_size_8k: 8 kB RX buffer size 258 * @rx_buf_size_8k: 8 kB RX buffer size
259 * @bc_table_dword: true if the BC table expects DWORD (as opposed to bytes) 259 * @bc_table_dword: true if the BC table expects DWORD (as opposed to bytes)
260 * @scd_set_active: should the transport configure the SCD for HCMD queue
260 * @rx_page_order: page order for receive buffer size 261 * @rx_page_order: page order for receive buffer size
261 * @wd_timeout: queue watchdog timeout (jiffies) 262 * @wd_timeout: queue watchdog timeout (jiffies)
262 * @reg_lock: protect hw register access 263 * @reg_lock: protect hw register access
@@ -306,6 +307,7 @@ struct iwl_trans_pcie {
306 307
307 bool rx_buf_size_8k; 308 bool rx_buf_size_8k;
308 bool bc_table_dword; 309 bool bc_table_dword;
310 bool scd_set_active;
309 u32 rx_page_order; 311 u32 rx_page_order;
310 312
311 const char *const *command_names; 313 const char *const *command_names;
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index 3076e0e9a490..4add964a84f8 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -1171,6 +1171,7 @@ static void iwl_trans_pcie_configure(struct iwl_trans *trans,
1171 1171
1172 trans_pcie->command_names = trans_cfg->command_names; 1172 trans_pcie->command_names = trans_cfg->command_names;
1173 trans_pcie->bc_table_dword = trans_cfg->bc_table_dword; 1173 trans_pcie->bc_table_dword = trans_cfg->bc_table_dword;
1174 trans_pcie->scd_set_active = trans_cfg->scd_set_active;
1174 1175
1175 /* Initialize NAPI here - it should be before registering to mac80211 1176 /* Initialize NAPI here - it should be before registering to mac80211
1176 * in the opmode but after the HW struct is allocated. 1177 * in the opmode but after the HW struct is allocated.
diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c
index a6336b4aa3a4..35fe38e52d2e 100644
--- a/drivers/net/wireless/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/tx.c
@@ -1080,7 +1080,8 @@ void iwl_trans_pcie_txq_enable(struct iwl_trans *trans, int txq_id, u16 ssn,
1080 fifo = cfg->fifo; 1080 fifo = cfg->fifo;
1081 1081
1082 /* Disable the scheduler prior configuring the cmd queue */ 1082 /* Disable the scheduler prior configuring the cmd queue */
1083 if (txq_id == trans_pcie->cmd_queue) 1083 if (txq_id == trans_pcie->cmd_queue &&
1084 trans_pcie->scd_set_active)
1084 iwl_scd_enable_set_active(trans, 0); 1085 iwl_scd_enable_set_active(trans, 0);
1085 1086
1086 /* Stop this Tx queue before configuring it */ 1087 /* Stop this Tx queue before configuring it */
@@ -1142,7 +1143,8 @@ void iwl_trans_pcie_txq_enable(struct iwl_trans *trans, int txq_id, u16 ssn,
1142 SCD_QUEUE_STTS_REG_MSK); 1143 SCD_QUEUE_STTS_REG_MSK);
1143 1144
1144 /* enable the scheduler for this queue (only) */ 1145 /* enable the scheduler for this queue (only) */
1145 if (txq_id == trans_pcie->cmd_queue) 1146 if (txq_id == trans_pcie->cmd_queue &&
1147 trans_pcie->scd_set_active)
1146 iwl_scd_enable_set_active(trans, BIT(txq_id)); 1148 iwl_scd_enable_set_active(trans, BIT(txq_id));
1147 } 1149 }
1148 1150