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
sw_exception bit will be marked in reo dest ring descriptor for
FW re-injected frame, get this bit and save it in skb->cb,
this bit value can be used for FISA further check.
there is no reo_dest_indication field in reo dest ring on beryllium,
so share same cb member for sw_exception and reo_dest_indication.
Change-Id: I2321121be7dda68ed19faca177d868c7e8ba1dbf
CRs-Fixed: 3056156
If ppdu rssi unit is dbm, need convert to db for API:
qdf_nbuf_update_radiotap, only need convert once for first mdpu in the
ppdu. if convert for each mpdu, wrong rssi will be saved.
Change-Id: I85e92121ddb289e3513022ff092083825197efb4
CRs-Fixed: 3057041
2 threads blocked to wait channel_switch_complete_evt for SAP channel
switch is already in progress, qdf_event_set only woke up 1st thread
later, 2nd thread still kept blocked with hold net_dev for debug id
NET_DEV_HOLD_COUNTRY_CHANGE_UPDATE_SAP, leak happened.
Change-Id: Ib76318dd4a613ca1852a56b7701a04385b69ba56
CRs-Fixed: 3061976
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
Dump flow pool stats even for low verbosity level as
part of periodic stats display.
Change-Id: Iea59d20b0a81cfd0bfdac65ad54a11fa33f30f2f
CRs-Fixed: 3031168
Add QDF API to get the first node of a linked list. If the
list is empty this API returns NULL.
Change-Id: I4569941f708634085904fd30a347facca543594a
CRs-Fixed: 3029987
Add changes to register separate function pointer to receive EAPOL
frames instead of using regular RX path and adding export symbol
for __qdf_nbuf_data_get_eapol_subtype() to access in it multiple
modules
Change-Id: Id05b982d31a7e008536d10dd5281e88cceba96db
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