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
Force wake request is sent before register write. If this req
fails check if FW is down or host is in recovery before
asserting.
Change-Id: I6d31b1f95b68ae4e462f59ed32ed933de55cacae
CRs-Fixed: 2601364
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
Currently, QDF_MAX_CONCURRENCY_PERSONA allows a maximum of 4
MAC addresses to be assigned to different interfaces. NAN
discovery interface is a new interface and it needs a MAC address
to be assigned. QDF_MAX_CONCURRENCY_PERSONA needs to be increased
to 5 to provide the same.
WLAN_MAX_VDEVS defined in Kbuild already takes care of the
maximum no.of vdevs(6) supported. QDF_MAX_CONCURRENCY_PERSONA can
be made dependent of WLAN_MAX_VDEVS which caters the same purpose.
Define QDF_MAX_CONCURRENCY_PERSONA accordingly.
Change-Id: If5085703ab9c0cc70ce4fc0d20bedc20f382b4bd
CRs-Fixed: 2592018
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
Depending on the requirement, a bigger size or a smaller size for
the frequency variable can be chosen. The advantages of each size
are described below:
Advantage of a bigger size:
When two technologies (e.g. 802.11AX and 802.11AD) are controlled
by the same driver software, the frequency range may be very large
and a bigger size (e.g. 32bit integer) is more appropriate.
Advantage of a smaller size:
When the frequency range is not very large, a smaller size
(e.g. 16bit integer) can be used. It saves a large amount of space
especially when many large arrays containing elements of this
type/size are defined in the driver.
Change-Id: I6c8fb2a4dc117e2535ef96009362923557cee398
CRs-Fixed: 2570456
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
Kernel 5.2 onwards calls __arch_counter_get_cntvct() instead of
arch_counter_get_cntvct(). Add conditional preprocessor directive to
use the appropriate function call for the correct kernel version.
Change-Id: I86041fdfd36f0c4522397f632910cdaa26780035
CRs-Fixed: 2558917
get_monotonic_boottime() and similar functions have been replaced with
ktime_get_boottime() in newer driver versions. Change the calls to
get_monotonic_boottime() in the qdf wrapper to ktime_get_boottime().
Change-Id: I066ffbbcb3a51f8a080fd445397be028ee73ab2e
CRs-Fixed: 2558910
One hash_node is still left in hash bucket list while the memory
has been freed by normal operation, suspect that maybe two same
hash_node is existed in hash bucket list before, add debugging code
to detect this problem earlier.
Change-Id: I1497ae29c0e09e35dc140c7c37e228e02eb000e4
CRs-Fixed: 2562952
Currently, the variable argument list messages are going through vprintk.
As a result, these messages are appearing only on dmesg, but not on any
external logger. Use QDF logging functions instead to fix this.
CRs-Fixed: 2561051
Change-Id: I9cfc6aaa7b81de4945f7cfd5f7cd15540c3fc1f2
During system suspending, the target might request wakeup early to the
host. The host will wakeup the system directly to abort current suspend
to avoid mismatching PM state between host & target.
Change-Id: Icf6e58ff24cbe072ef56aa22820432efb2ca1932
CRs-Fixed: 2559306
Two copies of the same queue.h was used in WIN and MCL
and each had its own copy, so the file is now moved to
common code and and both WIN/MCL can use the same file.
Updated the Kbuild to include the new path where queue.h is
available
Change-Id: I9f362173c7ae05d1613629787a5f3be61879efbe
CRs-Fixed: 2545115
Currently MCL and WIN both have there separate queue.h
files with the same declarations and definitions.
As part of cleanup create single queue.h in common
code and update the usage of existing queue.h to this
newly added queue.h.
Change-Id: Ie381c3553d6361cf7f8c97f14a91ed24e332b51a
CRs-fixed: 2505617
When a particular vdev is deleted, the corresponding rx
packets which have been queued to the rx thread are not
flushed. Hence when such packets are submitted to the
network stack, the dev for this skb will be invalid,
since we have already freed the adapter.
Flush out the packets in the rx thread queues, before
deleting the vdev.
CRs-Fixed: 2543392
Change-Id: I2490d0f5ce965f62152613a17a59232521ca058f
Replace panic by QDF_DEBUG_PANIC because if PANIC_ON_BUG is compiled out,
we do not want to panic the system.
Change-Id: Idae89d6881ed5543273b047a0b77bc3ae55132b5
CRs-Fixed: 2545292
Add support to account for TSO jumbo packets on the
Tx path and print the statistics using dumpStats 3.
Change-Id: I6cc446df5c84e3ac436d922935fcd559e0704ec5
CRs-Fixed: 2356244
If qdf timer is already running and a module calls it again, log the
timer callback info to see why that module is calling it again.
Change-Id: I47e9d33a2a144a0a779f71b50dbabea227c4b362
CRs-Fixed: 2546070
Add qdf wrapper API for hash_for_each_safe which iterates over a
hashtable safe against removal of hash entry
Change-Id: I89d8b6520a4bee583d44a771b4359ed287d0c2fa
CRs-Fixed: 2528484
This reverts commit I010c9295fd6ca42a950f84f0d7a19b00d8b0c0da due to
crash caused by excessive logging.
Change-Id: I38701eb5be9a25f38e4cb5738824b635a2b0442c
CRs-Fixed: 2535471
This is a propagation of qcacld-2.0 commit 98821c7dcf49d ("qcacld-2.0:
Add CONFIG_MULTI_IF_LOG to support multi if log"). Add CONFIG_MULTI_IF_LOG
to support multi if log by assigning the specific netlink protocol
when dual wlan cards are loaded.
Change-Id: I827fbd46893c47ed2d9b123bf753c06b2e115fbb
CRs-Fixed: 2525488