WMI RX workqueue is created with WQ_MEM_RECLAIM flag. When host receives
the WMI service ready event it queues the work. There is 50sec delay in
scheduling workqueue to process WMI service ready event. This results in
host timeout (timeout = 15sec) and wifi load failure. This cleans up the
host data structures related to data path. But work got scheduled after
50sec resulting in init path handling with inconsistent data structures.
Use workqueue UNBOUND flag to create WMI RX workqueue. Works queued to
unbound workqueues are implicitly HIGHPRI and dispatched to unbound
workers as soon as resources are available.
Change-Id: I46eb0242ad88103268df99be9fd2e0759ebec4b2
CRs-Fixed: 2343181
Make ipa_owned bit common for TX and RX control block union
for MCL as it is used in qdf_nbuf_free API, which is used in
both TX and RX path to free skbs.
Change-Id: I3a4279d528a1b8a72a1ec307f1672efae84d2745
CRs-Fixed: 2353137
Currently qdf_mem contains a function, qdf_mem_validate_list_node(), for
validating a list node and ensuring it is currently part of a list.
Instead, abstract this function from qdf_mem, and move the definition to
qdf_list_node_in_any_list() in qdf_list. This is a more reasonable
location for the list-specific logic, and allows its reuse by other
callers.
Change-Id: I56a5d54e3c81470a111f168533faedf7fa525ff3
CRs-Fixed: 2359358
Currently, qdf_nbuf_map_check_for_leaks() logs the leak information
under spinlock before inducing a panic. This can cause a confusing false
positive panic upon releasing the spinlock if the logging took longer
than the spinlock timeout threshold. Since we already know we are going
to panic, panic under spinlock to ensure the panic message is always
appropriate.
Change-Id: Ib98b21e8feac0314b7c1f00f08b9e81112c4f2ba
CRs-Fixed: 2357806
Define qdf_aligned_mem_alloc_consistent() and qdf_aligned_malloc() which
allocates the memory and checks if allocated base address is aligned with
ring_base_align. If not, it frees the memory and re-allocates by adding
7 bytes to alloc_size and returns aligned address to the caller.
Change-Id: I412153c20e4e4566450b006356fe78d98f1fd3f0
Acked-by: Shashikala Prabhu <pshashik@codeaurora.org>
CRs-Fixed: 2336697
Typecast 'rowsize' to qdf_size_t, to avoid compiler error
'comparison of distinct pointer types lacks a cast'.
Change-Id: I29e05a1f0d165accf3bebefc0af2b9f97cac0f5d
CRs-Fixed: 2350601
Currently, if an uninitialized QDF mutex or spinlock is destroyed, the
issue is logged in dmesg. This has allowed multiple uninitialized
spinlock issues to merge into mainline and remain unnoticed for several
weeks. Instead, if an uninitialized lock is detected during destroy,
panic.
Change-Id: I929cfa3f295cb1e76634653bbd4aec3a6f1268b7
CRs-Fixed: 2347717
qdf set print verbose level is using pr_info to log debug logs
and pr_info logs are logged on console hence change pr_info
to pr_debug to avoid logging debug logs on console.
Change-Id: I43ccef244c9576483f1520c0a5027ac88e0cbb07
CRs-Fixed: 2342962
In case of 11w PMF tx frame, some target would dma write to this tx
buffer, it may cause smmu check fault.
Add a bi-direction map flag to mcl skb.cb[] for this special case.
Change-Id: I72a2c11abb9f3e7e8fb9c6f5290cd4f8d209b19a
CRs-Fixed: 2337204
NBUF alloc fail prints are flooding the console,
which is not allowing watchdog resetting to occur
ratelimit is added to reduce the print statements
flooding the console.
Change-Id: Ib6531070c8b80d64ffea62209912e5166e0414c1
One of the most common stability issues encountered by the stability
team is watchdog bite due to excessive logging. Add a feature to track
logging to dmesg using a tumbling window and counter, and panic if the
configured maximum number of logs for that window is exceeded.
Change-Id: If83c6dfccb9d191b02a3a7166b065c0a0704f969
CRs-Fixed: 2338385
For special packets DP tracing enable_check is called with
NULL nbuf, it returned false, preventing special packets from
logging. So ignore NULL nbuf and return true to enable DPT
logging.
Change-Id: Ieccc9e77195f5c8ff590c6964972705c362c16ba
CRs-Fixed: 2335301
Currently, the QDF debugfs feature returns a no-support error code for
the init call when the feature is compiled out. Instead, return success
to avoid wlan load failure on some configurations and to make error
checking by the caller more straight forward under all configurations.
The deinit call also has the same problem, but none of the callers pay
attention to the return status. Additionally, the deinit function
returns success unconditionally when the feature is compiled in.
Rather than changing the return status to success when the feature is
compiled out, change the return type of the deinit function to void.
Change-Id: Iac3a47505142e149f70c67c5ba6cf0b2428d9488
CRs-Fixed: 2336872
In addition to the other nbuf history events, track allocation failures.
This allows root causing issues due to nbuf exhaustion.
Change-Id: Ia0bbc6f12d26e32fcdb4cf7d0efef328417436ce
CRs-Fixed: 2329461
In preparation for QDF timer tracking, return QDF_STATUS from
qdf_timer_init(). This allows callers to handle the eventual possibility
of a QDF timer init failure.
Change-Id: I9da4643610099d32b002bda9218af26247a4edc6
CRs-Fixed: 2327724
In case of preallocation of nbufs, the debug nodes contain
allocation information with respect to the allocator
and not the user.
For more accurate debug info, add new QDF API
qdf_net_buf_debug_update_node to update the debug info
when the nbuf is requested.
Change-Id: Idfbcd15b6c561bbb57ba98a6b8376557ba909eec
CRs-Fixed: 2322989
Fix compilation error of implicit conversion from enumeration
type 'enum ipa_wlan_fw_ssr_event' to different enumeration type
'enum ipa_wlan_event' in function __qdf_to_ipa_wlan_event.
Change-Id: I7b5d3e964a5fa070a89aaf21bcb4ea2237a85a58
CRs-Fixed: 2324656
During FW rejuvenate, a message needs to be sent to
IPA driver to indicate of the event's occurrence.
Add a QDF abstraction for the FW rejuvenate event to
be sent as a message to IPA driver.
Change-Id: I3ffa220234f9690306c408a24ddd31ac94015124
CRs-Fixed: 2290656
Add timer to flush out log buffers periodically. Add command to set the
time period value.
Change-Id: I8e796a9bc7caac2661d00852420dd5fa66f5bca5
CRs-Fixed: 2296362
Move network buffer null check to beginning of function to
cover possible case of null pointer dereference during free.
Change-Id: I8c998d4d1711ab28c94a946d04314c26a4c74278
CRs-fixed: 2309452
This change defines VDEV MLME object, and registers with object manager to
be notified on creation/destroy, and also initializes MLME SM
Change-Id: I75bb7de7326e4bbed21ef9653427c4e0694c3ffc
CRs-Fixed: 2307722
This is generic state machine framework, which provides APIs for state
definition, state transition, event posting
Change-Id: Ie7d5a064967098fcb77a663047c479d1d1576595
CRs-Fixed: 2307722
Initialize packet pointer record is_free_pkt_ptr_record to false.
The code flow may not assign the pointer before usage.
Change-Id: I00a4dc0eaf7e426ce48ec746eba975b74d1fec34
CRs-Fixed: 2313459
Kernel 4.14 and later supports dev_scratch for network
buffer which can be used to store data in a nbuf in the
format unsigned long.
Add APIs:
1) qdf_nbuf_is_dev_scratch_supported
2) qdf_nbuf_get_dev_scratch
3) qdf_nbuf_set_dev_scratch
Change-Id: I2a72d369bb53f8f86d4bcee3cf6d13f5e4aff57f
CRs-Fixed: 2313270
Change log level for HE flags, HE data and HE MU info fields
added to radiotap header. Earlier log level of info used to
flood on console.
Change-Id: I7754df859bb315fff7e449e263e0d77cf412a852
CRs-Fixed: 2295965
EWMA macros which were used for sojourn stats
time delay calculation, causing compilation issue
for x86 platform as x86 platform is on kernel
version less than 4.3 and EWMA macros were
introduced after that version.
Change-Id: I184844c7df8e5b317a095355c2f6a9af9e4747ff
CRs-Fixed: 2308338
Put the nbuf map/unmap code under NBUF_MAP_UNMAP_DEBUG.
nbuf map/unmap debug will be enabled on WIN once
the nbuf map/unmap related false positives are fixed.
Change-Id: I6b62539d39664db3ff62411fe8632633f53488c8
CRs-Fixed: 2284128
In qdf_nbuf_alloc() function, pass function name and
line number of caller and log the same in case of failure,
this approach helps to remove error logs in caller function
there by reducing text segment.
Also add qdf_rl and qdf_rl_nofl_* macros.
Change-Id: Ib8ce83335807cfbd2d83d1f165d6bec1dc1e4c94
CRs-Fixed: 2281983
In qdf_mem_malloc() and qdf_mem_malloc_atomic(), pass function
name and line number, and log the same in case of failure, this
approach helps to remove error logs in caller function there by
reducing text segment.
Change-Id: Ia4586b112c6dd64aca5b397b43bb17499a0e6e30
CRs-Fixed: 2281983
The list APIs only provides the current size of the list.
In certain cases, to be able to decide if the queue is full
we can compare the current size with the max size of the list
and not attempt to add to the list at all.
Change-Id: Ic0844ae9fccd8bcc9603d31c41692680966e1753
CRs-Fixed:2304508
Add a flag packet_buff_pool in skb->cb to indicate
HTT packet pool buffer to use in case of HTT Rx ring
low memory scenario.
Set this flag for the buffers allocated for HTT packet pool.
Change-Id: I8e7c823f09aa8b7f686ee52f98f0984e542ff9fa
CRs-Fixed: 2301887
__pm_wakeup_event() was superseded in Linux kernel 4.12 by
pm_wakup_ws_event(). Add conditional compilation to use the new API as
appropriate.
Change-Id: I8f6ceb6de24e1ffcc909f9417595d29d50968ebc
CRs-Fixed: 2306603
Add API to query qdf debugfs buffer overflow.
Add support to dump log in different block sizes.
Change-Id: I3d5b63ef2f9b0eeb4df20dbb93a76f10ed10f556
CRs-Fixed: 2307897
This API makes the reuse of sk_buff possible, by resetting
it with the reserve and align arguments passed by the caller.
This brings back the skb to the original state as
returned by qdf_nbuf_alloc without allocating the skb again.
Change-Id: Idefcbd4be9fae5d140805d55207dec01bdc90237
CRs-Fixed: 2301899
1. Service ready ext includes a parameter for max
BSSID indicator.
2. Beacon template includes MBSSID IE offset.
3. Vdev create and up cmds include more parameters.
Change-Id: I71214eacdaa886725b7ea8f61db3a743ba6597e9
CRs-Fixed: 2306638
It won't report err status since if idr_find return NULL, which cause
unnecessary process with NULL pointer.
Change-Id: I5813ddca11172f75fb73c9530e003c50e55beba2
CRs-Fixed: 2275848
Add support for DP RX Threads as a part of the FR. Multiple RX
threads can be enabled from the ini. The code is added in a new DP
module outside of the cmn project.
Change-Id: Id966c46c2799d23c2a4fa1c884610955afed3565
CRs-Fixed: 2256470
Currently mtrace messages are getting recorded in circular
queue but are not getting used for DIAG Infrastructure.
Add support to print the mtrace messages on DIAG infrastructure in
format such that there will be two 32 bit fields printed on the
logs. These two fields will be constructed as explained below:
1. First field will be constructed using below bit positions:
a. Bit 0 – 14 ( 15 Bits Lsb ) will contain the messageIDs
b. The bit 15-22 will represent the destination module,
and the 23-30 will represent the source module which is
initiating the message.
c. Bit 31 will represent whether the message is from host
or from FW. If bit is 0, it indicates the message is
from host and if it is 1 it indicates the message is
from FW.
2. Second field will be constructed using below bit positions:
a. First 16 bits (From LSB )will be used for counter.
b. Next 8 bits would be the vdev id.
c. Remaining 8 bits are reserved for future use.
Here counter is static unsigned 16 bit value which will be
used to keep track of number of logs given to QXDM and out of
these logs how many logs have been missed.
Change-Id: I4cec762ef17222d6adda9fd3e283c101afb92955
CRs-Fixed: 2290898
Add a new logging trace level QDF_TRACE_LEVEL_TRACE for
automation scripts to process the logging.
A new logging Infrastructure is to be added where the newly
added logging level QDF_TRACE_LEVEL_TRACE will be used to
log in specific format and these logs will be used by
post processing script to figure out right FA or to figure
the module from where the path deviated. It will help out CST
to figure out the right FA if there are any issues in the driver.
Change-Id: I7b5772026e4fc2f8e5205663e9150c861b69fdfc
CRs-Fixed: 2290893