Commit Graph

582 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
18989f8ede qcacmn: support multiple pages prealloc for descriptor
Support multiple pages prealloc for DP descriptor

Change-Id: I66d4cef3acf69acf4b6fc8e5a6d01c3d67921dca
CRs-Fixed: 2751338
2020-09-21 01:33:16 -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
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
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
Jinwei Chen
4fdb9be461 qcacmn: Retry reo_dst_ctrl register writing if fails
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
2020-09-15 04:59:41 -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
Alan Chen
907c485706 qcacmn: Add major print logic for SKB
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
2020-09-09 16:20:01 -07:00
Balaganapathy Palanisamy
55650d9c02 qcacmn: Add sequence number for WMI pipe
Add sequence number to each packet queued on wmi pipe and
match it against expected sequence number in wmi completion handler.
WMI packets are consumed internally, use the skb mark field to capture
the sequence number of the wmi packet.

Change-Id: I1421e3fcff0a2b326f6d899780c773950544ef26
CRs-Fixed: 2741465
2020-09-07 03:18:00 -07:00
Ashish Kumar Dhanotiya
c9b7b0f885 qcacmn: Add feature flag for line number logging
Currently line number is not useful in the logs and to print
the line number consumes lot of memory in driver text area size.
To reduce the driver size add feature flag to enable/disable
line number logging in the driver.

Change-Id: Ie715ff9238545a5041c0241b731dc14460050316
CRs-Fixed: 2766247
2020-09-03 04:04:14 -07:00
Mainak Sen
14543e310a qcacmn: Add qdf and DP module id for MSCS
Add MSCS module id in QDF and DP
Change-Id: I1b5186828c2ef236bb1f05c8d54850ed37719926

Change-Id: I5049cd17e5e1ad73adc6a1d881e7882e3947796f
2020-09-02 08:48:28 -07:00
Srinivas Girigowda
67d43c98ee qcacmn: qdf: Remove QDF_MAC_ADDR_STR and QDF_MAC_ADDR_ARRAY
These two macros are obsolete and removed.
Use the below new macros
1. For logging MAC address in kernel or driver logs, use QDF_MAC_ADDR_FMT
   in combination with QDF_MAC_ADDR_REF
2. For other management interfaces like debugfs, sysfs, ioctl, wext,
   unit test code, non-production simulation SW use
   QDF_FULL_MAC_FMT and QDF_FULL_MAC_REF

Change-Id: I366ceddfbb86526ebf24366b18b9e847fc5e4cea
CRs-Fixed: 2767703
2020-09-02 06:52:53 -07:00
Jingxiang Ge
759cd74c04 qcacmn: Add wakeup source tracker
Enable debug for wakeup source tracker.

Change-Id: I28983b5b6cbc15e71753264504e28fccba8a79cc
CRs-Fixed: 2760401
2020-08-28 13:03:51 -07:00
Sandeep Puligilla
00a2d6550f qcacmn: Add interface manager module
- Add interface manager module files
- Add start_connect event processing
- Add stubs for start_connect_complete and start_bss
event processing API's

Change-Id: I91a2bf38755abef38b6a9348d3eb69983217916c
CRs-Fixed: 2759226
2020-08-28 06:35:52 -07:00
Srinivas Girigowda
738be5f561 qcacmn: qdf: Introduce QDF_FULL_MAC_FMT and QDF_FULL_MAC_REF
The idea behind introducing these macros is, if the feature
CONFIG_WLAN_TRACE_HIDE_MAC_ADDRESS is enabled, then the
requirement is to hide 2nd, 3rd and 4th octet of the
MAC address in the kernel logs and driver logs.
But other management interfaces like ioctl, debugfs, sysfs,
wext, unit test code or non-production simulator sw (iot_sim)
should continue to log the full mac address.

If the developer directly introduces %pM in the code, it becomes
difficult to catch this in the code review and may end up breaking
the feature CONFIG_WLAN_TRACE_HIDE_MAC_ADDRESS if enabled.

Hence the plan is to introduce meaningful macros to help code
audit easy and with the help of automation, block the developer
from directly introducing %pM in the code.

Change-Id: Id28663eb6e750febba07ed9bdad168187df3248f
CRs-Fixed: 2763028
2020-08-28 02:00:52 -07:00