iwlwifi: pcie: fix the set of DMA memory mask
authorSara Sharon <sara.sharon@intel.com>
Wed, 7 Dec 2016 10:22:11 +0000 (12:22 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Mon, 6 Feb 2017 17:19:23 +0000 (19:19 +0200)
Our 9000 device supports 64 bit DMA address for RX only, and
not for TX.
Setting DMA mask to 64 for the whole device is erroneous - we
can do it only for a000 devices where device is capable of
both RX & TX DMA with 64 bit address space.

Fixes: 96a6497bc3ed ("iwlwifi: pcie: add 9000 series multi queue rx DMA support")
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/trans.c

index c1d99d15796d205f0e8abdf4314d678064111723..b28d99f61a3581cc36a010abc64288eafe9dddfd 100644 (file)
@@ -2953,16 +2953,12 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
                                       PCIE_LINK_STATE_CLKPM);
        }
 
-       if (cfg->mq_rx_supported)
-               addr_size = 64;
-       else
-               addr_size = 36;
-
        if (cfg->use_tfh) {
+               addr_size = 64;
                trans_pcie->max_tbs = IWL_TFH_NUM_TBS;
                trans_pcie->tfd_size = sizeof(struct iwl_tfh_tfd);
-
        } else {
+               addr_size = 36;
                trans_pcie->max_tbs = IWL_NUM_OF_TBS;
                trans_pcie->tfd_size = sizeof(struct iwl_tfd);
        }