iwlwifi: trans: don't configure the set_active in SCD for dvm
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 10 Sep 2014 08:16:41 +0000 (11:16 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 14 Sep 2014 09:56:39 +0000 (12:56 +0300)
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>
drivers/net/wireless/iwlwifi/iwl-trans.h
drivers/net/wireless/iwlwifi/mvm/ops.c
drivers/net/wireless/iwlwifi/pcie/internal.h
drivers/net/wireless/iwlwifi/pcie/trans.c
drivers/net/wireless/iwlwifi/pcie/tx.c

index c89985a58803cb6aa33f55c89c91b32f63acf4a7..eb31648d6213d20f4617fd3acb9cd601fbb0af53 100644 (file)
@@ -377,6 +377,7 @@ enum iwl_trans_status {
  *     if unset 4k will be the RX buffer size
  * @bc_table_dword: set to true if the BC table expects the byte count to be
  *     in DWORD (as opposed to bytes)
+ * @scd_set_active: should the transport configure the SCD for HCMD queue
  * @queue_watchdog_timeout: time (in ms) after which queues
  *     are considered stuck and will trigger device restart
  * @command_names: array of command names, must be 256 entries
@@ -392,6 +393,7 @@ struct iwl_trans_config {
 
        bool rx_buf_size_8k;
        bool bc_table_dword;
+       bool scd_set_active;
        unsigned int queue_watchdog_timeout;
        const char *const *command_names;
 };
index 87f278cc9b2c74655ba9d71c14dc9894f9396662..5d8c562d1a7877c305f91ec17d4a844d0c8f965e 100644 (file)
@@ -460,6 +460,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
 
        trans_cfg.cmd_queue = IWL_MVM_CMD_QUEUE;
        trans_cfg.cmd_fifo = IWL_MVM_TX_FIFO_CMD;
+       trans_cfg.scd_set_active = true;
 
        snprintf(mvm->hw->wiphy->fw_version,
                 sizeof(mvm->hw->wiphy->fw_version),
index a4fedc4a74482291664ea1921df891f90ab417bf..1aea6b66c594f20be0457c04a524e9db00fe8a7b 100644 (file)
@@ -257,6 +257,7 @@ iwl_pcie_get_scratchbuf_dma(struct iwl_txq *txq, int idx)
  * @cmd_queue - command queue number
  * @rx_buf_size_8k: 8 kB RX buffer size
  * @bc_table_dword: true if the BC table expects DWORD (as opposed to bytes)
+ * @scd_set_active: should the transport configure the SCD for HCMD queue
  * @rx_page_order: page order for receive buffer size
  * @wd_timeout: queue watchdog timeout (jiffies)
  * @reg_lock: protect hw register access
@@ -306,6 +307,7 @@ struct iwl_trans_pcie {
 
        bool rx_buf_size_8k;
        bool bc_table_dword;
+       bool scd_set_active;
        u32 rx_page_order;
 
        const char *const *command_names;
index 3076e0e9a490029296eeeaf34d853017a2915baf..4add964a84f8e16c9da66c634dacebc48c484ebd 100644 (file)
@@ -1171,6 +1171,7 @@ static void iwl_trans_pcie_configure(struct iwl_trans *trans,
 
        trans_pcie->command_names = trans_cfg->command_names;
        trans_pcie->bc_table_dword = trans_cfg->bc_table_dword;
+       trans_pcie->scd_set_active = trans_cfg->scd_set_active;
 
        /* Initialize NAPI here - it should be before registering to mac80211
         * in the opmode but after the HW struct is allocated.
index a6336b4aa3a42f54ecc577b4c140e4adcad9290b..35fe38e52d2e53daf5bf5e260a057b9d9be08c82 100644 (file)
@@ -1080,7 +1080,8 @@ void iwl_trans_pcie_txq_enable(struct iwl_trans *trans, int txq_id, u16 ssn,
                fifo = cfg->fifo;
 
                /* Disable the scheduler prior configuring the cmd queue */
-               if (txq_id == trans_pcie->cmd_queue)
+               if (txq_id == trans_pcie->cmd_queue &&
+                   trans_pcie->scd_set_active)
                        iwl_scd_enable_set_active(trans, 0);
 
                /* 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,
                               SCD_QUEUE_STTS_REG_MSK);
 
                /* enable the scheduler for this queue (only) */
-               if (txq_id == trans_pcie->cmd_queue)
+               if (txq_id == trans_pcie->cmd_queue &&
+                   trans_pcie->scd_set_active)
                        iwl_scd_enable_set_active(trans, BIT(txq_id));
        }