CNSS prealloc maintains various prealloc pools of 8Kb, 16Kb, 32Kb
and so on, and allocates buffer from the pool for wlan driver. When
wlan driver requests to free the memory buffer then CNSS prealloc
needs to first find out mempool id from which this buffer was allocated.
Use slab_cache from slab struct to identify memory pool id. Until
kernel 5.16, slab_cache was part of page struct but in kernel 5.17,
slab_cache is moved out to mm/slab.h file.
Also change WCNSS_PRE_ALLOC_GET_THRESHOLD to 8Kb to match with
cnss_pool_alloc_threshold.
Change-Id: I4e34d8f0b855c210cc9af30c1f4a0d6c7e43ab00
CRs-Fixed: 3414037
Bring CNSS family drivers from msm-5.10 kernel as of commit
cc3bc4b888af (cnss2: Fix a few switch statement fallthrough
issues) to WLAN platform project. Fix SPDX-License format for
a few files as well.
drivers/net/wireless/cnss* -> .
include/net/cnss* -> inc/
Above shows how directories and header files are relocated.
Change-Id: If8fd40a35c9fdbeb1aa76a8aac5fdb1fc1c7e786