In qdf_nbuf_unshare_debug() API remove the refernce of old nbuf
before calling skb_unshare(). As skb_unshare() will free old nbuf
and allocate a new one for a cloned skb.
Change-Id: I2a2f0277934268a346e13a0779e204f02c9bcf5b
The minidump API msm_minidump_remove_region() was added to the
msm-kernel from version 4.19 so, to avoid compilation failures in
older kernel versions, enable the feature flag WLAN_QCOM_MINIDUMP
for kernel beginnig with 4.19 version.
Change-Id: Iba7a293fb9ca3e5ffe967e8d610251df8c2a3969
CRs-Fixed: 2901746
This feature is used to detect CE tasklet scheduling delay
and credit response delay issues.
Change-Id: I9a8fcb425edd5cf96fae5f6cd3bfc7f51172c814
CRs-Fixed: 2874874
Add QDF infra for minidump feature and define the
minidump_log and minidump_remove functions.
Change-Id: I875b991b7a7d9295f8b2acd95a7551a747ec962c
CRs-Fixed: 2856193
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
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
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
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
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
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
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
Add an assert check to __qdf_nbuf_add_rx_frag() to ensure
the number of fragments doesn't exceed the maximum number
of frags an skb can accommodate.
Change-Id: Idcfe8fdacaad581d7b2b0ce52fc7e8d757286ec8
CRs-Fixed: 2791955
Page fragments can be attached to the chained nbufs present in the
frag_list of the parent nbuf. Update the debug entries for such fragments
in different scenarios.
Change-Id: Ib114ec43dcb6cbcd707552bcca19f1ac0d3c2a22
CRs-Fixed: 2791903
Change ROME IPA pipes from IPA_CLIENT_WLAN1_CONS and
IPA_CLIENT_WLAN1_PROD to IPA_CLIENT_WLAN3_CONS and
IPA_CLIENT_WLAN3_PROD. The MCC pipe is changed to
IPA_CLIENT_WLAN2_CONS
Change-Id: I329eadc28e5730f6e9f73325ba41d69102dc89c0
Handle skb fraglist creation if parent skb has nr_frags.
Currently it is being handled if parent skb has nr_frags
associated with it and results into acessing invalid skb
region.
e.g:
To understand example, consider below points:
1. Parent frag has 40 bytes of data(qdf_nbuf_data())
2. Assume each frag is of size 10 bytes.
----------------------------------------------------------
|Parent_SKB -----> 1st Fraglist SKB - Cons SKB chained |
----------------------------------------------------------
| nbuf->Data : 40B | Nbuf->Data: 0B |
----------------------------------------------------------
| Nr Frags: 16 | Nr Frags: 10 |
----------------------------------------------------------
| Data Len: 160B (16 * 10) | Data Len: 100B (10 * 10) |
----------------------------------------------------------
| Nbuf->len: 200B ( 40 + 160) | Nbuf->len: 100B |
----------------------------------------------------------
While creating fraglist,
Parent nbuf -> data_len will become 100 Bytes (Because of assignment '=').
Logically it should be (160B + 100B). '+='
This change incorporate above handling.
Change-Id: I9f63035aa44e6f85a803511cb19632178d3dc2e5
This reverts Change-Id: I8eca9a085c0270f47318e64cefba686eac39a69a
That causes nbuf alloc size 64 bytes short of 2K, which leads
nbuf data to corrupt SKB shared info.
Change-Id: Iece451b4611c3fe9aaac00cc8aa7abbf79093b22
CRs-Fixed: 2779177
If the data ether header contains 802.1Q and 802.1AD tag,
current API to identify DHCP/ARP/EAPOL frame will not work properly,
for 802.1Q/802.1AD frame, there is extra 4 or 8 bytes in ether header.
Add 802.1Q and 802.1AD support for DHCP/EAPOL/ARP check.
Change-Id: Ibf00bd9e1497ba9700abca10d840104a73238f56
CRs-Fixed: 2771942
Add function qdf_mem_multi_pages_zero() to support multi-pages
memory zero operation.
Change-Id: I08b5c2722c02881550d3a1da27d5137c0957fd51
CRs-Fixed: 2776365
Always assert immediately in case of dma mapping error for TSO frags or
whenever paddr is set to 0. This will assert closer to the point of
failure in the future and point to the immediate operation causing this
behavior.
Change-Id: I8e3d58c1b4f18a8b7721b96686ea0ea4ff9c270b
CRs-Fixed: 2777588
Add api to qdf abstraction framework to return size of nbuf
from nbuf data pointer to end pointer.
Change-Id: I8a450306ddcaa7c6a85607425bc1c1fd26c4e1e4
CRs-Fixed: 2767763