Add QDF infra for minidump feature and define the
minidump_log and minidump_remove functions.
Change-Id: I875b991b7a7d9295f8b2acd95a7551a747ec962c
CRs-Fixed: 2856193
INI parameters parsing can fail because of fail to read INI file or
failed to parse at least one parameter. In some scenarios, driver should
assert if parsing is failed for atleast one INI parameter.
To differentiate these two failures, return different error status
values.
Change-Id: I187d2b2e8f55af47a14561302d8b62e84de7da5a
CRs-Fixed: 2878966
Currently the return type of qdf_queue_work is void,
whereas queue_work return type is bool denoting the status,
so changing the return type of qdf_queue_work to bool,
helps to check the status of the function.
Change-Id: Ifd07923a18641790314b88d38a7eba2a73e498b3
CRs-Fixed: 2876197
Function qdf_debugfs_create_entry's last parameter should be
qdf_file_ops_t, not qdf_file_ops_t *.
Change-Id: I847a05b81944562808c29a42b176c822639509ba
CRs-Fixed: 2864863
1 Add protection for wrap around of jiffies.
2 fix assign issue from uint32_t to uint64_t.
Change-Id: Idbd3604d0cb985d08aa82e3b1d7f32fa6be8c3ef
CRs-Fixed: 2864737
The current print rate limiting for prints to console is
for all contexts.
There are some debug prints which come to console via work queues
which we don't want to rate limit and only rate limit coming via
interrupt context or bottom halves which causes
FW backpressure due to excessive prints.
So rate limit prints coming to console if in
interrupt context or bottom halves
CRs-Fixed: 2853590
Change-Id: I867b2c0d17b54037ee45eb6b7871a16c2668d7ba
The qdf_in_interrupt API was defined in the internal
Linux util file.
Move the API from internal to qdf_util.h and provide
the appropriate abstraction
CRs-Fixed: 2853590
Change-Id: I512155776275684223c1901d789853d2529fcc83
Use non-inline OS-abstraction APIs to avoid OS APIs usage directly in
driver.
Add new non-inline OS-abstraction APIs.
CRs-Fixed: 2742480
Change-Id: I177b41d69ca8f102fa67316d8901b6991dea3203
Return proper value of qdf timer multiplier based on this
Kbuild option QDF_TIMER_MULTIPLIER_FRAC.
Change-Id: I10c08ba900aad49fb9134d2e4d337f04a19dec7b
CRs-Fixed: 2855512
The prints from the driver are rate limited based on the
configurations provided.
Also the prints which are redirected to user space daemon
and of certain log levels are also printed on the console.
Add a rate limiting version of the API for the prints coming
to console via the logging daemon.
CRs-Fixed: 2853590
Change-Id: I9683172ac0665b46581bad13a1050c6d70d72b5c
spin_is_locked() provided by kernel has statement that we should not
rely heavily on the return value, it only tells that the spinlock is
seen to be locked, not that it is locked on your CPU.
Further, on CONFIG_SMP=n builds with CONFIG_DEBUG_SPINLOCK=n, the
return value is always 0.
So we should not use QDF_BUG to test/assert its return value, only be
used for debugging purpose.
Change-Id: I76765f567abf333ab6fa0d7c7c73f7c263e18495
CRs-Fixed: 2846186
Currently if the driver is in runtime suspend/suspending
state, any packet transmission will request for resume
via hif_pm_runtime_get.
Unfortunately there is a logging in the above API which
will lead to more time consumption in the NET_TX softirq
context. This can lead to other delay in processing other
softirqs in the system.
Fix this by skipping the logging in the packet transmission
path.
Change-Id: Icc9f5b67794f7666243eb059f2e07a06a987002e
CRs-Fixed: 2844126
QDF per packet proto log level is set to debug due to
which the info is not logged to console.
Fix is to change QDF per packet proto log level to info.
Change-Id: I64b6d577475ea6133ec0565ae459629b81c0929c
CRs-Fixed: 2847863
During nbuf free if entry is not found in debug tracker list
it is treated as double free or unallocated buffer free
which is not correct because there is possibility of nbuf
entry not being present in debug tracker list due to memory
allocation failures for tracker nodes in system low memory state.
Maintaian counter for nbuf debug tracker node memory
allocation failures, during nbuf free if entry is not found
in debug tracker list and tracker memory allocation failures
are present then don't raise issue for nbuf free.
Change-Id: I770cfc23bad35af7e7dbec34852a31cc68300ca5
CRs-Fixed: 2844059
Do not allocate memory if the ask is larger than the
maximum memory allowed for malloc. We have it limited to 4MB.
CRs-Fixed: 2828104
Change-Id: I5b463dd8eb640c76882653e82e6f6db7cb651cf2
During TCP Tx traffic account for the Tx nbuf memory mapped
and unmapped in the driver.
Change-Id: I40df92f124eec94f2fa3ddc8bcd910615f4539bf
CRs-Fixed: 2831015
Current Linux version of qdf_snprintf() doesn't pass the additional
arguments(...) to snprintf(). As a result, the behavior is undefined.
Fix it by passing the additional arguments as a variable-argument-list to
vsnprintf().
Change-Id: Iea8ee0737907eaaea2df99631316d7d45a8e562f
CRs-Fixed: 2838962
Introduce proper logging APIs for diag module and also rate limit error
logs when skb allocation fails in low memory conditions to avoid excessive
logging side effects
Change-Id: Ia41ff7cfd526180825df61a43f1f59163947f257
CRs-Fixed: 2836681
The current timer modification API does not return the status
of the underlying OS specific API.
The return status of the underlying API could be useful
to detect if the timer was modified even before the timer
has expired before the last update to the timer.
Update the API to return the status of the underlying API.
CRs-Fixed: 2835319
Change-Id: Ieade0ff82386f959d7f29264a25b75a96a72e644
Add new wrapper to get the bus specific register information via
the bus driver.
Change-Id: I544b23c8f6654e9215fb4f03203d6754c766dada
CRs-Fixed: 2833251
Whenever driver does a recovery because of the bus failure the
reason for the recovery is not known until the reason code is
read in the hif layer. So, update the recovery reason if there
is a bus id read failure in the hif.
Change-Id: I5ed6adc92ef2a94a031f682e5ffd17af9ac6893d
CRs-Fixed: 2833247
The QDF_GET_BITS is only applicable to the 32 bits. Add 64 bits version
QDF_GET_BITS64 to support 64bits operation.
Change-Id: Iaa40c5c52e259cd14358162f2b193fcbe257e319
CRs-Fixed: 2828527
The existing QDF implementation does the following
1. The QDF trace either prints to the console
2. The QDF trace message is directed to the utils,
which based on log level
a. redirects to a user space daemon or
b. redirects to console
There is excessive logging detection in the utils code
before redirecting the prints to the console.
If the number of prints to console is more than
the configured threshold, we assert in development builds.
Moving the API for excessive logging detection from utils to
QDF trace.
The configuration for detection of excessive logging currently
is only for the number of prints per second.
Adding time configuration also to detection of excess logging
to the console.
CRs-Fixed: 2809752
Change-Id: Iecc408fc9b576fa900a6d7ee793639f1dde3110d
Add cache invalidation support for for MIPS platforms. The API
on mips platform takes start and size as input. Obtain size by
subtracting end and start.
Change-Id: Iaf2920b8fed2b2a2870682c6bf75c905cb8ca836
The function qdf_ini_parse returns QDF_STATUS as SUCCESS even if no
fields are read from the ini file. Because of this even if the
ini file is corrupted and no values are read from it the function
still returns SUCCESS.
So, to avoid that and ensure that the ini file is not corrupted,
add a variable ini_read_count to count the number of fields read
from the ini file and return SUCCESS only if its value is not zero.
Change-Id: I5ec9a9cdc9780b6c9487f6ac64b411b81328d75c
CRs-Fixed: 2804937
In monitor mode and other monitor mode features such as
smart monitor, in certain cases, Ex LM profiles there is not
enough headroom to fill radiotap. In this case frame is dropped.
The prints if error type floods and causes backpressure.
Hence change the print to debug only.
Change-Id: I7c0f786848237aaebba6f3282b9d82f0ef5d3f7b
Upper layer (OS_IF) can mark certain packets to be sent
to FW. Mark such packets as exception, so that it is sent
to the FW.
Change-Id: I44af2b06793712be7236f831b6b2604123d72bb1
CRs-Fixed: 2813172
The TX notify comp flag is used only by MCL, hence moving
to the MCL this field to the MCL specific cb private structure.
Change-Id: I707ab9252dea705552df9678eedd8501f479672e
Add sysfs node for DP level memory stats:
/sys/kernel/wifi/wlan/wlan_dp_mem_stats
These include Tx, Rx SKB memory allocated, Tx/Rx
buffer count, outstanding Tx desc count.
Add and subtract the skb memory for Rx/Tx when
the map/unmap functions are invoked.
Change-Id: If62cc47bb60f7eb63f60e861f755f3417248677f
CRs-Fixed: 2724482
For some 3rd party platforms, get_timestamp through legacy
kernel API is time costing. For spin_lock/unlock statistics
info, the resolution in ms level is enough. So use another
light weight API to save CPU resource for 3rd party
platforms only.
Change-Id: I9182f00adda0d3081a2c40b222ab37bb1ca9d6a1
CRs-Fixed: 2796263
Get reo destination indication from REO2SW ring descriptor,
store it to qdf_nbuf_cb of skb.
Change-Id: I5a4c504b2550229a77a435b1f5ddb78c4abe51aa
CRs-Fixed: 2809080
QDF per packet proto logging is leading to excessive console
logging and hence change QDF per packet proto logging to
debug log level and avoid spamming precious kernel dmesg
log buffer.
Change-Id: Iae562a8541c81e7708caa822a0ce293e7d6e47f3
CRs-Fixed: 2808600
Add bus related info in hif layer in order to get bus status
when hang issue happened.
Change-Id: If922e0892e0f65de778b9696bbc56fc63c25c169
CRs-Fixed: 2801350
There is compilation error about decimal constant on 32 arch. Fix is
to add suffix "UL" and to mark as unsigned.
Change-Id: I68b70fbfca4da244fdd9a82b1e28046c0a3b9a3d
CRs-Fixed: 2798875
During qdf assert generic failure information printed at last is misleading
failure reason, to avoid this don't print generic failure information.
Change-Id: I55359b2e41a3ee50de4e45e73183f2480c28a1eb
CRs-Fixed: 2789137