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
The libc implementations of QDF were originally intended to be used for
off-target unit testing purposes. However, doing this involved
reimplementing large sections of QDF. Instead, unit testing is being
done in an emulator, which provides many of the benefits of off-target
testing without needing to reimplement any logic. As such, remove the
libc folder from QDF.
Change-Id: I829b4cae3f7bad7b24c97ed458e978eab2b0fbbd
CRs-Fixed: 2359499
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
Add TDLS device mode to get the nss chains shift params
and store the ini and dynamic nss config in vdev.
Change-Id: Ia2f3dba1860eda23018e6b930866931886834879
CRs-Fixed: 2349203
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
It is often useful to print the human readable version of an operating
mode in a log message or some other user-facing string. Add a function
for mapping QDF_OPMODE to human readable strings, qdf_opmode_str(), in
QDF such that various consumers do not have to implement it themselves.
Change-Id: I8756fb2ea97b3b8c7af2633b07694ad1e74d6d3e
CRs-Fixed: 2331888
Compiler throws no previous prototype build error for cpuhp
on UP system.
Fix is to add static inline for UP build.
Change-Id: Ib867a19ac526b44766a8cbb1838e7e5b2b18b4b1
CRs-Fixed: 2328927
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
Add new qdf API: qdf_is_recovering and
qdf_register_recovering_state_query_callback.
Client driver will register the state query callback
to common driver to report the recovering state.
Regulatory skip the chanlist update event during SSR
to keep the current regulatory setting.
Change-Id: I58e503cce162a0351d566148c1897a5012889c62
CRs-Fixed: 2321820
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
Instead of frame control info valid parameter data sequence
control parameter was passed, corrected it
Change-Id: Iccaeb286c1003cbb58c5ebcacf4b0d99c979cbbc
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 qdf_platform source file to qdf/Kbuild and
clean-up WAR introduced in change
I8172f3dbe0716be24a4dda739afb49f94528a4f6
Change-Id: Icb76d53544590b8bcace275ef52870606fb5d826
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
Use QDF_TRACE log macro to log spin lock abuse when spin lock
debug feature is defined.
Change-Id: I1e5db79f5e6f5fc343f1be000efff6907c4857e1
CRs-Fixed: 2312614
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
For qdf_mtrace 15 bits are reserved for message id and currently
WMI message IDs are getting used as 32 bit IDs.
Write a wrapper function which accepts 32 bit message IDs and
converts this 32 bit message id to 15 bit by extracting
WMI_GRP_ID and WMI_MESSAGE_ID in that group. New 15 bit
message ID for qdf_mtrace will be constucted as 8 bits
(From LSB) specifies the WMI_GRP_ID and remaining 7 bits
specifies the actual WMI command. With this notation there
can be maximum 256 groups and each group can have max 128
commands which can be supported.
Change-Id: Ia5adfc079b63c2311bdc8ae4c73488d89afd462f
CRs-Fixed: 2298877
Currently qdf_mtrace is defined outside TRACE_RECORD macro which
is using qdf_trace api and this is defined inside TRACE_RECORD
macro for MCL. since qdf_trace is having different definitions
for MCL and WIN as for MCL it is defined as a function and for
WIN it is defined as a MACRO.
To resolve this put qdf_mtrace inside TRACE_RECORD macro
Change-Id: I5de2cdff3942ca10b6d5d562f28d359f7f655ed4
CRs-Fixed: 2310167
Set monitor direct filter when smart monitor is
enabled. Deliver header from NAC if md bit is set
and smart mesh feature is used.
Change-Id: If1ef865e013c21bbb58bcb89a87856b12d6c7278
Crs-fixed: 2246660
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
To help triage issues where the scheduler thread is processing slowly,
add a scheduler processing history for offline analysis. This can also
be useful in determining if a processing delay in some operation is
attributed to the scheduler thread or not.
Change-Id: Icfea17efc34b2a23d4f8b2baebe08db4e2f6ce8b
CRs-Fixed: 2307252
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