iwlwifi: mvm: get rid of tx_path_lock
authorSara Sharon <sara.sharon@intel.com>
Thu, 25 Oct 2018 17:11:51 +0000 (20:11 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 29 Jan 2019 14:10:30 +0000 (16:10 +0200)
commitfba8248e7e67b7e1098e69284aeccbcb2110fa86
treedf2f14d8f0f460e29e6e6eb3c0c4a7af2d579ec3
parent1f7698abedeeb3fef3cbcf78e16f925df675a179
iwlwifi: mvm: get rid of tx_path_lock

TX path lock was introduced in order to prevent out of order
invocations of TX.

This can happen in the following flow:

TX path invoked from net dev
Packet dequeued
TX path invoked from RX path
Packet dequeued
Packet TXed
Packet TXed

However, we don't really need a lock. If TX path is already
invoked from some location, other paths can simply abort their
execution, instead of waiting to the first path to finish, and
then discover queue is (likely) empty or stopped.

Replace the lock with an atomic variable to track TX ownership.
This simplifies the locking dependencies between RX and TX paths,
and should improve performance.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/sta.c