]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: cancel the injective function between hw pointers to tfd entry index
authorGolan Ben Ami <golan.ben.ami@intel.com>
Sun, 4 Feb 2018 08:50:05 +0000 (10:50 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 26 Jul 2018 10:16:16 +0000 (13:16 +0300)
commit2d595b21e2f437808e4b649be2a12ede5ae6cfe6
tree331cb11bee0df9001245bec4b28ad0a91fcf616f
parent7ebdb8797a078a038b785e61b90282519d1e0675
iwlwifi: cancel the injective function between hw pointers to tfd entry index

Nowadays, the tfd queue max size is 2^8, and the reserved size in the
command header sequence field for the tfd entry index is 8 bits,
allowing an injective function from the hw pointers to the tfd entry index
in the sequence field.

In 22560 devices the tfd queue max size is 2^16, meaning that
the hw pointers are 16 bit long (allowing to point to each entry
in the tfd queue). However, the reserved space in the sequence field for
the tfd entry doesn't change, and we are limited to 8 bit.
This requires cancelling the injective function from hw pointer to
tfd entry in the sequence number.

Use iwl_pcie_get_cmd_index to wrap the hw pointer's to the n_window
size, which is maximum 256 in tx queues, and so, keep the injective
function between the window wrapped hw pointers to tfd entry index in
the sequence.

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/tx.c