]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: pcie: don't warn if we use all the transmit pointers
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 27 Dec 2017 06:58:02 +0000 (08:58 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 16 Feb 2018 13:34:32 +0000 (15:34 +0200)
commit404336fd2f629811a7db346e713b459f1c267116
tree5e525a5d67747a3563c4170d7fa1175700aa219c
parente863a8a4d7a9b62de47ae65a737f5422620eebed
iwlwifi: pcie: don't warn if we use all the transmit pointers

Our Transmit Frame Descriptor (TFD) is a DMA descriptor that
includes several pointers to be able to transmit a packet
which is not physically contiguous.

Depending on the hardware being use, we can have 20 or 25
pointers in a single TFD. In both cases, it is more than
enough and it is quite hard to hit this limit.
It has been reported that when using specific applications
(Ktorrent), we can actually use all the pointers and then
a long standing bug showed up.

When we free the TFD, we check its number of valid pointers
and make sure it doesn't exceed the number of pointers the
hardware support.
This check had an off by one bug: it is perfectly valid to
free the 20 pointers if the TFD has 20 pointers.

Fix that.

https://bugzilla.kernel.org/show_bug.cgi?id=197981

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c
drivers/net/wireless/intel/iwlwifi/pcie/tx.c