summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach2017-03-30 22:08:03 +0200
committerLuca Coelho2017-06-22 23:12:59 +0200
commit6f2f019495f637375b6d9dbbfa164b5b1e9d5583 (patch)
tree0fdb45c5659479b0bde422e141dfdfc546b592d8 /drivers/net/wireless/intel/iwlwifi/mvm/sta.c
parentiwlwifi: mvm: Enable security on new TX API (diff)
downloadkernel-qcow2-linux-6f2f019495f637375b6d9dbbfa164b5b1e9d5583.tar.gz
kernel-qcow2-linux-6f2f019495f637375b6d9dbbfa164b5b1e9d5583.tar.xz
kernel-qcow2-linux-6f2f019495f637375b6d9dbbfa164b5b1e9d5583.zip
iwlwifi: mvm: avoid unnecessary cache trashing in Tx path
When sending a Tx Command with a Tx packet, we allocate the Tx command separately from the payload of the packet. The WiFi MAC header is then copied into the buffer that was allocated for the Tx Command. This means that this buffer needs to be big enough to contain both. This is why it is allocated with iwl_trans_alloc_tx_cmd which returns a pointer to a newly allocated not zeroed struct iwl_device_cmd. The Tx command has a few bit fields and hence it needs to be zeroed, but all the rest of the buffer doesn't need to be zeroed since it will either be memcopy'ed with the MAC header, or not even sent to the device. This means that we don't need to zero all the iwl_device_cmd structure, but rather only the size of the iwl_tx_cmd structure. Since sizeof(iwl_tx_cmd) - sizeof(iwl_tx_cmd) is about 260 bytes, this can avoid touching 4 cache lines for each packet. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/sta.c')
0 files changed, 0 insertions, 0 deletions