For cases where you want to create and immediately start a thread, the
Linux kernel has the kthread_run() API. Create a QDF wrapper for
kthread_run() as well as companion APIs for waiting for a thread to exit
and one to check if the current thread should exit.
Change-Id: Ia4e107010fc400f764661a9b36aceea970841ade
CRs-Fixed: 2270827
To convert ASCII hexa decimal character to unsigned value and similarly
to convert string of ASCII hexa decimal characters to array of decimal
values, there is need of QDF API.
Therfore, add QDF wrapper functions to kernel API hex_to_bin() and
hex2bin().
Change-Id: I4692961eeba9067f9b737f7deeefca397ff1a7bf
CRs-Fixed: 2274320
There is an invalid circular dependency of header files in the
driver. qdf_nbuf.h file includes itself as qdf_nbuf.h file
includes i_qdf_nbuf.h and i_qdf_nbuf.h again includes qdf_nbuf.h.
To resolve this issue, do not include qdf_nbuf.h in i_qdf_nbuf.h
Change-Id: I940321b23e95a81601657d149ff31826db2522ba
CRs-Fixed: 2267066
QDF_DEBUG_PANIC has recently gained a reason parameter. Move instance of
logging followed immediately by QDF_DEBUG_PANIC to single calls.
Change-Id: Ifc00be410621005e8494074ed00b1b7e44cc6a03
CRs-Fixed: 2271769
It causes kernel warning if remove an invalid id. So, verify id before
removing idr.
Change-Id: I22cd5753a6e4fae0087faaee1c722017523b311e
CRs-Fixed: 2271235
It is generally useful to log the reason for a panic at the time of
panic. The Linux panic API accepts a reason string, so to aid in moving
from panic() to QDF_DEBUG_PANIC(), add an optional reason parameter.
Change-Id: If4ed0e664f6b15deb4c6edf76bdc25f55ba82fac
CRs-Fixed: 2271764
During high TPUT scenario logging of DPT trace is not useful,
require more MIPS. Disable datapacket DPtrace logging during
TPUT runs, but contiue to log special packets like ARP/DHCP/ICMP etc..
Change-Id: I70c9368de4cb2423901449b267452a34d652213d
CRs-Fixed: 2255756
kcompactd consumes many CPU cycles without being successful
to make high-order page. One of the reason is WIFI driver is
allocating order-3 page a lot.
It shows 46% high-order allocation comes from WIFI driver.
Of course, it should be fixed in MM layer but it is never
easy stuff to fix in near future.
Regardless of MM changes, drivers should do best effort to reduce
high-order allocation, too.
This patch fixes the problem via not waking kcompactd.
Change-Id: I2bc3bf3ec96d32dd1a93c24edf2f590f331c0ed5
CRs-Fixed: 2265578
Currently, the APIs qdf_nbuf_set_rx_info and qdf_nbuf_get_rx_info
are no longer used in our driver code.
Cleanup the unused code for qdf_nbuf_set_rx_info and
qdf_nbuf_get_rx_info.
Change-Id: I57acbd4e5901d8922e3b650f0f3b57f056a0ae3e
CRs-Fixed: 2259212
In case where a qdf event was waiting and an SSR has occurred,
force_set flag is set for the event. After driver recovery is
complete the same event can be reset and re-used without
resetting this flag. This may cause a failure even after the
event was successfully completed.
Clear the force_set flag while resetting a qdf_event
Change-Id: Ia8cbc04776144d40e9c59fa339f8993fdbb73368
CRs-Fixed: 2264320
As WIN has multiple modules and QDF is the last one to be unloaded,
QDF is crashing when it tried to print the file name of an nbuf
allocated by other modules. To fix this, copy the file name in the
QDF nbuf tracker, rather than using the pointer to file name,
to avoid access to the invalid pointer.
CRs-Fixed: 2258770
Change-Id: I27ee76e58b0f5a976840783cfeba451784de85dd
Clean up excessive logging from target if and QDF to avoid spamming
kernel log buffers.
Change-Id: Ib81d6bb68bae9d5c477755b31dc20e10663147d5
CRs-Fixed: 2259283
qdf_debugfs_init needs to be rearranged for the debugfs to work for
memory tracking on WIN.
Change-Id: I660731a22368d34a1e4f8c29539fffd9731d02cc
CRs-Fixed: 2254297
Netlink service init and exit is invoked as part of wlan logging
init and exit during qdf module init and exit. This brings in a
hard dependency to enable and compile wlan logging service
even if not used.
Decouple netlink service and wlan logging service to remove
inter-dependency. WIN qdf module currently does not require wlan
logging to be enabled. This separation leads to bss savings in qdf
module.
Change-Id: Ib0afafd196106eba78ad9783eb1a6cece77c00fa
CRs-Fixed: 2258640
Add ol_txrx_completion_fp in ol_txrx_ops to provide support for
callback during TX completion.
Change-Id: I7af478636badd8f8562460cefaf5db56633df8e9
CRs-Fixed: 2253569
As CDS is not usable by WIN, add callbacks that are
registered in QDF and correct the module dependencies.
Also moves the platform related function to qdf_platform.[c|h]
Change-Id: I3080e9df86770235ff46237b8a2ffb9c2a3c9c2c
CRs-fixed: 2130260
Cancel broadcast of probe response if beacon is already sent
in beacon offload.
Change-Id: I4fea51433fbb959e05988c2daac89fbe839b1cdf
CRs-Fixed: 2209282
In low memory environments using GFP_KERNEL flag may cause
scheduler thread to sleep. Scheduler thread callback handlers
are expected to be atomic in nature to ensure timely execution
of different commands. Move all allocations done by scan module
in scheduler thread context to atomic allocation.
Change-Id: Iee3eafbc00a3afea0687ba67b3041ec0816094cc
CRs-Fixed: 2232553
For kernel v3.17 and above, timekeeping.h is included for
some kernel APIs such as ktime_get() but for versions prior to 3.17,
the above APIs are present in hrtimer.h.
To accommodate the usage of these APIs for older kernel versions,
include <linux/hrtimer.h> into this file for kernel versions
lower than 3.17
Change-Id: I445a1673d9067a2dd47045d6c48d73aaa239790e
CRs-Fixed: 2252563
This change adds timestamp information for every memory
allocated and mapped for debugging purposes.
Change-Id: Iba8e720790b863ae11c528a02f5c32ea606560dd
CRs-Fixed: 2236213
In hdd_tx_timeout(), null nbuf is passed to qdf_dp_trace(). This
results a null pointer dereference when getting data buffer.
Since data buffer is not mandory for qdf_dp_add_record(), add null
nbuf check in qdf_dp_trace().
Change-Id: If5fb4753d382d8f29bdf4d934a7910a28a7c76aa
CRs-Fixed: 2244543
qdf_defer contains backwards compatibility code for Linux kernel
versions <=2.6.19. At the time of writing, this version is 12 years
old. Remove backward compatibility for kernel versions <=2.6.19 from
qdf_defer.
Change-Id: I623aa5b1ed597c76997bf397d9f2114cdf8c5ece
CRs-Fixed: 2247714
Function qdf_trace_register() parameter module_iD has (probably
unintentional) mixed-case which violates the coding standard, so
change it to all lower case.
Change-Id: Ic2f5b76a8adb178411e3b3ac18ef4009d168a664
CRs-Fixed: 2245197
IPA driver adds unified WDI API for ipa_wdi_create_smmu_mapping
and ipa_wdi_release_smmu_mapping. WLAN driver needs to adopt the
change accordingly.
Change-Id: Ibbf10e4beb579a6a3d3e6b0e8e6d2c853f7e629a
CRs-Fixed: 2238493
TX packet records in DPTRACE logs for debugfs do
not contain msdu id, while QXDM logs do contain them.
Add msdu id of packets in the DPTRACE records for
debugfs.
Change-Id: Id3f6c21d95221cd5444327189b803ac857d56525
CRs-Fixed: 2242178
Add prints to track:
* Incoming TLVs in the monitor mode status ring.
* HE, HE-MU and HE-MU-Other values being passed to the
stack.
Change-Id: Ib23336353dc4a2253a62444b767d2a706ce372ea
CRs-Fixed: 2242514
Address the following issues in the qdf folder:
CHECK: 'arguement' may be misspelled - perhaps 'argument'?
CHECK: 'Arguement' may be misspelled - perhaps 'Argument'?
CHECK: 'continous' may be misspelled - perhaps 'continuous'?
- (actually 'contiguous')
CHECK: 'implentation' may be misspelled - perhaps 'implementation'?
CHECK: 'Initilize' may be misspelled - perhaps 'Initialize'?
CHECK: 'occurance' may be misspelled - perhaps 'occurrence'?
CHECK: 'untill' may be misspelled - perhaps 'until'?
Change-Id: I4ea13e1a6b1490082830ed67098ff174a162114b
CRs-Fixed: 2241580
It is sometimes useful to reverse map an errno into a QDF_STATUS. For
this purpose, introduce qdf_status_from_os_return(), the logical inverse
operation of qdf_status_to_os_return().
Change-Id: I053f43867ef603c2654eca64fe76c7bd313e14e4
CRs-Fixed: 2242664
In P2P ROC and MGMT tx cases, it use kernel address as cookie and
provides to userspace. Which has security risk. Add QDF API for ID
allocation and map ID to pointer, provides ID to userspace instead
of kernel address.
Change-Id: I4e10109988391474722df5b251fab11a87c7992b
CRs-Fixed: 2237756
In qdf_trace_hex_dump() API, linebuf array is not initialized where
it is used to print in the form of string in qdf_trace_msg() API,
this may cause information leak.
To address this issue, initialize the linebuf array to zero.
Change-Id: If2fe200eb16b28f7fff4413873c1d149716fb1a7
CRs-Fixed: 2232012
nbuf map tracking requires a bit of metadata which is currently
allocated dynamically for each mapping request. Change these allocations
to use a qdf_flex_mem pool instead, amortizing each physical allocation
over many mapping requests. This reduces the runtime overhead of the
nbuf map tracking feature, and provides significant memory savings when
MEMORY_DEBUG is also enabled.
Change-Id: Ieef9b996edab135cc2e0252c3a59cb6876f36371
CRs-Fixed: 2232113
Add the ability to prevent qdf_flex_mem_pool from freeing memory
segments unless there are more than some minimum number in the pool
already.
Change-Id: I20bde2ed629b97924ea71b4f7f46a2c1fc1bab28
CRs-Fixed: 2229511
In qdf_trace_msg_cmn() the VERBOSE_STR array is used to convert
a trace level into a string. This array is missing an entry for
QDF_TRACE_LEVEL_ALL, so add it.
Change-Id: Iee6337cda7e54c429d36b2fd42bbd0c143c7d5a5
CRs-Fixed: 2232820
timekeeping.h is available from kernel version 3.17. Add header
inclusion and ktime_get_boot_ns call under correct version check flag.
Change-Id: I2a1a127e1716b52af56d14c39e2e646e34b05fa3
CRs-Fixed: 2230949