There is a requirement to get sequence number and tid for tx
data packets in packet capture mode. These fields are not
received as part of WBM tx completion, but are obtained from
FW in ppdu stats. As WBM tx completion and FW ppdu stats are
two different events, the ppdu_stats of previously sent ppdu
are filled in the radiotap header of current tx ppdu in packet
capture mode.
Enhance code to add required fields such as ppdu_id of tx current
ppdu and ppdu_id, tid, start_seq, ba_bitmap of previously sent ppdu
as extension2 to radiotap header. These fields will be added in
radiotap header only when add_rtap_ext2 is set.
Change-Id: I448a9c03a770b61ab802d855bc5f1a6587bd01b3
CRs-Fixed: 3004472
Since walt is msm-only scheduler group of features,
not upstreamed. Include walt.h header when CONFIG_SCHED_WALT
has been enabled.
CRs-Fixed: 3023820
Change-Id: Ib1aacae83ca4168eff958341f0feebe8ab37a4e7
Some platforms do not support cached descripts for DP Rings.
Add support to set WLAN_CFG_DST_RING_CACHED_DESC to 0 and make
__qdf_nbuf_dma_inv_range as stub if DP_NO_CACHE_DESC_SUPPORT flag is
enabled during compilation.
Change-Id: Ic6b483be25c32f3f3c79b170fb7d7557a232b4ac
CRs-Fixed: 3027649
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
Set QDF_TIMER_MULTIPLIER_FRAC to default multiplier if it is defined.
Remove get API under this feature flag so that this can be modified using
set dynamically based on the emulation target detect.
Change-Id: If0743e6b571832ebf3319f9895350685a5cd53f0
CRs-Fixed: 2995514
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
Tx data transfer in host mode with nbuf map_unmap debug frmwk
enabled and enhanced stats disabled results in an assert.
This is because on Tx completion path, nbuf unmap is done using API
qdf_mem_unmap_nbytes_single which takes physical address of nbuf
for unmap and does not remove nbuf from map_unmap tracking list and
when nbuf is freed, it results in assert as the tracking list still
contains that nbuf entry.
In order to fix this, define a new API for nbuf unmap passing physical
and virtual address of nbuf as arguments. Physical address is passed
as an argument in order to avoid cache miss in per packet path which
eventually helps in improving the KPI.
Change-Id: I77ab6ac3ac98556b9caff8aa3ee82bc23cd26de7
CRs-Fixed: 3006671
IPA and rx_err ring are processed in same CPU resulting
in low Tput.
To fix this, not allow processing of rx_err ring in
CPU 0
Change-Id: Id53a03c9290607beb1a595c84bfb0fd8d9f5d105
CRs-Fixed: 2949569
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
Add a new component for MBSS framework in object manager.
Add a new trace module for the new MBSS component framework.
Change-Id: I7ef3559d90a6bc7f558e3994a1a91f09985d90e9
CRs-Fixed: 2958764
On 5.10 kernel need idle” functionality is moved from
<linux/sched.h> to walt (<Linux/sched/walt.h>), Replace
“PF_WAKE_UP_IDLE” checks with “IS_ENABLED(CONFIG_SCHED_WALT)”.
Change-Id: Icb89b0e6e9862ed5b82680379a1d2630c9b2b4d9
CRs-Fixed: 2990760
Add a separate module ID for Multi Link Operation (MLO) Information
Element protocol processing related QDF trace prints. These are for
use in processing of any IEs related to MLO. This would help separate
the tracing of MLO IE operations which are expected to be substantial,
and avoid confusion that might arise from reuse of MLO manager
tracing.
Change-Id: If55532a89452b6432101be07fcc6aff45045e822
CRs-Fixed: 2985731
Add support to log ICMP seq no and ID in DPTRACE.
Other protcols can use this private proto data to record
there private data accordingly. Currently it is set to 0.
Increase the record entry from 40 bytes to 50 bytes.
Change-Id: Ief5fb26a97408a364af486f3eaec2e108de71d52
CRs-Fixed: 2951916
There is a time involved between the smmu fault initiated
and the eventual system panic. In this time there is a
possibility of the nbuf history being overwritten losing
the information on the nbuf which might has actually caused
the SMMU fault.
Set the ssmu state and dont track the nbuf's when the smmu
fault is detected.
Change-Id: I579da332766618161567764656005ef13667270e
CRs-Fixed: 2960070
Check for is_initial_mem_debug_disabled is missing in nbuf APIs.
Add check for is_initial_mem_debug_disabled in those APIs.
Change-Id: Ie85cae8029b5d47567da861dd84b86221a68b0f5
CRs-Fixed: 2962901
For Kernel version 5.4 and up use AES api's instead of
generic crypto api's referenced in qdf crypto module.
Change-Id: I92031d469d0da657dce4dcb8c603c82a1e182f1d
CRs-Fixed: 2947476
Some of the targets require more QDF nbuf history
size, so making the size configurable keeping
default same.
Change-Id: Ic4ac43a1eacb1e58c0a05b794349525d614d7fc8
CRs-Fixed: 2929968
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
Depreciated IPA APIs are currently getting compiled.
To fix this, adding linux kernel version check
Change-Id: I2288db34c09d60047c67a5df9081de08a6c2f62b
CRs-Fixed: 2927413
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
Replace request_firmware by firmware_request_nowarn to avoid warning
message when the file is not found and sysfs fallback mechanism is
enabled if direct filesystem lookup fails.
Change-Id: Ib55d257aa01c52523b1f1137165c842e139ce614
CRs-Fixed: 2912039
Linux kernel commit 15bfc2348d54 ("modpost: check for static
EXPORT_SYMBOL* functions") adds a check to make sure that static
functions are not exported.
With this in place the following fatal errors are reported:
FATAL: modpost: "__qdf_nbuf_get_ether_type" is a static EXPORT_SYMBOL
FATAL: modpost: "os_if_spectral_free_skb" is a static EXPORT_SYMBOL
FATAL: modpost: "qdf_nbuf_tx_desc_count_update" is a static EXPORT_SYMBOL
FATAL: modpost: "__qdf_nbuf_get_ip_offset" is a static EXPORT_SYMBOL
To fix these errors do not export the static functions.
Change-Id: Ib5caab904401900bafb23dee23b119daa76d4055
CRs-Fixed: 2910980
In qdf_nbuf_unshare_debug() API remove the refernce of old nbuf
before calling skb_unshare(). As skb_unshare() will free old nbuf
and allocate a new one for a cloned skb.
Change-Id: I2a2f0277934268a346e13a0779e204f02c9bcf5b
The minidump API msm_minidump_remove_region() was added to the
msm-kernel from version 4.19 so, to avoid compilation failures in
older kernel versions, enable the feature flag WLAN_QCOM_MINIDUMP
for kernel beginnig with 4.19 version.
Change-Id: Iba7a293fb9ca3e5ffe967e8d610251df8c2a3969
CRs-Fixed: 2901746
This feature is used to detect CE tasklet scheduling delay
and credit response delay issues.
Change-Id: I9a8fcb425edd5cf96fae5f6cd3bfc7f51172c814
CRs-Fixed: 2874874
Add QDF infra for minidump feature and define the
minidump_log and minidump_remove functions.
Change-Id: I875b991b7a7d9295f8b2acd95a7551a747ec962c
CRs-Fixed: 2856193
Currently the return type of qdf_queue_work is void,
whereas queue_work return type is bool denoting the status,
so changing the return type of qdf_queue_work to bool,
helps to check the status of the function.
Change-Id: Ifd07923a18641790314b88d38a7eba2a73e498b3
CRs-Fixed: 2876197
The current print rate limiting for prints to console is
for all contexts.
There are some debug prints which come to console via work queues
which we don't want to rate limit and only rate limit coming via
interrupt context or bottom halves which causes
FW backpressure due to excessive prints.
So rate limit prints coming to console if in
interrupt context or bottom halves
CRs-Fixed: 2853590
Change-Id: I867b2c0d17b54037ee45eb6b7871a16c2668d7ba
The qdf_in_interrupt API was defined in the internal
Linux util file.
Move the API from internal to qdf_util.h and provide
the appropriate abstraction
CRs-Fixed: 2853590
Change-Id: I512155776275684223c1901d789853d2529fcc83
Use non-inline OS-abstraction APIs to avoid OS APIs usage directly in
driver.
Add new non-inline OS-abstraction APIs.
CRs-Fixed: 2742480
Change-Id: I177b41d69ca8f102fa67316d8901b6991dea3203
Return proper value of qdf timer multiplier based on this
Kbuild option QDF_TIMER_MULTIPLIER_FRAC.
Change-Id: I10c08ba900aad49fb9134d2e4d337f04a19dec7b
CRs-Fixed: 2855512
The prints from the driver are rate limited based on the
configurations provided.
Also the prints which are redirected to user space daemon
and of certain log levels are also printed on the console.
Add a rate limiting version of the API for the prints coming
to console via the logging daemon.
CRs-Fixed: 2853590
Change-Id: I9683172ac0665b46581bad13a1050c6d70d72b5c
Currently if the driver is in runtime suspend/suspending
state, any packet transmission will request for resume
via hif_pm_runtime_get.
Unfortunately there is a logging in the above API which
will lead to more time consumption in the NET_TX softirq
context. This can lead to other delay in processing other
softirqs in the system.
Fix this by skipping the logging in the packet transmission
path.
Change-Id: Icc9f5b67794f7666243eb059f2e07a06a987002e
CRs-Fixed: 2844126
QDF per packet proto log level is set to debug due to
which the info is not logged to console.
Fix is to change QDF per packet proto log level to info.
Change-Id: I64b6d577475ea6133ec0565ae459629b81c0929c
CRs-Fixed: 2847863
During nbuf free if entry is not found in debug tracker list
it is treated as double free or unallocated buffer free
which is not correct because there is possibility of nbuf
entry not being present in debug tracker list due to memory
allocation failures for tracker nodes in system low memory state.
Maintaian counter for nbuf debug tracker node memory
allocation failures, during nbuf free if entry is not found
in debug tracker list and tracker memory allocation failures
are present then don't raise issue for nbuf free.
Change-Id: I770cfc23bad35af7e7dbec34852a31cc68300ca5
CRs-Fixed: 2844059
Do not allocate memory if the ask is larger than the
maximum memory allowed for malloc. We have it limited to 4MB.
CRs-Fixed: 2828104
Change-Id: I5b463dd8eb640c76882653e82e6f6db7cb651cf2