Due to a limitation in the memory leak detection logic when qdf_flex_mem
was written, qdf_flex_mem_release() was necessary to free any
dynamically allocated memory in the qdf_flex_mem_pool during certain
points in the WLAN driver lifecycle. This was done to avoid flagging any
dynamically allocated qdf_flex_mem_segments as false positive leaks
when the memory domains were changed and leak checking was performed.
With the introduction of qdf_talloc(), this workaround is no longer
required. Replace the calls to qdf_mem_malloc/free with qdf_talloc/free,
and remove qdf_flex_mem_release() altogether.
Change-Id: Ia5fd21386b94fc117af5f27853db5d8341601738
CRs-Fixed: 2404955
qdf_timer_t has repeatedly been identified as a problem area by Control-
Flow Integrity (CFI) analysis. This is because qdf_timer_init casts the
callback from a signature taking a "void *" into one which takes an
"unsigned long." While this "works," it is technically undefined
behavior, and CFI is correct in flagging it. Unfortunately, CFI
indicates the issue is with the callbacks themselves, which is incorrect.
Using unsigned long as the callback parameter has a number serious
drawbacks. Most significant is the fact that pointer size is not
guaranteed to be the same size as an unsigned long on platforms other
than Linux. For example, this is not the case on 64 bit Windows. As QDF
is supposed to be a platform abstraction, it cannot use unsigned longs
for memory addresses.
Instead of casting the timer callback in qdf_timer_init, use a callback
shim which takes an unsigned long, and handles the appropriate
conversions needed to call the actual callback function.
Change-Id: Id9149169f35f619f649934310a2a673a685690f0
CRs-Fixed: 2403021
Change API signature for dp_getrateindex to populate rate index
and add additional stats required for RDK.
Add QDF abstraction for EWMA average rssi
CRs-Fixed: 2397918
Change-Id: Id878971799c5df2ae60057a86b2769724ee0dcc5
A common pattern in WLAN to panic the driver is to log the reason and
then unconditionally panic. QDF_DEBUG_PANIC() takes a reason string to
help make the reason for the panic more obvious, but it is not always
used. Ensure all callers of QDF_DEBUG_PANIC() provide a reason string.
Additionally, make the reason string parameter of QDF_DEBUG_PANIC()
mandatory.
Change-Id: Ia3c7acfe590f7f465823fff3f2393653b2d20fe5
CRs-Fixed: 2403830
Remove CONFIG_MCL and include the header file for both MCL and
WIN code since this feature is already handled by the feature macro
FEATURE_WLAN_DIAG_SUPPORT.
Change-Id: I4d4ed46ed5cb62950bb8b25af0a173bfe5f86474
CRs-Fixed: 2399386
Reduced VDEV SM debug level, and added prints for state abd substates at
event handling API
Change-Id: I3076c590131581a8728548592e0a9b4e66db377e
CRs-Fixed: 2394012
This reverts change Id9c29413ca0d21533a0afae245595051fa3a400f. This
change was a work around to allow compiling against legacy code. Now
that these compilation issues have been resolved, remove the work
around.
Change-Id: I38a474f50076320cf961d6fd340960e4c9b148a0
CRs-Fixed: 2401315
The non debug version of qdf_mem_malloc logs
allocation failures at WARN trace level
and the debug version uses ERROR trace level.
Also the default log level for QDF component is set to ERROR,
so with this, for failures in the non debug version
of qdf_mem_malloc, we would not see any logs.
Changing the log level to ERROR for failures logs in
the non debug version of qdf_mem_malloc.
Change-Id: I1e28cddfac8f909dec6e3bf6c3beb368953cd357
CRs-Fixed: 2397096
QDF_STATUS is defined in qdf_status, but related APIs
qdf_status_to_os_return() and qdf_status_from_os_return() are defined
in qdf_util. Create a new file, qdf_status.c, and move these functions
there instead.
Change-Id: Iaa2efa5f662be014a61a8490c3fab411ec0f2054
CRs-Fixed: 2395178
Currently, QDF tracks nbuf reference of only TSO packets.
Remove the TSO check to extend the supprt to all the packets.
This will help in tracking enhanced multicast packets.
Change-Id: Iacf7d4fc0492470d405d9644d480ad9463bcb543
CRs-Fixed: 2384334
The qdf_timer_multiplier is currently applied to qdf_mc_timer and
qdf_event. In addition to these cases, also apply qdf_timer_multiplier
to qdf_timer to enable more debugging scenarios.
Change-Id: Ie3bd340dd2e8f1bec7e5bfa7ec3f0d0ceaa32e6d
CRs-Fixed: 2393017
There is a compilation issue if a variable is passed to
kernel api DECLARE_HASHTABLE.
TO resolve this issue, instead of passing a variable
pass a constant to DECLARE_HASHTABLE.
Change-Id: Ie9782af541bb34cc50f79060b0007dc73881e5f4
CRs-Fixed: 2386893
There are some changes to timer APIs in latest kernel,
update driver APIs accordingly to invoke correct kernel
APIs for timer functionalities.
Change-Id: Ie017c8b1ef8237ca34f696c23509519a1187167c
CRs-fixed: 2383574
With the changes made in Ibe0f8adc4df7bb98aceb509d438e241fac507393 and
Ic4cef0d6301230197443d4d5247188f2af643674 there are compilation issues
with converged code.
Resolve the issues by creating ifdefs for the timer_list definitions
according to kernel version.
Change-Id: Id9c29413ca0d21533a0afae245595051fa3a400f
CRs-Fixed: 2390884
The various setup_*_timer() APIs were removed from the linux kernel in
4.15, and replaced with similar timer_setup_*() APIs. Add conditional
compilation to qdf_timer to use the correct APIs depending on the
version of the kernel being compiled against.
Change-Id: Ibe0f8adc4df7bb98aceb509d438e241fac507393
CRs-Fixed: 2388570
There are a number of places where the kernel's timer_list type has been
used in conjunction with qdf_timer APIs. To prevent reintroduction of
similar issues in the future, do not directly alias qdf_timer_t to
timer_list.
See also: I410b7fafad18be01141008b6220fbe34ab07601e
Change-Id: Ic4cef0d6301230197443d4d5247188f2af643674
CRs-Fixed: 2388595
os_timer_t is a legacy wrapper around the kernel's timer_list type, and
is incorrectly used directly with qdf_timer APIs. Remove os_timer_t,
replacing instances with qdf_timer_t instead.
Change-Id: I410b7fafad18be01141008b6220fbe34ab07601e
CRs-Fixed: 2388575
Remove CONFIG_MCL flag for hif_bus_id in __qdf_device since
it can be shared by WIN and MCL.
Change-Id: I0f88aae7f3139485b99a029fa4f53d848875b0ac
CRs-Fixed: 2368166
Enable printing of QDF prints for QDF_TRACE_PRINT_ENABLE flag
irrespective of the flags WLAN_DEBUG and DEBUG.
Change-Id: I0b53d1759c3d38321d66bec325b855eb1e48e75a
CRs-Fixed: 2355333
Change default log level of serialization to QDF_TRACE_LEVEL_ERROR
Change error print to debug, when pending queue is empty,
which is a possible expected case.
Change-Id: I21cd6b5f158d5dffbc6e7309c9202e7e2e0162e8
CRs-Fixed: 2387017
To enable all the Spectral fatal and error logs by default,
set its default trace level to QDF_TRACE_LEVEL_ERROR.
Change-Id: I05d958f2206684f0e413e4e9a5576a96b228ddcd
CRs-Fixed: 2384360
Add mlme message queue handler as the call back for non scan commands
getting activated in the scheduler context.
Add cmd already exists enum to be returned if the command already exists
in the serialization queue.
Change-Id: I24fe453ffddbd4341459874458f11688adebc740
CRs-Fixed: 2377219
The network buffer (nbuf) history records the usual nbuf allocations
and frees, but does not record allocations due to copies or clones.
Record these allocations in the nbuf history as well to aid in
debugging.
Change-Id: If5bed9a41d301d43a1e610df4366d0bcf2c3efc4
CRs-Fixed: 2379866
Some compilers allow functions to be annotated such that a warning will
be emitted if the return value of that function is not used. Allow the
WLAN driver to leverage these annotations by introducing a wrapper in
QDF, qdf_must_check.
Change-Id: I9c1328ae904857717703aae3748b207967a8dd3d
CRs-Fixed: 2382837
To align with the converged nomenclature replace the identifier
session_id with vdev_id in qdf_trace APIs.
Change-Id: Ic97a2df848e2b687edbd29c419193f4285125f81
CRs-Fixed: 2381424
In function qdf_trace_msg_cmn va_end is called without va_start.
This can lead to delay in driver logging.
Change-Id: I9d2c9893037f5836cf902e6e311a0a521b8389e0
CRs-Fixed: 2373637
According to the ucode and mac team, the new TB-PPDU (UL OFDMA
Dat frame) from any other users using the TLV's fields below:
* PHYRX_RSSI_LEGACY (has a reception type field that is
set to UL-MU)
* PHYRX_RSSI_HT
* PHYRX_COMMON_USER_INFO (has a reception type field that is
set to UL-MU)
* PHYRX_USER_INFO (has more detailed modulation info)
* PHYRX_USER_INFO (Could be more than one)
...
* PHYRX_DATA
* PHYRX_DATA (Could be more than one)
CRs-Fixed: 2329959
Change-Id: Ib5fa1734a5525d2b2d1db8756166f259be30b9c0
This change will resolve displaying NSS value
in stats in case of HT. And also it will give
proper NSS value to calculate rate value. Modify MCS
value to match with Tx stats from firmware.
Also retain original MCS value to use in radiotap code
for HT case.
Change-Id: I4dad068262a5e9188a5935db6b2cbf8d14138e7e
Add QDF abstraction macro to read ipa wdi out structure param
is over gsi member.
Change-Id: I48c848b432168cba46ded985023291077488b2be
CRs-Fixed: 2367310
Add peer_id and msdu_len in qdf_nbuf_cb these
fields are used for lithium rx performance
optimization
Change-Id: Iba291812397a5e7648953c2dc1b2c18a5c5a18af
As part of supporting NAN DBS, new WMI TLVs are defined so
that Host can maintain the status of NAN Discovery in sync
with the Firmware. Move the older handlers into the NAN
related files. Also add modules to extract information from
the new TLV's and fill up the event parameters to pass
them to the NAN component. add support for explicitly
disabling NAN due to concurrencies.
Add modules to handle and extract the info from NAN events.
Change-Id: Ic03baaaef45106353c211a813e11e33a90cd41ca
CRs-Fixed: 2338059
The IPv6 address format allows compression of _one_ or more zero hextets
using "::". However, the current implementation accepts _zero_ or more
zero hextets as valid. Adjust the minimum required hextets for a zero
compression to 1 from 0.
Change-Id: Ibdf406b04bbdc44d4a28fafa6179c104285c915c
CRs-Fixed: 2362739
Currently there is only tso segment and tso number segment
descriptor free operation when tso preparation failed, do dma
unmap for each segment as well.
Change-Id: I9a507f27341877dc062528ce77e02970d16aa098
CRs-Fixed: 2347279
Add support to dump only last n dpt records of debug fs
dump_set_dpt_logs file.
Change-Id: Ic6418803d53cc2abbfc200f62df2a24c3bc55d54
CRs-Fixed: 2362523
Add APIs for t(ree) alloc(ated) memory management.
These APIs allocate memory like malloc, but track those allocations via
a parent-child relationship, or tree. If the parent is freed while it
still has children, a panic will be triggered. This effectively gives
you the ability to limit the lifetime of an allocation by ensuring the
child allocation lifetime will be strictly less than the parent
allocation lifetime.
Change-Id: I6308c96061e125b2e5a9c424ec2d2298c1c503ab
CRs-Fixed: 2359469
Add a thin wrapper in QDF around the kernel hashtable implementation.
Additionally, add basic unit tests for these APIs.
Change-Id: I07999e5fc8116e67b3850b866ced20af64342055
CRs-Fixed: 2359335
Add unit tests for the following parsing function in QDF:
* qdf_int32_parse()
* qdf_int64_parse()
* qdf_uint32_parse()
* qdf_uint64_parse()
Change-Id: I43d162d008910396df051dd18e7a1ab7fede657a
CRs-Fixed: 2362740
When MEMORY_DEBUG is enabled on WIN, it is reporting qdf_aligned_malloc_fl
as an unknown symbol. qdf_aligned_malloc_fl is defined under
MEMORY_DEBUG flag but its prototype is exposed globally.
Make this function definition available globally to fix the issue.
Change-Id: Ieb002bb892d6f3d525409fc9c3a6b2fa71ceebd8
CRs-Fixed: 2357476
qdf_mem_shared_mem_alloc invokes qdf_mem_dma_get_sgtable which will alloc
memory.
This memory should be free in qdf_mem_shared_mem_free by sg_free_table.
Change-Id: I3ad4bd2ff7a80d4051f15dcb04e0265707c2712d
CRs-Fixed: 2131270
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