]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iwlwifi: pcie: fix the use of a wrong define
authorSara Sharon <sara.sharon@intel.com>
Fri, 26 Oct 2018 07:01:39 +0000 (10:01 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 29 Jan 2019 14:10:29 +0000 (16:10 +0200)
The code checks that we haven't exceeded the maximum number of
TBs by comparing to a define of gen1 instead of gen2, fix it.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c

index d2bd7f528a205014d5d53f4c5ef9682747dc9ebc..8807ea9d693cab782477a36f679f0e54facda2e3 100644 (file)
@@ -216,7 +216,7 @@ static int iwl_pcie_gen2_set_tb(struct iwl_trans *trans,
        int idx = iwl_pcie_gen2_get_num_tbs(trans, tfd);
        struct iwl_tfh_tb *tb;
 
-       if (WARN_ON(idx >= IWL_NUM_OF_TBS))
+       if (WARN_ON(idx >= IWL_TFH_NUM_TBS))
                return -EINVAL;
        tb = &tfd->tbs[idx];