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
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
Update frag global counter and refcount for the frag debug nodes
in debug version of the API qdf_nbuf_unshare.
Change-Id: Ia7ede226701793fe1febb3411aa508ba7967092c
CRs-Fixed: 2776166
Check for is_initial_mem_debug_disabled is missing in API
qdf_frag_debug_update_addr API. Add check for is_initial_mem_debug_disabled
so as to return without proceeding further when
is_initial_mem_debug_disabled is set to true.
Change-Id: Ie6251e70d2c01302121ff1c63ecf438f626de706
CRs-Fixed: 2780110
The current logic for decrementing the global frag counter and
refcount for the frag debug nodes does not take into consideration
the no. of users of nbuf.
Decrement global frag counter and frag debug nodes refcount only
when no. of users of nbuf is 1.
Change-Id: I5b88691f7e3e9b7e29e19479c3a3c12e70c0f311
CRs-Fixed: 2776170
This records all the WMI events and commands, for all
PDEVs. Set WMI_EXT_DBG flag to enable this feature. Refer
Original Change-Id: I18e46f683e35912cad717ca3b9cc3d1885315362
Change-Id: I4c9bdfe6fdd195656ca0c01ca400eba595be24a3
CRs-Fixed: 2762266
If reo_dst_ctrl register writing failed, this is a fatal error for
IPA pipe going to down case as RX frames will still be routed to
IPA rings then hit NOC error. retry register writing to see any
chance to write successfully, if fail always, trigger SSR or panic.
Change-Id: I3c03faa28e6cc93f396944579a360d5405c8138e
CRs-Fixed: 2774789
Current code it doesn't realize alignment.
Eg: if require 4096Bytes, it will alloc 4099Bytes,
which cause 2 pages here.
Fix is using qdf_align to align memory size.
Change-Id: I8eca9a085c0270f47318e64cefba686eac39a69a
CRs-Fixed: 2773627
In qdf_nbuf_queue_free API __qdf_nbuf_free API is
called to free the nbuf which is not clearing the debug
node instead call qdf_nbuf_free API to delete the nbuf
debug node and free nbuf
Change-Id: I34f06a440ce7758d4ea02fbd1d696366460aa871
Add qdf framework apis to clear cpu_mask and loop
through cpus present and excluded in the cpu_mask.
Use the apis to clear the cpu_mask and loop through
cpus included in and excluded from the cpu_mask to
ensure that the latency of the cores is set correctly.
Change-Id: I131ef3df2ec5b1e5a1a78d39cbc5a5dedbaa2903
CRs-Fixed: 2772353
Add major print logic for SKB as it is currently done for kmalloc and
dma allocations so that SKB allocations can be profiled.
Change-Id: Ic78cef61bc1519aa54da9823199add92c116aad7
CRs-Fixed: 2769631