aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
diff options
context:
space:
mode:
authorShaul Triebitz <shaul.triebitz@intel.com>2018-01-28 18:27:52 +0200
committerLuca Coelho <luciano.coelho@intel.com>2018-04-20 10:57:16 +0300
commit3506832b098850a8aafee19512e79c33debab380 (patch)
tree3eb19bf58e08a050dee1bd0f1a18d734cc896daa /drivers/net/wireless/intel/iwlwifi/mvm/utils.c
parent8f66e064c9db418c6c3037aa2c217dc7b18f3276 (diff)
downloadlinux-3506832b098850a8aafee19512e79c33debab380.tar.gz
linux-3506832b098850a8aafee19512e79c33debab380.tar.bz2
linux-3506832b098850a8aafee19512e79c33debab380.zip
iwlwifi: pcie: gen2: fix race in cmd fifo write ptr
Avoid a race where two (or more) commands get the same index: 1. T1 calls enqueue_hcmd and the local TFD index is assigned to txq->write_ptr; 2. Context switch 'before incrementing txq->write_ptr'; 3. T2 calls enqueue_hcmd and the local TFD index is assigned to txq->write_ptr; 4. Now the index is set to the same value for both commands of T1 and T2. To prevent this from happening, set the local TFD index inside the critical section (the index is set by global txq write pointer). Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/utils.c')
0 files changed, 0 insertions, 0 deletions