Commit graph

20 Commits

Autor SHA1 Nachricht Datum
Sandeep Singh
02e22639bc icnss2: enable icnss2 compilation for volcano
Enable icnss2 compilation and bazel related configs
for volcano.

Change-Id: Iff95b1983f323c76651564a94a35618781966ec6
CRs-Fixed: 3684107
2023-12-26 10:35:07 -08:00
Sandeep Singh
b33774b0e9 icnss2: add bazel config files for pitti
Add bazel config files for pitti.

Change-Id: I53571d0408aa53b9ac9ed7c55297a52c214d3c8d
CRs-Fixed: 3681289
2023-12-14 01:36:50 -08:00
Dundi Raviteja
920df40d31 icnss2: Add bazel configs for monaco
Add bazel config files for monaco compilation.

Change-Id: Ib16ae673065849b941c52ec1cb26114fa71edfe5
CRs-Fixed: 3650989
2023-11-13 15:45:54 -08:00
Sai Kumar Kunchala
d0fbd9bae5 cnss2: enable cnss2 for Niobe target
- Add defconfigs for consoilidated and GKI variants.
 - Add Niobe target to wlan bazel config.

Change-Id: Id6f57de324bf1c89a521236373cdbc61e453b492
CRs-Fixed: 3614358
2023-09-20 20:10:50 -07:00
Mohammed Ahmed
e144f654b8 cnss2: Add config files for sun compilation
Current code does not contain config files
required for sun compilation. Fix this
by adding sun config files.

Change-Id: I130e6d9f16e36335a0acc52f98715cab622ef8b4
CRs-Fixed: 3603141
2023-09-14 15:14:48 -07:00
Sandeep Singh
87ee900083 icnss2: add blair config files to enable bazel compilation
Add blair config files to enable bazel compilation.

Change-Id: If22e082f51a53f359d760f70bde6d89189e12271
CRs-Fixed: 3578579
2023-08-03 16:28:08 -07:00
Alan Chen
2ec2768bfc cnss2: Make changes to support WLAN DDK for all modules
To be in line with upstream changes on bazel, create separate defconfig
files for each module instead.

Change-Id: Ic2c24f8d8c207b51a0a5b4b9d1088601bc91765c
CRs-Fixed: 3539620
2023-06-30 15:26:33 -07:00
Sandeep Singh
afc7a80790 cnss_prealloc: check cnss_pools before returning memory
Check cnss_pools before returning memory to wlan
host driver.

Change-Id: I44e2a34b3c232e08e7e1d4bdb567cd4de09f3eb1
CRs-Fixed: 3506939
2023-05-23 16:04:31 +05:30
Naman Padhiar
6506428355 cnss_prealloc: Update memory pool table for WCN6750
The memory pool table decides number of reserved pools
needs to be preallocated during initialization. Update
the table for WCN6750.

Change-Id: I8679c574977026c9bb894e40384b74110d2c8ebd
CRs-Fixed: 3493255
2023-05-13 19:27:51 -07:00
Jeff Johnson
4ae0fef4d3 cnss2: Support the Bazel DDK
Android builds are transitioning to using Bazel for builds, and there
is a Driver Development Kit (DDK) which out-of-tree drivers must use
in this new scheme. Introduce the infrastructure to describe the wlan
platform driver modules using the DDK.

Change-Id: Ied2aae354aaea8a038461f6c74f26fe4f362a05a
CRs-Fixed: 3449426
2023-05-11 13:09:21 -07:00
Sandeep Singh
32e1756a19 cnss_prealloc: clean up prealloc mempool and cache on deinit
Cnss prealloc is trying to allocate memory from mempool
for wlan host driver even after cnss prealloc pool has been
destroyed by platform driver because mempool and cache is
not cleaned up on cnss pool deinit. Clean up mempool and
cache on prealloc deinit.

Change-Id: If28a27f5a21441e8650bb846ded889a33580ceaf
CRs-Fixed: 3488178
2023-05-08 12:15:19 -07:00
Sandeep Singh
97303bf330 cnss_prealloc: update prealloc mem pool based on device type
Update prealloc mem pool based on device type.

Change-Id: Ic7fc2145a0039aa55643672b8e125857c096a3ee
CRs-Fixed: 3459351
2023-04-25 23:46:44 -07:00
Rajesh Chauhan
ff372a6f1d 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
2023-04-10 10:37:41 -07:00
Yu Wang
44ad9ad95f cnss_prealloc: Add null pointer check before accessing memory pool
Pointer for memory pool may be null if it fails to
create memory pool in cnss_pool_init().
Add null pointer check before accessing memory pool.

Change-Id: I8ae2b6a5193cffdcba3990b238178a1b93297925
CRs-Fixed: 3332360
2022-11-10 07:26:47 -08:00
Alan Chen
e3b36fcd46 cnss_prealloc: Update preallocation pool entries
Update pre allocation pool entries as below:

8kb: 22 -> 16
16kb: 16 -> 16
32kb: 6 -> 22
64kb: 8 -> 38
128kb: 2 -> 10

Change-Id: I2ba69d7332447229f0ad2907dd380f663a8a3fd8
CRs-Fixed: 3306034
2022-10-25 00:22:10 -07:00
Rajesh Chauhan
48cfe543c6 cnss_prealloc: add new functions to store cache at beginning of memory
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
derives slab_cache from virtual memory via page struct to identify
prealloc pool id to put memory buffer back into the pool.

In kernel 5.17, slab_cache is removed from the page struct. Add new
functions to store cache at the beginning of allocated buffer and
when wlan driver requests to free the memory then use that cache to
identify CNSS prealloc pool to put back memory.

Change-Id: I6b3a54d3f502d977c6a61cfa6aeae597df9c8e72
CRs-Fixed: 3309289
2022-10-17 21:23:29 -07:00
Yu Wang
a5a88a8d75 cnss_prealloc: replace in_atomic() with proper API
According to kernel comment for in_atomic(), it's
incorrect to use it outside core kernel code.
To follow this rule, replace
(irqs_disabled() || in_atomic()) with (!preemptible())
when getting GFP flags.

Change-Id: I7cdb28a7f12ffd60216c7bc1921a277de6113cb5
CRs-Fixed: 3273779
2022-08-26 12:28:06 -07:00
Yu Wang
728b08d683 cnss_prealloc: fix GFP flag for mempool_alloc
As per implementation of might_sleep(), rcu_read_lock()
nesting depth should be take into consideration too to
figure out whether sleeping is allowable or not.
To make align with it, allocate memory with GFP_ATOMIC
if rcu_read_lock() nesting depth is not zero.

Change-Id: Ib225a33b1a3f37b919e41daf064ce2de44428973
CRs-Fixed: 3271651
2022-08-22 04:51:13 -07:00
Yue Ma
7e3754303f wlan_platform: Add CONFIG_CNSS_OUT_OF_TREE flag
Use CONFIG_CNSS_OUT_OF_TREE to control if CNSS family drivers are
built from in-kernel-tree source or out-of-kernel-tree source since
the exposed header files will be in different paths. This is also
for backward compatibility.

Change-Id: I24111fdb76607bf911c29e415d42d25609f9b26c
2021-10-08 15:31:58 -07:00
Yue Ma
5b29459b17 wlan_platform: Bring initial files for CNSS family drivers
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
2021-10-08 15:28:40 -07:00