iwlwifi: pcie: store the default rxq number
authorGolan Ben Ami <golan.ben.ami@intel.com>
Sun, 25 Mar 2018 08:28:33 +0000 (11:28 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 31 Aug 2018 08:38:28 +0000 (11:38 +0300)
Store the default rxq number in a variable, so we won't need
to use the actual number in the code.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/internal.h
drivers/net/wireless/intel/iwlwifi/pcie/rx.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c

index 7444218..c03de2b 100644 (file)
@@ -456,6 +456,7 @@ struct iwl_self_init_dram {
  * @ucode_write_complete: indicates that the ucode has been copied.
  * @ucode_write_waitq: wait queue for uCode load
  * @cmd_queue - command queue number
+ * @def_rx_queue - default rx queue number
  * @rx_buf_size: 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
@@ -536,6 +537,7 @@ struct iwl_trans_pcie {
        u8 page_offs, dev_cmd_offs;
 
        u8 cmd_queue;
+       u8 def_rx_queue;
        u8 cmd_fifo;
        unsigned int cmd_q_wdg_timeout;
        u8 n_no_reclaim_cmds;
index acae8f9..8075466 100644 (file)
@@ -1271,7 +1271,7 @@ static void iwl_pcie_rx_handle_rb(struct iwl_trans *trans,
                index = SEQ_TO_INDEX(sequence);
                cmd_index = iwl_pcie_get_cmd_index(txq, index);
 
-               if (rxq->id == 0)
+               if (rxq->id == trans_pcie->def_rx_queue)
                        iwl_op_mode_rx(trans->op_mode, &rxq->napi,
                                       &rxcb);
                else
index 7cc438f..631f001 100644 (file)
@@ -3276,6 +3276,8 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
                                       PCIE_LINK_STATE_CLKPM);
        }
 
+       trans_pcie->def_rx_queue = 0;
+
        if (cfg->use_tfh) {
                addr_size = 64;
                trans_pcie->max_tbs = IWL_TFH_NUM_TBS;