cnss_prealloc: use slab_cache from slab struct to identify mempool id
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
Este cometimento está contido em:

cometido por
Madan Koyyalamudi

ascendente
bd49da5f3e
cometimento
ff372a6f1d
@@ -1,12 +1,15 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* Copyright (c) 2015-2016,2019 The Linux Foundation. All rights reserved. */
|
||||
/*
|
||||
* Copyright (c) 2015-2016,2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _NET_CNSS_PREALLOC_H_
|
||||
#define _NET_CNSS_PREALLOC_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define WCNSS_PRE_ALLOC_GET_THRESHOLD (4*1024)
|
||||
#define WCNSS_PRE_ALLOC_GET_THRESHOLD (8*1024)
|
||||
|
||||
extern void *wcnss_prealloc_get(size_t size);
|
||||
extern int wcnss_prealloc_put(void *ptr);
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador