As part of new kernels it is suggested to move to the upstreamed
wakelock apis for registration and unregistration.
Change-Id: I80b8dd85c6ad1b50951fff9da810e8e96a402752
CRs-Fixed: 2658888
This is to enhance statics for runtime put/get, which is
to detect if there is mismatch for usage_count.
Change-Id: I24cddb9d10e4cb675c8375cbd0f589c7718bd680
CRs-Fixed: 2647972
As part of new kernels it is suggested to move to the upstreamed
wakelock apis for registration and unregistration.
Change-Id: Icc2bdeb6201fc65d351f75c5b49968fd23e2bba8
CRs-Fixed: 2639311
Notifier chains are simple function list executed when an event
occurs. In qdf block and atomic notifier chains are defined.
Blocking notifier chains can be used to invoke a list of functions
based on event in a process context wherein atomic notifier chain
can be used in an interrupt context.
Change-Id: I9020b9f19915e084b017932fb6d0bfad792d745c
CRs-Fixed: 2648224
Currently qdf mc timer stop api updates mc timer state
to QDF_TIMER_STATE_STOPPED before it deletes the timer which
may lead to race condition where if any other thread tries to
read the state of the timer and re-start the timer considering
it is stopped which may get deleted after that.
To address above issue, update the timer state after timer
delete.
Change-Id: I302b89bdedf23f8277eacb6d42b5bd8e6daa4d05
CRs-Fixed: 2643254
Add qdf API support to check if the packet should be
tracked as per the configured protocol types.
Change-Id: Ia9e937865d3d440f1350307a67e32b20ea218e54
CRs-Fixed: 2642156
Per HW team's analysis, we find a TXDMA HW limitation:
ADDR0&0x1FFFFFFF8 should not equal ADDR1&0x1FFFFFFF8.
Otherwise, TXDMA will run into exception, which cause TX fail.
ADDR0: the address of last words in previous buffer;
ADDR1: the address of first words in next buffer;
We hit this limitation in NAT forward TSO jumbo case whose buffer
address of two fragments like below:
tso_frags = (
(length = 0x42, vaddr = 0xFFFFFFD0F5FA2F82, paddr = 0x1F5FA2F82),
(length = 0x05A8, vaddr = 0xFFFFFFD0F5FA2FC4, paddr = 0x1F5FA2FC4)
In this case, ADDR0 = 0x1F5FA2F82 + 0x42 -2 = 0x1F5FA2FC2,
ADDR1 = 0x1F5FA2FC4, then
ADDR0&0x1FFFFFFF8 = ADDR1&0x1FFFFFFF8.
To avoid this, shift server bytes for ADDR0.
Change-Id: Ib09afd7e4c14a33bb5347c68b602b360a9e36619
CRs-Fixed: 2585868
Stream file system is wrapper for Relayfs - a Linux specific feature,
which provides efficient method to indicate data to user space. It
depends on qdf debugfs APIs. This feature is protected with
compilation flags WLAN_STREAMFS and WLAN_DEBUGFS.
Change-Id: I1401112ece290e6d0560623cf10faaf498ebb1b7
CRs-Fixed: 2635481
qdf_runtime_lock_deinit() is currently using the lock blindly without
checking if it is null. Add a null check to prevent it from using a
null pointer.
Change-Id: I3aa13c436f3668de7b1070c2c40bc69c7a4cc9fc
CRs-Fixed: 2642914
asm/dma-iommu.h file is removed in latest 5.4 kernel,
resulting in include failure. Remove as it is unused.
Change-Id: I9eac7bee5a9a8d5da21d15c2f7d8f3fc4fbe00df
CRs-Fixed: 2638583
For monitor mode update radiotap he flags logs are
flooding the driver logs as update of radio tap header
is done for each msdu. So rate limit the logs to reduce
excessive logging.
Change-Id: Ica75ccf98afc069b80fe6c75b3d9b04815c82ced
CRs-Fixed: 2644241
Modify the qdf_get_pkt_type_string API to return
the packet type in case the packet does not fall
under the tracked packet subtypes and also increase
the rate limit values for EAPOL and DHCP packets.
Change-Id: Ie9681be64572346a09529043ef38dd57338700bb
CRs-Fixed: 2636540
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