In kernel 5.4, Wake lock API wakeup_source_register requires
"struct device *" parameter, and it can be NULL value. If it is
NULL, the wakeup_source_register will create a "device" node and return
it by wakeup_source struct.
In qcacld driver, the qdf_wake_lock_create will save the "wakeup_source"
to cld's private struct qdf_wake_lock->lock.
When the cld driver destroy os wake lock by wakeup_source_unregister,
"dev" will also be invalid in kernel, we need to clear the "dev"
field in local copy of wakeup_source in qdf_wake_lock->lock.
This will fix the potential reuse of qdf_wake_lock->lock.dev after it has
been destroyed.
Change-Id: I1de6e95c64b35929bef8be2cdeeb86422bc38515
CRs-Fixed: 2634032
Extend radiotap header to append ACK status and tx retry count
for packets sent to virtual mon interface.
Change-Id: I51037ffd11dfdee49278d43643fb7861a514ee18
CRs-Fixed: 2627710
Packets delivered to FISA via exception err path doesnot have TLVs.
FISA handling requires additional TLVs. dp rx core handling
skips TLVs, save TLV length info in nbuf->cb so that TLVs
are recovered back in FISA.
Change-Id: I53fab2e19abcbf82697ea6f53a4ddf3ea0dd0699
CRs-Fixed: 2620844
Break up the 2MB descriptor bank memory allocations for WBM
idle link ring. Use multiple page allocation and populate the
WBM idle link descriptor ring with physical addresses of each
DMA page allocated in the descriptor bank.
This is to ensure that no requests for contiguous memory
allocations are made that might result in allocation failures.
For MCL set the page size to 4KB and leave it to max_alloc_size
cfg ini param for WIN specific code.
Change-Id: Iec30321044827c0174366cc02df25a42d38309e0
CRs-Fixed: 2565817
For Genoa, it use IPA GSI, and whether gsi enabled
or not decided by ipa dts setting, which should get
from IPA driver, so add such information.
Change-Id: I6321afaf35c57d7d5865b896193ab1d44042ee4c
Various QDF logs being printed to the driver log are not necessary for
debugging purposes.
Cleanup the logs that are not required.
Change-Id: I9c5685b4d31a741703667943ac458921fa0d480e
CRs-Fixed: 2616210
Kernel 5.4+ is returning created wake lock pointer which needs to be
stored in driver wakelock structure, which needs to be used in
acquire, release, and destroy APIs. This change updates the QDF wake
lock structure accordingly to handle both older and new kernels.
Change-Id: Id0c5279613fa4c4c84205905fef7557c6b852017
CRs-Fixed: 2615065
Export __qdf_nbuf_data_is_icmp_pkt to outside QDF. This is needed for
implementing the per-peer protocol counters
Change-Id: I40db2b95347e95f2a5a7dbf6650fa873f564f1c3
CRs-Fixed: 2604877
QDF_TRACE_LEVEL_NONE(= 0) is a valid value for qdf_dbg_mask,
which is currently being treated as error. Correct the
condition with this change
Change-Id: Id8ddebc4774ccf721ce7ff14b035f287b3a4b5ee
CRs-Fixed: 2587010
Replace QCA_WIFI_QCA8074_VP with CONFIG_WIFI_EMULATION_WIFI_3_0
since VP platform is not being used anymore.
Most of the parameters present inside QCA_WIFI_QCA8074_VP are related
to emulation timeouts. Hence replacing it with a more meaningful flag.
Change-Id: I22a0e5803e765333947f1613b376dcc6bd25b5af
Add support to send protocol data packet info via diag log
command to userspace at tx entry point, on receiving tx
completion indication and in rx path, before delivering the
packet to network stack.
Change-Id: I6a95a16b7ebedf505ecb501107b1bbb89b16b67d
CRs-Fixed: 2595799
Adds support to include qdf as part of single module.
This is needed for WHUNT testing where we need to have
single module, one inserted as AP and one as STA.
Change-Id: I8c2aef4cc18391e92f537e2ce791bd5b58b6e764
Clear console log boot up error prints by removing unnecessary
prints, modifying prints to appropriate info or debug and
by fixing the errors
Change-Id: Ica3f126280399eef59b894236849e2079a62565f
CRs-Fixed: 2597026
Starting Kernel 4.19 IPA LAN RX supports NAPI polling
mechanism. Netdevs that hook into IPA need to call
netif_receive_skb() or similar to deliver the packet
to network stack instead of using netif_rx_ni().
IPA driver exports ipa_get_lan_rx_napi(void) API for
this purpose. If this API call returns true use
netif_receive_skb() or fallback on legacy api.
Add the changes under a feature flag IPA_LAN_RX_NAPI_SUPPORT
which is enabled under a linux kernel version check for 4.19
and above.
Change-Id: I449404e86e934fd6113cb71e494575e67602f678
CRs-Fixed: 2588500
Add monitor mode support to capture packets over 6GHz frequencies by
getting capture frequency from pdev.
Change freq type to qdf_freq_t.
Change-Id: I7b6edc43e254dc98a3c2939c369874bec9d16ddd
CRs-Fixed: 2568970
"qdf_nbuf_cb.u.rx.lro_eligible",
"qdf_nbuf_cb.u.rx.is_raw_frame"
bits occupy same memmory as
"qdf_nbuf_cb.u.tx.flags.bits.flag_efrag",
"qdf_nbuf_cb.u.tx.flags.bits.flag_nbuf" as it is a union
but flag_efrag and flag_nbuf are always set during
qdf_nbuf_alloc, this is resulting in is_raw_frame to be
explicitly set even when the received frame is not RAW
memory location of these fields in qdf_nbuf_cb
D:0xBCDFE0F4.0 lro_eligible = 1
D:0xBCDFE0F4.1 is_raw_frame = 1
D:0xBCDFE0F4.0 flag_efrag = 1
D:0xBCDFE0F4.1 flag_nbuf = 1
in qdf_nbuf_alloc the flag_efrag & flag_nbuf is set.
skb_alloc:
memset(skb->cb, 0x0, sizeof(skb->cb));
/*
* * The default is for netbuf fragments to be interpreted
* * as wordstreams rather than bytestreams.
* */
QDF_NBUF_CB_TX_EXTRA_FRAG_WORDSTR_EFRAG(skb) = 1;
QDF_NBUF_CB_TX_EXTRA_FRAG_WORDSTR_NBUF(skb) = 1;
As discussed over email this is a temporary WAR
until a long term solution is in place.
Below is the email conversation
This is a temporary change to unblock the present sanity issues
There seems to be a basic issue with nbuf_alloc, with following logic
QDF_NBUF_CB_TX_EXTRA_FRAG_WORDSTR_EFRAG(skb) = 1;
QDF_NBUF_CB_TX_EXTRA_FRAG_WORDSTR_NBUF(skb) = 1;
nbuf_lloc is assuming that the buffer is allocated for TX always
and setting fields in the area of TX portion of union.
If that skb is used for RX can lead to wrong interpretation of the RX
union fields, which is causing present issue.
This got exposed with a recent change that shuffled the fields of
RX union which made the imp fields got manipulated with this TX setting.
We need to resolve this basic issue with wider consent and validations,
while this fix unblocks the basic sanity issues.
Change-Id: I24a6d0faf3a874c54b4859dc027e059c693d6759
The scheduler watchdog timer handler currently either prints error or
prints error and panics based on CONFIG_SLUB_DEBUG_ON.
Considering the panic through QDF_DEBUG_PANIC is configurable and is
disabled on relevant builds, we can just have one version of the
function and depend on QDF macro for panic and dependency on
CONFIG_SLUB_DEBUG_ON is redundant
Change the default log levels from none to fatal for scheduler.
Change-Id: If588455ea2779311eb86bb39b3ab0f7fc67b6ccc
CRs-Fixed: 2593790
Provide sys entries to list down top mem and dma allocations (based on
configurable threshold). This can help to check allocations at run-time
and can provide clue if some function is allocates memory continuously.
CRs-Fixed: 2589632
Change-Id: If9a6da535233fc48828f2e9fb2bdacb8153270e4
Support to disable panics in qdf memory debug. This can be used when KASAN
or SLUB or SKB debug options are enabled
CRs-Fixed: 2580399
Change-Id: If8617a16d0b96279f0afef8299632662dea498bf
Disable the mem_debug when qdf argument mem_debug_disabled=1 is passed
through uci command "uci set wireless.qcawifi.mem_debug_disabled=1".
CRs-Fixed: 2572159
Change-Id: I6ab5e1f28ce4c58d46c7467bac3853054f4cf56c
Allocate node for new entry and add it to existing list of function or line
If function or line already present in list then increment count
Change-Id: I3d737dcd33862f133b52c6d694c89f6d6b1517a5
Check for vdev_id mismatch to deliver NBUFs to stack to avoid
hold peer reference while giving nbuf list to stack
Change-Id: Ic475e00d5b1793ada7b26b7af3322ca2fa51836f
qdf_print_thread_trace() currently uses stack_trace_save_tsk() to save
task stack strace into a storage array, but stack_trace_save_tsk() is
undefined because it is not exported. Switch to using
save_stack_trace_tsk() as originally was done.
Change-Id: Ie90cdd87233581718e9a40436128a92691fc9a17
CRs-Fixed: 2587454
Fix compile issues when some features are disabled, the features are:
BUILD_DEBUG_VERSION
CONFIG_CP_STATS
CONFIG_HOST_OPCLASS
CONFIG_FEATURE_ROAM_DEBUG
There are some other features depends on each other, so enabled features to
qcs40x.snoc.perf_defconfig, the features are:
CONFIG_WLAN_FEATURE_FILS
CONFIG_WMI_ROAM_SUPPORT
CONFIG_WMI_STA_SUPPORT
CONFIG_REG_CLIENT
CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH
CONFIG_WMI_CONCURRENCY_SUPPORT
CONFIG_LL_DP_SUPPORT
Change-Id: I6fa1eacb79576a955e593dbb9ac52083742275e3
CRs-Fixed: 2584839
set_wake_up_idle together with PF_WAKE_UP_IDLE is removed from
kernel 5.4 and hence kernel version check to avoid compilation
issues with 5.4 kernel.
Change-Id: If44e275eed1d639d90fc7fb4c93a5a2386ffba15
CRs-Fixed: 2580955
In SLUB disabled builds, the qdf_mem_malloc calls the
qdf_mem_malloc_fl function which doesn't
validate if the size provided is 0 and returns the value
ZERO_SIZE_PTR(((void *)16)) for the pointer. When this pointer
is dereferenced, it causes invalid address dereference.
Validate if the size parameter provided to qdf_mem_malloc is
0 or greater than QDF_MEM_MAX_MALLOC. Return failure if the
validation fails.
Change-Id: I8fc6bc796847e9dd3dfd5186b0386d323560d0cf
CRs-Fixed: 2571505
For each DBR ring, add debugfs entry to dump at real-time the ring
parameters like head, tail index, the timestamps at which a buffer is
received and replenished. Issues that are specific to tail index
movement from the target can be identified with this debugfs entry.
CRs-Fixed: 2466514
Change-Id: Iafbc61726264464212cb783a1cce46e16b8a48ff
Kernel 5.4 and 5.1 have removed the functions wakeup_source_init()
and wakeup_source_trash() respectively. Add conditional preprocessor
directives to use wakeup_source_register() and wakeup_source_unregister()
for Kernels 5.4 and 5.1 respectively.
Change-Id: I05597eb54b2988f7bc203b53427e17980a7473f9
CRs-Fixed: 2559016
Kernel 5.2 onward has removed the flags variable from the shash_desc
struct. Create a new function set_desc_flags() to set the desc->flags
variable conditionally for kernel versions older than 5.2.
Change-Id: I2c9b9b00147beff8600fbc9149594c11bb403a66
CRs-Fixed: 2559017
Kernel 5.2 has removed the stack_trace struct and replaced
print_stack_trace() and save_stack_trace_tsk() with stack_trace_print()
and stack_trace_save_tsk() respectively. Add a conditional preprocessor
directive to use save_trace_print() and stack_trace_save_tsk() and call
them with the appropriate updated parameters.
Change-Id: I99643e1b93251de7453f511d13f5a4a39c56f99c
CRs-Fixed: 2559033
Write into hal register using three floating windows instead of one.
This change is done to avoid frequent window changes for writing into
DP and CE registers. Instead 3 windows are used. One window is statically
mapped to CE block and another window is mapped statically to DP block.
Due to this design there is no need to change the window register to
write into these blocks and write can be done on corresponding window
with single iowrite32. Similar loginc is used for ioread32.
Also modified the hp_addr and tp_addr in initialisation stage so that
hal_write will not have multiple if checks.
Change-Id: Ibb99ec4da7f63323082e46a28afbe90e1f555545
CRs-fixed: 2507441
skb_frag_t typedef was modified in kernel version 5.4. Change code to
use the typedef rather than the underlying type so that the same code
will be built on both 5.4 and pre-5.4 kernels.
Change-Id: Id491ab5edf0dec7cd09426d6c6b0a607ff66b66f
CRs-Fixed: 2559037
Kernel 5.2 onwards no longer uses the tasklet_hrtimer struct. Add
conditional preprocessor directives to only use hrtimer structs for all
functions that use the tasklet_hrtimer struct for Kernel 5.2 onwards.
Change-Id: Ib691022de5c751ee88da78c081740dc1df923926
CRs-Fixed: 2558916