提交图

1008 次代码提交

作者 SHA1 备注 提交日期
Aditya Kodukula
20380cee21 qcacmn: Add QDF infra for the minidump feature
Add QDF infra for minidump feature and define the
minidump_log and minidump_remove functions.

Change-Id: I875b991b7a7d9295f8b2acd95a7551a747ec962c
CRs-Fixed: 2856193
2021-03-09 21:06:54 -08:00
Bapiraju Alla
e9dd7d1d40 qcacmn: Update error if failed to read at least one INI parameter
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
2021-02-19 13:45:01 -08:00
Karthik Kantamneni
3c3d944246 qcacmn: Enhance error signature in qdf_check_state_before_panic
Improve error signature in qdf_check_state_before_panic API.

Change-Id: I5774c07e9359b711f0863c40072962b802318f2f
CRs-Fixed: 2879026
2021-02-18 07:47:05 -08:00
Vevek Venkatesan
fdf0a167e5 qcacmn: change the return type of qdf_queue_work to bool
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
2021-02-12 12:27:25 -08:00
Bapiraju Alla
ded2573351 qcacmn: Add bug_on incase of skb set packet length failure
Add bug_on incase of set packet length failure for debugging purpose

Change-Id: Ie91da71c2420c585b27625ec241e62a2706606c4
CRs-Fixed: 2849081
2021-02-11 04:43:34 -08:00
Debasis Das
eba308d926 qcacmn: Include relevant header-file
Include relevant header-file to use QDF_BUG macro.

Change-Id: I9ad43a05410cf6641f76a94e0e9f40e323997c50
2021-02-04 08:50:31 -08:00
Yeshwanth Sriram Guntuka
28c395b59d qcacmn: Add iova to nbuf map history event
Record iova address in the nbuf map history
events.

Change-Id: I1bb415537ffe68c839c4c2f69901394ad047022b
CRs-Fixed: 2856038
2021-02-02 07:49:39 -08:00
wadesong
3e2e6fd4e7 qcacmn: Fix a mismatched parameter type
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
2021-01-30 02:48:32 -08:00
Jingxiang Ge
3200bacc98 qcacmn: check wrap around in BEFORE_UNLOCK
1 Add protection for wrap around of jiffies.
2 fix assign issue from uint32_t to uint64_t.

Change-Id: Idbd3604d0cb985d08aa82e3b1d7f32fa6be8c3ef
CRs-Fixed: 2864737
2021-01-29 14:41:25 -08:00
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
Alan Chen
321c15d9c2 qcacmn: Add new WoW unit test suspend type
Add new WoW unit test suspend type.

Change-Id: I721ef1c18a83d0cbc86fd804f13ae57b5acd8fa3
CRs-Fixed: 2855429
2021-01-19 21:16:10 -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
Will Huang
c761e3e208 qcacmn: Remove QDF_BUG of qdf_spin_is_locked
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
2021-01-15 06:07:37 -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
Neha Bisht
0e390d9bab qcacmn: Provide support for avg. phyrate stats
Provide support for average tx and rx phyrate statistics

Change-Id: Ib1c2d2c90ca6a8a0f1ac1bc08d9e1f89537cbb4d
2020-12-17 05:11:54 -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
Arun Kumar Khandavalli
69c17ec173 qcacmn: add new api to get the bus reg dump
Add new wrapper to get the bus specific register information via
the bus driver.

Change-Id: I544b23c8f6654e9215fb4f03203d6754c766dada
CRs-Fixed: 2833251
2020-12-08 11:16:28 -08:00
Arun Kumar Khandavalli
0cb4658b79 qcacmn: add new qdf wrapper to update reason code
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
2020-12-08 11:16:25 -08:00
Tiger Yu
e4fbc9890d qcacmn: Add 64 bits version for QDF_GET_BITS
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
2020-12-08 01:12:36 -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
Aditya Kodukula
e6cf256348 qcacmn: Add a check to ensure validity of ini file
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
2020-11-26 22:45:45 -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
Yu Tian
cee4dbb1c5 qcacmn: Implement a light weight get_timestamp routine
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
2020-11-03 13:17:00 -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
Kai Liu
4be28ba641 qcacmn: Enhance hang info feature
Add bus related info in hif layer in order to get bus status
when hang issue happened.

Change-Id: If922e0892e0f65de778b9696bbc56fc63c25c169
CRs-Fixed: 2801350
2020-10-30 13:03:35 -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
Wu Gao
1e52a027ce qcacmn: Fix compilation issue about decimal constant
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
2020-10-19 03:17:08 -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