Commit-Graf

791 Incheckningar

Upphovsman SHA1 Meddelande Datum
Vivek
7d38880a19 qcacmn: Enable rate limiting on for prints in interrupt context
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
2021-01-29 00:04:31 -08:00
Vivek
5589f598a5 qcacmn: Abstract the qdf_in_interrupt API
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
2021-01-29 00:04:27 -08:00
Bapiraju Alla
2bd0e399d9 qcacmn: Fix compilation issues when WLAN_DEBUGFS feature is disabled
Fix compilation issue when WLAN_DEBUGFS feature is disabled.

Change-Id: Ifb186212e4d50f79f3492e194bbe82e3ed735ff7
CRs-Fixed: 2865197
2021-01-29 00:04:23 -08:00
Debasis Das
2c411d6e74 qcacmn: Make inline OS-abstraction APIs as non-inline
OS-abstraction API's are made non-inline to avoid direct
usage of kernel API's.

Change-Id: Ib35aa9271d98054ab582fc079e62714bb7fdae99
2021-01-22 05:31:44 -08:00
Debasis Das
aca02352ec qcacmn: Add non-inline OS-abstraction APIs
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
2021-01-21 03:43:37 -08:00
Alan Chen
64782f823f qcacmn: Return proper value of qdf timer multiplier
Return proper value of qdf timer multiplier based on this
Kbuild option QDF_TIMER_MULTIPLIER_FRAC.

Change-Id: I10c08ba900aad49fb9134d2e4d337f04a19dec7b
CRs-Fixed: 2855512
2021-01-19 23:24:33 -08:00
Ananya Gupta
a3152f3104 qcacmn: Add DP event history in non debug mode
Enable DP event history for perf mode.

Change-Id: I1b8863928f956aa39488ea357d56e182613aad8d
CRs-Fixed: 2846844
2021-01-19 19:02:49 -08:00
Vivek
69a1c93dc2 qcacmn: Rate limit prints to console from logging utility
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
2021-01-19 03:52:13 -08:00
Rakesh Pillai
6ee7aeb0bd qcacmn: Avoid logging in packet transmission path
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
2021-01-12 14:34:40 -08:00
Yeshwanth Sriram Guntuka
cdd58a5a2d qcacmn: Change QDF per packet proto log level to info
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
2021-01-08 09:57:12 -08:00
Karthik Kantamneni
dcba7b8baf qcacmn: Maintain counter for nbuf tracker nodes memory allocation failures
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
2021-01-06 21:55:11 -08:00
Jinwei Chen
f3a732ed1c qcacmn: Add function to get gso_segs from skb
Add qdf function to get gso_segs from skb.

Change-Id: I92eca7fb4adf6d08454f27469a62f4d16ff1072c
CRs-Fixed: 2846442
2021-01-05 16:13:19 -08:00
Shikha Bakshi
84bbeeedec qcacmn: Rectify MODULE ID in display for qdf_cv_lvl
Rectify dispaly module ID for QDF_MODULE_ID_DP_RX_MON_DEST

Change-Id: I6aee8c38d67aad1a6a97325d2e9f1a16e1f4fbdd
2020-12-28 15:13:22 -08:00
Adwait Nayak
8ca19e58fe qcacmn: Add memory corruption check
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
2020-12-21 20:55:20 -08:00
Nisha Menon
af829916ee qcacmn: Account for Tx nbuf memory in mapped unmapped TSO segs
During TCP Tx traffic account for the Tx nbuf memory mapped
and unmapped in the driver.

Change-Id: I40df92f124eec94f2fa3ddc8bcd910615f4539bf
CRs-Fixed: 2831015
2020-12-18 19:38:29 -08:00
Shikha Bakshi
89ce8c9600 qcacmn: DP Logging Enhancements
Add the below modules for Logging :

	QDF_MODULE_ID_DP_INIT
	QDF_MODULE_ID_DP_TX
	QDF_MODULE_ID_DP_TX_CAPTURE
	QDF_MODULE_ID_DP_RX
	QDF_MODULE_ID_DP_STATS
	QDF_MODULE_ID_DP_HTT
	QDF_MODULE_ID_DP_PEER
	QDF_MODULE_ID_DP_RX_ERROR
	QDF_MODULE_ID_DP_HTT_TX_STATS
	QDF_MODULE_ID_DP_RX_MON_STATUS
        QDF_MODULE_ID_DP_RX_MON_DEST
	QDF_MODULE_ID_DP_REO
	QDF_MODULE_ID_DP_TX_COMP
	QDF_MODULE_ID_DP_VDEV
	QDF_MODULE_ID_DP_CDP
	QDF_MODULE_ID_TSO
	QDF_MODULE_ID_ME
	QDF_MODULE_ID_QWRAP
	QDF_MODULE_ID_DBDC_REP
	QDF_MODULE_ID_EXT_AP

Change-Id: Id00e95bcc3720b6062326fa71f19a9698064c292
CRs-Fixed: 2827322
2020-12-18 09:36:34 -08:00
Shiva Krishna Pittala
bba4c15b50 qcacmn: Fix qdf_snprintf() wrapper
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
2020-12-16 11:55:54 -08:00
Alan Chen
8a27ffb4ad qcacmn: Rate limit error logs from send_diag_netlink_data
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
2020-12-11 22:45:11 -08:00
Vivek
081f6f0549 qcacmn: Update timer modification API to return the status
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
2020-12-11 07:25:45 -08:00
Vivek
3327a6a92b qcacmn: Add support for rate limiting QDF trace prints
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
2020-12-02 10:45:34 -08:00
Nandha Kishore Easwaran
e04aeaeed8 qcacmn: Add cache invalidation for MIPS platforms
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
2020-12-02 06:33:58 -08:00
Sumedh Baikady
7a8d9d5da0 qcacmn: Change log level for packing radiotap in monitor mode
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
2020-11-26 02:15:51 -08:00
Rakesh Pillai
e9899b2a2f qcacmn: Add support to send packet marked by upper layer to FW
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
2020-11-24 10:55:42 -08:00
sandhu
f39a270b60 qcacmn: Add function to convert Hw to qdf status
Enhance qdf tx rx to hw tx completion status mapping .Function
to convert Hw to qdf status.Add a additional func arg to qdf_dp_trace_ptr.
Add dummy func argument to existing qdf_dp_trace_ptr func calls.

Change-Id: I38865d63dc7383c55686d2d0187a262b3b6d5acc
CRs-Fixed: 2810601
2020-11-19 20:39:12 -08:00
Tallapragada Kalyan
b9d5c7d2b7 qcacmn: move the TX notify comp flag to MCL specific cb structure
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
2020-11-19 06:58:26 -08:00
Nisha Menon
3db73f1414 qcacmn: Add memory stats pertaining to DP usage
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
2020-11-18 16:23:49 -08:00
Debasis Das
d5b64eab69 qcacmn: Add wrappers to abtsract OS API's
Add wrapper API's to abstract various OS API's
related to network-device.

Change-Id: I0c8bc9091d32965a90025b9e7738ab6cfdc39d14
2020-11-03 06:23:36 -08:00
Jinwei Chen
56f94da675 qcacmn: Add reo destination indication info to skb
Get reo destination indication from REO2SW ring descriptor,
store it to qdf_nbuf_cb of skb.

Change-Id: I5a4c504b2550229a77a435b1f5ddb78c4abe51aa
CRs-Fixed: 2809080
2020-11-01 23:14:06 -08:00
Rajeev Kumar
c3f4e5678d qcacmn: Change QDF per packet proto log level to debug
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
2020-10-31 07:17:14 -07:00
Jianmin Zhu
6ce6be5c32 qcacmn: Add MACRO qdf_ceil
Add MACRO qdf_ceil(x, y) as DIV_ROUND_UP(x, y)

Change-Id: I92ecffbaf29c43809712e2b950a8064890e98136
CRs-Fixed: 2807611
2020-10-29 23:35:39 -07:00
Karthik Kantamneni
6ef375e0fb qcacmn: During qdf assert don't print generic failure information
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
2020-10-13 02:06:05 -07:00
Ankit Kumar
a438cb3a4a qcacmn: Add out of boundary assert check
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
2020-10-09 06:47:29 -07:00
Harsh Kumar Bijlani
e3907fda5d qcacmn: Account for frags attached to chained nbufs in frag_list
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
2020-10-09 00:06:51 -07:00
Guisen Yang
1f8975e467 qcacmn: Change ROME IPA pipe names
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
2020-10-07 15:16:28 -07:00
Ankit Kumar
45c8760063 qcacmn: Fix fraglist creation api to handle nr_frags
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
2020-10-07 12:49:00 -07:00
Vevek Venkatesan
5e487cc20a qcacmn: add support for DDR mapped IPA doorbell
Add support for DDR mapped IPA doorbell addresses.

Change-Id: I3a0d03ff4435ea12a6e07d4ae75012f2c85e32c9
CRs-Fixed: 2782267
2020-10-06 14:24:41 -07:00
Vevek Venkatesan
111e9faf76 Revert "qcacmn: Fix align issue for nbuf alloc"
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
2020-09-22 12:15:49 -07:00
Jinwei Chen
d4da14a5ce qcacmn: Add 802.1Q/802.1AD support for DHCP/EAPOL/ARP data check
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
2020-09-22 07:59:28 -07:00
Jinwei Chen
21d6fd0ac6 qcacmn: add function for multi-pages memory zero operation
Add function qdf_mem_multi_pages_zero() to support multi-pages
memory zero operation.

Change-Id: I08b5c2722c02881550d3a1da27d5137c0957fd51
CRs-Fixed: 2776365
2020-09-21 01:33:12 -07:00
Saket Jha
91f3420b3d qcacmn: Always assert if TSO frag paddr is invalid
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
2020-09-19 22:36:24 -07:00
Nisha Menon
aa434cb679 qcacmn: Add qdf api to return nbuf size from data to end ptr
Add api to qdf abstraction framework to return size of nbuf
from nbuf data pointer to end pointer.

Change-Id: I8a450306ddcaa7c6a85607425bc1c1fd26c4e1e4
CRs-Fixed: 2767763
2020-09-18 18:23:46 -07:00
Harsh Kumar Bijlani
65420efa1b qcacmn: Update frag counter and frag debug nodes for qdf_nbuf_unshare
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
2020-09-18 18:23:38 -07:00
Harsh Kumar Bijlani
0ee6465661 qcacmn: Add check for mem debug disabled in qdf_frag_debug_update_addr
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
2020-09-18 15:17:29 -07:00
Harsh Kumar Bijlani
1f7706356f qcacmn: Update global frag counter and frag debug nodes refcount
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
2020-09-18 15:17:26 -07:00
Jhalak Naik
41e8d82db9 qcacmn: Hex dump generation for WMI events and commands
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
2020-09-15 11:38:47 -07:00
Sandeep Puligilla
1e325d2b3a qcacmn: Add Interface module ID
Add interface module in the qdf trace.

Change-Id: I4053c46fec29bcae75a0505e93f53f01a05d3332
CRs-Fixed: 2767862
2020-09-15 09:28:57 -07:00
Jingxiang Ge
3d5a0c6aba qcacmn: Fix align issue for nbuf alloc
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
2020-09-12 15:59:30 -07:00
Chaithanya Garrepalli
96d7fbafaf qcacmn: fix double nbuf allocation false positive
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
2020-09-11 19:08:19 -07:00
Nisha Menon
1c50a00210 qcacmn: Update the gold core latency on clearing cpu_mask
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
2020-09-11 16:17:49 -07:00
Chaoli Zhou
8b47a84559 qcacmn: Add GPIO MODULE ID
Add one new GPIO QDF MODULE ID for GPIO component use

Change-Id: Iefc9727b4dc8337be976d15f7d79298bc6ab884b
2020-09-11 07:36:58 -07:00