]> asedeno.scripts.mit.edu Git - linux.git/commit
iwlwifi: pcie: use partial pages if applicable
authorJohannes Berg <johannes.berg@intel.com>
Wed, 2 Oct 2019 10:11:54 +0000 (12:11 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Mon, 23 Dec 2019 09:54:31 +0000 (11:54 +0200)
commitcfdc20efebdc1dc918338818b10f1d95b58b2ca5
tree8b1be578cadb71563cd7ca5d9f607c4cbe6bc09a
parent80084e3591390367f56161a48b6818b3a3fd64df
iwlwifi: pcie: use partial pages if applicable

If we have only 2k RBs like on the latest (AX210) hardware, then
even on x86 where PAGE_SIZE is 4k we currently waste half of the
memory.

If this is the case, return partial pages from the allocator and
track the offset in each RBD (to be able to find the data in them
and remap them later.)

This might also address other platforms with larger PAGE_SIZE by
putting more RBs into a single large page.

Signed-off-by: Johannes Berg <johannes.berg@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/rx.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c