History log of /wlan-dirver/qca-wifi-host-cmn/qdf/linux/src/qdf_mem.c (Results 1 – 25 of 116)
Revision Date Author Comments
# 4cadebf0 15-Aug-2023 Nijun Gong <quic_ngong@quicinc.com>

qcacmn: try to allocate contiguous dma buffer

For some target like ROME, CE try to read more data than expected as
prefetch. For example in UDP TX case, when CE read a tx_desc(44 bytes)
located in h

qcacmn: try to allocate contiguous dma buffer

For some target like ROME, CE try to read more data than expected as
prefetch. For example in UDP TX case, when CE read a tx_desc(44 bytes)
located in host memory with SMMU mapped address 0x1025FFD4~0x1025FFFF,
SMMU will detect CE read beyond 0x1025FFFF to access 0x10260000. SMMU
fault will happen if 0x10260000 is not mapped to host memory.

To fix this issue, allocate contiguous dma buffer for all 1056 tx_descs,
which will map to contiguous SMMU address region.

CRs-Fixed: 3588459
Change-Id: Id0287b051f792f18d746baf39e1c66d076c9be3c

show more ...


# dcc5bcfd 20-Feb-2023 Zhiwei Yang <quic_zhiwyang@quicinc.com>

qcacmn: Avoid using small buffer address

On some third-party platforms, we observe the memory physical
address below 0x2000 is allocated will cause HW/FW NOC error,
so this region memory should not

qcacmn: Avoid using small buffer address

On some third-party platforms, we observe the memory physical
address below 0x2000 is allocated will cause HW/FW NOC error,
so this region memory should not use by host.

This change will hold the memory if the allocated memory physical
address below 0x2000 until driver unload.

Change-Id: I37b6abc98033230dc4f572dafb849101497f6e93
CRs-Fixed: 3419648

show more ...


# ef4db990 24-Apr-2023 Naveen Gurujala <quic_gnaveen@quicinc.com>

Revert "qcacmn: Avoid using small buffer address"

This reverts Change-Id: I9d5df20cbdf23c230d7c910cce9b9489dd9dd614

Change-Id: I2ce7c3cacc3fec007e511a9e3d15aed89173fbd9
CRs-Fixed: 3419648


# f52c8b1f 20-Feb-2023 Zhiwei Yang <quic_zhiwyang@quicinc.com>

qcacmn: Avoid using small buffer address

On some third-party platforms, we observe the memory physical
address below 0x2000 is allocated will cause HW/FW NOC error,
so this region memory should not

qcacmn: Avoid using small buffer address

On some third-party platforms, we observe the memory physical
address below 0x2000 is allocated will cause HW/FW NOC error,
so this region memory should not use by host.

This change will hold the memory if the allocated memory physical
address below 0x2000 until driver unload.

Change-Id: I9d5df20cbdf23c230d7c910cce9b9489dd9dd614
CRs-Fixed: 3419648

show more ...


# d7d85dfa 06-Apr-2023 Rajesh Chauhan <quic_rajeshc@quicinc.com>

Revert "qcacmn: modify QDF functions for memory allocation and free"

This reverts Change-Id: I2c19b72b82092d553d474a50385ed3095a0fab39
since it results in increased memory allocation due to 8 bytes

Revert "qcacmn: modify QDF functions for memory allocation and free"

This reverts Change-Id: I2c19b72b82092d553d474a50385ed3095a0fab39
since it results in increased memory allocation due to 8 bytes of
headroom at the beginning of buffer, particularly for data path modules
when size is at the edge of the page boundary.

Change-Id: I72fd7e63b93f2646812acc09e817e3be531f27d8
CRs-Fixed: 3458603

show more ...


# 1e4a1adb 13-Feb-2023 Jeff Johnson <quic_jjohnson@quicinc.com>

qcacmn: Fix QDF memory documentation

The kernel-doc script identified a large number of documentation
issues in the QDF memory abstractions, so fix those issues. In addition,
there are a number of i

qcacmn: Fix QDF memory documentation

The kernel-doc script identified a large number of documentation
issues in the QDF memory abstractions, so fix those issues. In addition,
there are a number of instances where public functions have their
implementation documented instead of having their interface
documented, so move that documentation.

Change-Id: I4e30fd85e65567485cdc7a9adfc38c69df0cfa55
CRs-Fixed: 3406199

show more ...


# fd6fed3e 03-Jan-2023 Pavankumar Nandeshwar <quic_pnandesh@quicinc.com>

qcacmn: Cleanup the tx desc cleanup logic

Cleanup the tx desc clean up logic used in
direct switch and umac reset cases.
The excess code being removed tries to
get the next descriptor address in bou

qcacmn: Cleanup the tx desc cleanup logic

Cleanup the tx desc clean up logic used in
direct switch and umac reset cases.
The excess code being removed tries to
get the next descriptor address in boundary
conditions is not useful, as the descriptor
extracted this way will be overwritten
immediately in the beginning of next iteration
of the loop.

Change-Id: Ibcd873719929b94147152ff48205774d3ed4f452
CRs-Fixed: 3371831

show more ...


# ba6c61a4 19-Dec-2022 Tiger Yu <quic_tfyu@quicinc.com>

qcacmn: Remove the export symbol for static variable and function

Fix the compiling issue by removing the export symbol for static
qdf_timer_clean and mem_debug_disabled.

Change-Id: I01f886e04af2f2

qcacmn: Remove the export symbol for static variable and function

Fix the compiling issue by removing the export symbol for static
qdf_timer_clean and mem_debug_disabled.

Change-Id: I01f886e04af2f294ed9cb93afdbb69d7d8b9f2ee
CRs-Fixed: 3363506

show more ...


# d1ff8e1e 15-Oct-2022 Pavankumar Nandeshwar <quic_pnandesh@quicinc.com>

qcacmn: Enable tx descpool clean up logic for ppe ds

Enable tx descpool clean up involving buffers cleanup
for ppe ds feature.

Change-Id: Iedefd312b58266e7a21978931838264518bc3d1e
CRs-Fixed: 3313738


# 391d9203 13-Oct-2022 Rajesh Chauhan <quic_rajeshc@quicinc.com>

qcacmn: modify QDF functions for memory allocation and free

CNSS prealloc maintains various prealloc pools of 8Kb, 16Kb, 32Kb
and so on, and allocates buffer from the pool for wlan driver. When
wlan

qcacmn: modify QDF functions for memory allocation and free

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. Modify
QDF functions to add headroom at the beginning of allocated buffer
to store cache pointer. CNSS prealloc will store cache pointer in
this headroom during allocation and later use it in identifying
prealloc pool id to put back the buffer.

Change-Id: I2c19b72b82092d553d474a50385ed3095a0fab39
CRs-Fixed: 3312550

show more ...


# 3bdf954a 27-Aug-2022 Jeff Johnson <quic_jjohnson@quicinc.com>

qcacmn: qdf: Fix misspellings

Fix misspellings in qdf/...

Change-Id: If61ee47fba94b2bb60f33ab74feda56dbe5cb7bd
CRs-Fixed: 3277902


# 8983dd04 29-Aug-2022 Amir Patel <quic_amirpate@quicinc.com>

qcacmn: Add QDF Kmem cache support

Introduce QDF abstraction APIs for handling kmem cache
create/destroy/alloc/free

Change-Id: I46fa8e5e3891a3665fb230b737ef66ff65b5135e
CRs-Fixed: 3274919


# 17794aa9 18-Aug-2022 Sreeramya Soratkal <quic_ssramya@quicinc.com>

qcacmn: Remove unused variables in qdf memory component

Remove unused local variables in the qdf memory component
to address the compiler warnings.

CRs-Fixed: 3272720
Change-Id: I9b784a43897003f374

qcacmn: Remove unused variables in qdf memory component

Remove unused local variables in the qdf memory component
to address the compiler warnings.

CRs-Fixed: 3272720
Change-Id: I9b784a43897003f374239ed2f27e0bb8e0ce4c93

show more ...


# c520d7fe 18-Aug-2022 Yu Wang <quic_yyuwang@quicinc.com>

qcacmn: fix GFP flag for memory allocation

As per implementation of might_sleep(), rcu_read_lock()
nesting depth should be taken into consideration too to
figure out whether sleeping is allowable or

qcacmn: fix GFP flag for memory allocation

As per implementation of might_sleep(), rcu_read_lock()
nesting depth should be taken 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: I83c042827db4024cedf4f043a4243e399a33f6e5
CRs-Fixed: 3272683

show more ...


# d9709af8 18-Apr-2022 Pavankumar Nandeshwar <quic_pnandesh@quicinc.com>

qcacmn: Add API to clean up tx desc pool

Add an API to clean up tx dec pool in case of
umac reset.

Change-Id: I99fe11bcd07471f5aafefbeae10a9d4683cc5c5c
CRs-Fixed: 3266252


# 8aa7cab5 09-Mar-2022 Nandha Kishore Easwaran <quic_nandhaki@quicinc.com>

qcacmn: Add provision to increase num_elements

Add support to change the number of elements in multi pages
alloc function. This is needed to increase the number of tx_descs.

Change-Id: I29ee2764c24

qcacmn: Add provision to increase num_elements

Add support to change the number of elements in multi pages
alloc function. This is needed to increase the number of tx_descs.

Change-Id: I29ee2764c24c6f83b0c2cff1062ec7239dcc0b4b
CRs-Fixed: 3130833

show more ...


# 412a969a 23-Dec-2021 Devender kumar <quic_kdevende@quicinc.com>

qcacmn: Fix Atomic Memory Allocation Method

Memory allocation in atomic context is not correct, as for
MEMORY_DEBUG profile the initial_memory_debug flag is set to
0 which leads in allocating memory

qcacmn: Fix Atomic Memory Allocation Method

Memory allocation in atomic context is not correct, as for
MEMORY_DEBUG profile the initial_memory_debug flag is set to
0 which leads in allocating memory with GFP_KERNEL flag
Issue is seen with SDX_PINE where the memory allocation is done
in sleeping context using GFP_KERNEL in interrupt context
Fix is create a new memory allocation API with GFP_ATOMIC flag

Change-Id: I3baa5b601b60f88fe2d9ff1f4008703c6507a267

show more ...


# bd23cf7d 30-Sep-2021 Himanshu Batra <quic_hbatra@quicinc.com>

qcacmn: QDF changes to support IPA offload

QDF changes to support IPA offload.

Change-Id: Ib3a0f667bb9c11fb65f6a41ad777ff7273288569


# 41ab344f 12-Nov-2021 Yue Ma <quic_yuem@quicinc.com>

qcacmn: Add CONFIG_CNSS_OUT_OF_TREE flag for QDF prealloc

Use CONFIG_CNSS_OUT_OF_TREE to control if CNSS prealloc driver is
built from in-kernel-tree source or out-of-kernel-tree source since
the ex

qcacmn: Add CONFIG_CNSS_OUT_OF_TREE flag for QDF prealloc

Use CONFIG_CNSS_OUT_OF_TREE to control if CNSS prealloc driver is
built from in-kernel-tree source or out-of-kernel-tree source since
the exposed header file will be in different paths. This is also for
backward compatibility. Use internal flag CNSS_MEM_PRE_ALLOC instead
of CONFIG_WCNSS_MEM_PRE_ALLOC which will not be defined from kernel
defconfig for out-of-kernel-tree CNSS prealloc driver. CNSS_MEM_PRE_
ALLOC will be defined in the driver Kbuild no matter where CONFIG_
WCNSS_MEM_PRE_ALLOC gets defined.

Change-Id: I6e35f3e859fb429584e83665fe0290ffeb314312
CRs-fixed: 3074638

show more ...


# a8d8b663 14-Sep-2021 Pragaspathi Thilagaraj <tpragasp@codeaurora.org>

qcacmn: Define QDF API for vzalloc and vfree

Define QDF API for virtual memory allocation and free.
Also add new api to get time of the day in microseconds.

Change-Id: I2921055bbb6b5d2a1105d19448b2

qcacmn: Define QDF API for vzalloc and vfree

Define QDF API for virtual memory allocation and free.
Also add new api to get time of the day in microseconds.

Change-Id: I2921055bbb6b5d2a1105d19448b2a10fa2d6ccc5
CRs-Fixed: 3038180

show more ...


# cc74d108 15-Aug-2021 Jianmin Zhu <jianminz@codeaurora.org>

qcacmn: Fix array out of bounds issue

In qdf_mem_multi_page_link, pages->cacheable_pages is array with elem num
pages->num_pages, but pages->cacheable_pages[pages->num_pages] is read,
out of bounds

qcacmn: Fix array out of bounds issue

In qdf_mem_multi_page_link, pages->cacheable_pages is array with elem num
pages->num_pages, but pages->cacheable_pages[pages->num_pages] is read,
out of bounds error will report if KASAN enabled.

When ini dp_tx_ext_desc is 6144 and DP_TX_DESC_POOL_SIZE is 6144,
Size in bytes of TX TSO Num Seg Desc is 16, page size is 4096, so TX TSO
Num Seq Desc need 24 pages (6144*16/4096), each address need 8 bytes,
so TSO Num Seq Desc need kmalloc 192 bytes to save address of 24 pages.

BUG: KASAN: slab-out-of-bounds in qdf_mem_multi_page_link+0x190/0x1f4
Read of size 8 at addr ffffff816b4d60c0 by task kworker/u16:0/8

CPU: 7 PID: 8 Comm: kworker/u16:0 Tainted: G S W O
Workqueue: cnss_driver_event cnss_driver_event_work
Call trace:
dump_backtrace+0x0/0x204
show_stack+0x18/0x24
dump_stack+0xcc/0x11c
print_address_description+0x88/0x578
__kasan_report+0x1ac/0x20c
kasan_report+0x14/0x20
__asan_load8+0x98/0x9c
qdf_mem_multi_page_link+0x190/0x1f4 [wlan]
dp_tx_tso_num_seg_pool_init+0x84/0x170 [wlan]
dp_soc_tx_desc_sw_pools_init+0xb4/0x128 [wlan]
dp_soc_init+0xf78/0x18c8 [wlan]
dp_soc_init_wifi3+0x14/0x20 [wlan]
cds_open+0x7e8/0x15fc [wlan]
hdd_wlan_start_modules+0x7d8/0xf10 [wlan]
hdd_wlan_startup+0x17c/0xbd4 [wlan]
wlan_hdd_pld_probe+0x234/0x370 [wlan]
pld_pcie_probe+0x6c/0x88 [wlan]
cnss_pci_call_driver_probe+0xd8/0x358
cnss_bus_call_driver_probe+0x38/0x6c
cnss_driver_event_work+0xf14/0x1188
process_one_work+0x53c/0x8b8
worker_thread+0x4f8/0x928
kthread+0x1e8/0x200
ret_from_fork+0x10/0x18

Allocated by task 8:
__kasan_kmalloc+0x100/0x1c0
kasan_kmalloc+0x10/0x1c
__kmalloc+0x130/0x448
kzalloc+0x14/0x20 [wlan]
__qdf_mem_malloc+0xcc/0x120 [wlan]
qdf_mem_multi_pages_alloc+0xc0/0x580 [wlan]
dp_prealloc_init+0x1b0/0x48c [wlan]
wlan_hdd_pld_probe+0x200/0x370 [wlan]
pld_pcie_probe+0x6c/0x88 [wlan]
cnss_pci_call_driver_probe+0xd8/0x358
cnss_bus_call_driver_probe+0x38/0x6c
cnss_driver_event_work+0xf14/0x1188
process_one_work+0x53c/0x8b8
worker_thread+0x4f8/0x928
kthread+0x1e8/0x200
ret_from_fork+0x10/0x18

The bad address belongs to the object
which belongs to the cache kmalloc-192 of size 192
The bad address is located 0 bytes to the right of
f816b4d60c0).

Change-Id: I6569c22bc8f900296f49a4426f085912a33aa452
CRs-Fixed: 3014390

show more ...


# 4b21f23f 02-Aug-2021 Paul Zhang <paulz@codeaurora.org>

qcacmn: Align 8 bytes for qdf_mem_header address

In the function list_empty(), there is macro READ_ONCE() and
assembler instruction "ldar" will be used. It requests 8 byptes
alignment for qdf_mem_he

qcacmn: Align 8 bytes for qdf_mem_header address

In the function list_empty(), there is macro READ_ONCE() and
assembler instruction "ldar" will be used. It requests 8 byptes
alignment for qdf_mem_header address or data abort will happen.

To resolve this issue, align the qdf_mem_header address when
invoking function qdf_mem_dma_get_header().

CRs-Fixed: 2997107
Change-Id: I3d079c3c7e0f3634d85f891327284aefb7a65711

show more ...


# f8167f4d 21-Jul-2021 Vivek <vchettri@codeaurora.org>

qcacmn: Call cfg80211 functions with context aware allocation flags

There are instances in the code where the response is sent from the
driver to the supplicant indicating the allocation flags which

qcacmn: Call cfg80211 functions with context aware allocation flags

There are instances in the code where the response is sent from the
driver to the supplicant indicating the allocation flags which is
used by the supplicant to allocate memory.

In those situations, we should pass the allocation flags based on
the context in which the response is sent.

Send the response with the right allocation flags to the supplicant.

Change-Id: I85f1c29fc66ba51a9f9c645692712c3a25b7fed1
CRs-Fixed: 2987552

show more ...


# 0fedc360 20-Apr-2021 Alan Chen <alache@codeaurora.org>

qcacmn: Add ksize check for calling qdf_mem_prealloc_put

In perf builds, add a ksize check and call qdf_mem_prealloc_put()
only when size is greater than 4K to avoid lookup overhead.

Change-Id: If0

qcacmn: Add ksize check for calling qdf_mem_prealloc_put

In perf builds, add a ksize check and call qdf_mem_prealloc_put()
only when size is greater than 4K to avoid lookup overhead.

Change-Id: If01a7cbeaf1ee7f514f16296340169a937dafa78
CRs-Fixed: 2936464

show more ...


# c2c89243 22-Mar-2021 Adwait Nayak <adwait@codeaurora.org>

qcacmn: Parse and update qdf module params

Read the file wifi_module_param.ini, in which wifi module params
are present and compare these module params with qdf module params
in qdf module init func

qcacmn: Parse and update qdf module params

Read the file wifi_module_param.ini, in which wifi module params
are present and compare these module params with qdf module params
in qdf module init function.

If any of the module params belongs to qdf module is present,
then that particular module param is updted during qdf module init.

Change-Id: I76ef876f6c7be3cdffd93b6050a190438d60bf39

show more ...


12345