Графік комітів

646 Коміти

Автор SHA1 Повідомлення Дата
Venkata Sharath Chandra Manchala
7fa23c1502 qcacmn: Add support to record iova address
Add support to record iova and pa address for
every buffer posted to CE SRC ring. This is to
identify issues in memory corruption.

Change-Id: I774b705f9edc89490d1f8dfdd01e8e0d9e9165c0
CRs-Fixed: 2546824
2019-10-25 01:23:58 -07:00
Yeshwanth Sriram Guntuka
2a7ed0abd3 qcacmn: Record few more ce desc event during post_recv_buffers
CE events are not recorded during nbuf allocation and
nbuf map done in hif_post_recv_buffers_for_pipe.

Add few more events to be recorded to know the exact
time when nbuf allocation and map is done with respect
to rx_desc_completion and rx_post_desc events.

Change-Id: Ia2a3ea61dc99dd21d06b442ef00cd25550f4cb5a
CRs-Fixed: 2541986
2019-10-23 10:32:22 -07:00
Subrat Dash
e2e55cdec5 qcacmn: Fix Invalid HTC endpoint is observed in the rx header
The urb completion handler is asynchronous. Sometimes it is
called before prestart allocation is complete.
The urb_prestart_cnt is accessed unsynchronized manner from
usb_hif_usb_recv_prestart_complete. It presumes that it
is running out of prestart URBs and new allocation will be
done. Since bundling is not enabled at this point, the new
URBs allocated are not considered for bundling.
Use spin_lock to ensure synchronization in the above scenario.

Change-Id: I8c989aff7985a9ab614d63a71c7f97a0278647e0
CRs-Fixed: 2538796
2019-10-22 01:51:32 -07:00
Mohit Khanna
973308ae13 qcacmn: Add HIF changes to support qca6490
HIF changes to support qca6490 WLAN chipset.

Change-Id: I4b1be1770a2daf0a0db6f65f579831e3fcb10e79
CRs-Fixed: 2522133
2019-10-17 15:13:20 -07:00
Venkata Sharath Chandra Manchala
f73d891115 qcacmn: Add qca6490def.c file
Add the file to include host and
target based definitions.

Change-Id: I577e4be6a7d0b8258b69593ca45d29bfd5cbb0c0
CRs-Fixed: 2522133
2019-10-17 15:12:49 -07:00
Venkata Sharath Chandra Manchala
34a2ef695d qcacmn: Add support to copy buffers posted to CE SRC
Enable data field in hif_ce_desc_event structure
and copy the buffer posted to CE SRC ring. This is
done to validate the contents of the buffer.

Change-Id: I6745422f6c3a8ac013bb35032056f041d2216d89
CRs-Fixed: 2540707
2019-10-10 18:04:39 -07:00
Sravan Kumar Kairam
b96e5072de qcacmn: Add runtime pm apis to record last dp rx busy mark
Add runtime pm apis to record last busy mark set by data path
during dp rx process.

Currently for mcl in some scenerios runtime sync suspend is issued
which puts the link in low power state with out waiting for link
inactivity timeout. This leads to throughput degradation in case of
rx direction as in rx processing data path extends the timer by marking
last busy to avoid immediate runtime suspend. But runtime sync suspend
does not take in to account of the link idle timeout value before
suspending the link. So using this apis, before issuing runtime sync
suspend check the duration since last busy mark by data path rx process.
If the duration is less than run time delay just do runtime put.

Change-Id: I694ef6ddec8f11fed44bf3b9e5ae18ad93b6ec24
CRs-Fixed: 2512326
2019-09-30 03:18:14 -07:00
Himanshu Batra
7ee0677954 qcacmn: Replace linux print APIs with qdf print APIs
Replace linux print APIs with equivalent level qdf print APIs.

Change-Id: If0a4a5326de87c9f023e8f4de996a4734ed6cda2
CRs-Fixed: 2530137
2019-09-29 23:15:37 -07:00
Guisen Yang
6e0ca6a328 qcacmn: Fix compilation failure when NAPI is disabled
Encap napi APIs by macro, inline the no-op version
APIs, and define the API when the feature is disabled
but API is called by others.

Change-Id: I9c0409b8abcb6260b1adfd5a656f8c1fa42695b5
CRs-Fixed: 2534594
2019-09-28 21:49:59 -07:00
Venkata Sharath Chandra Manchala
780cbb8034 qcacmn: Avoid printing log in console
Avoid printing hif runtime resume log in
console while holding the srng->lock.

Change-Id: I57a361a746884504444028476f20b3735e261d1e
CRs-Fixed: 2522072
2019-09-18 15:49:45 -07:00
Alok Kumar
1c42376e40 qcacmn: Add paddr in CE descriptor history
Add IOMMU IOVA to PA and MMU virtual to phys address
in CE Desc History, hif_ce_desc_history.

Change-Id: I877a2275e7ea99748087ea6f2ad5f26aa3b2476e
CRs-Fixed: 2524381
2019-09-16 23:49:36 -07:00
Mohit Khanna
cd9abacf18 qcacmn: Mark DP interrupts wakeable
This is needed, because in SAP mode wlan_wake_irq is not used to wake up
the APPS when it goes to suspend, and each SRNG interrupt needs to
wakeup the APPS when needed. Hence mark DP interrupts with
IRQF_NO_SUSPEND flag.

Change-Id: I0138c94ad82da7cdef5856c15c5f4089a835bc22
CRs-Fixed: 2512383
2019-09-16 09:25:20 -07:00
Ajit Pal Singh
71bf52b242 qcacmn: qcn7605: usb: Do not call put/get dev and usb_disable_lpm
*For QCN7605 do not call usb_get_dev/usb_put_dev as its already called
in CNSS.

*Also for QCN7605 do not disable lpm in hif_usb_disable_bus().
This was a workaround done for Rome/Naples which is not needed for
QCN7605.

Change-Id: Ibb151390590f85a96ad83395420b08aee1be15ef
CRs-Fixed: 2516667
2019-09-15 20:41:03 -07:00
Yue Ma
a720310823 qcacmn: Log runtime PM wake source in debug level
Since callers who log runtime PM resume source may be invoked within
spinlocks or in other atomic contexts, log using info level will log
to console as well which may result overhead. Log using debug level
which will be logged to buffer only to avoid such issues.

Change-Id: I0497c7b7528200af9a34d816865e9bbbfd8bacf2
CRs-fixed: 2518800
2019-09-13 17:37:17 -07:00
Visweswara Tanuku
ebebd7632b qcacmn: Genoa: SDIO: Alloc Rx SKB buffer based on Payload Len
Allocate Rx SKB buffers based on Payload Length indicated in
HTC Header

CRs-Fixed: 2517051
Change-Id: I337e70eeae804ba8ef17a671a5fc39e59382e96d
2019-09-06 22:25:01 -07:00
Lin Bai
14143c2277 qcacmn: Fix maybe-uninitialized compilation failure
'dest_desc' may be used uninitialized in function
ce_recv_buf_enqueue_srng/hif_record_ce_srng_desc_event, when
Werror=maybe-uninitialized enabled.

Change-Id: I13281d74bcfff5eb7474af729fd70d90c024ee75
CRs-Fixed: 2519213
2019-09-04 11:31:16 -07:00
Visweswara Tanuku
8c730b08c0 qcacmn: Genoa: SDIO: Handle Rx Padding
In Genoa SDIO ADMA implementation FW sends bundled packets
which is terminated by a pad block

Handle the Rx Bundling using the pad block

CRs-Fixed: 2506247
Change-Id: I50f1c79a07398ed0fcfba358fc53aa02ad3c6964
2019-08-23 06:27:10 -07:00
Saket Jha
6caec001fa qcacmn: Correct return type for ce_send_single
Due to previous API change, ce_send_single function now returns
QDF_STATUS instead of int. In the case the condition is met
where ce send fails, this function should return QDF_STATUS type.

Change-Id: I0fe8cc2929623d6320bd782abcf75fff6ec60297
CRs-Fixed: 2509467
2019-08-21 20:54:17 -07:00
Jinwei Chen
38dbf13539 qcacmn: disable runtime PM for monitor mode
Disable runtime PM for monitor mode

Change-Id: I8d4c4f30859b01972423073ce1f7fc46d6341089
CRs-Fixed: 2509661
2019-08-21 02:59:44 -07:00
Naman Padhiar
ee289837ea qcacmn: Correctly calculate msi vector for CE
Calculate correct msi vector corresponding to ce id and pass it
to platform driver to get irq number.

Change-Id: I6f9b1b68c6bdaa4baebacf47b7a564413417c55a
2019-08-21 02:59:37 -07:00
Pavankumar Nandeshwar
2d247d0d5e qcacmn: Fix the deadlock situation during deconfiguration of grp_irq
Make sure the free_irq is not called with the group locks held.

Change-Id: I216e0cbae8bb45f1603dfe96e586130773744c50
2019-08-20 12:22:54 -07:00
Ajit Pal Singh
2573cf4667 qcacmn: Do not submit RX-URBs if device suspending
When WLAN device is suspended soon after driver load, the URB
complete callback for prestart URBs 'may' be called, since all
prestart URBs have not been utilised.In the complete callback
,fresh URBs will be requeued.
Check for suspend_state before queuing URBs.

Change-Id: I650080d65acde6b63340d1b90aef6d28df5022c6
CRs-Fixed: 2507594
2019-08-20 05:19:46 -07:00
Akshay Kosigi
07df14c270 qcacmn: Move config files out of cmn dev
Move AP specific CONFIG files out of cmn dev

Change-Id: I53adb20ea910c0bc8842daa85cb762d4d3968e45
CRs-Fixed: 2506563
2019-08-19 02:10:57 -07:00
Jingxiang Ge
5dab0d80c8 qcacmn: Cancel sleep_timer completely in pcie bus suspend
There is possibility that sleep_timer is in running state,
so even in hif_pci_cancel_deferred_target_sleep timer has
been stopped, it runs later.

Use fake_sleep in hif_sleep_entry to check if timer has been
stopped, if yes, without action in hif_sleep_entry.

Change-Id: I46f28f8d856b51792e27a1f80f763830956b2868
CRs-Fixed: 2482547
2019-08-18 21:17:28 -07:00
Yue Ma
ad85368f00 qcacmn: Add suspending and resuming states for runtime PM
Currently runtime PM only has inprogress state which means either
suspend or resume is in progress. Add suspending and resuming states
so that proper handling can be done for each state.

Change-Id: I9d92a8719d659b9ea271c46f8ce6bc912edc0863
CRs-fixed: 2507953
2019-08-16 18:32:56 -07:00
Rakesh Pillai
9d28e0e462 qcacmn: Make num_int_grp consistent with hif_num_grp
The HIF_MAX_GROUP value is not consistent with the
HIF_NUM_INT_CONTEXTS which can cause out of bound access.

Fix this issue by making both these values same.

CRs-Fixed: 2505220
Change-Id: Ia79d9c03de82a73662c189e61e83e43e71d2ef3f
2019-08-14 14:30:16 -07:00
Jayachandran Sreekumaran
f24399cc78 qcacmn: Enable mission mode through qmi signalling
Enable mission mode in fw through qmi signalling.

Change-Id: I539d7b8bb1f38b2cb526704c225bf4535fcc8543
CRs-Fixed: 2504541
2019-08-12 22:19:16 -07:00
Nandha Kishore Easwaran
5d3475b985 qcacmn: Initial changes for pine
Add device ID change and target type checks for pine.
Also remove memory war added for Hk emulation.

Change-Id: Idf531a48a03202d4fb241a92a1d671ee2b94cfbd
CRs-fixed: 2453899
2019-08-11 02:11:41 -07:00
Vignesh Viswanathan
7c974c29d3 qcacmn: Add support for separate FTM Coldboot Calibration mode
Add support for separate Coldboot calibration mode (10) for Coldboot
Calibration in FTM Mode.

Change-Id: I8e4e2c370053b55c3755339d7ead863ba950856e
CRs-Fixed: 2497548
2019-08-08 11:38:07 -07:00
Saket Jha
5cdfcc879e qcacmn: Change return type to QDF_STATUS
Changing return type of ce_send_single and hif_send_single functions
to return QDF_STATUS instead of int so caller can handle as needed.

Change-Id: Ifa0db300982e22c2784662492727923e4614c2b7
CRs-Fixed: 2468534
2019-08-06 02:48:59 -07:00
Yue Ma
5b5238a050 qcacmn: Add runtime PM put sync API
Runtime PM put sync API will make sure runtime PM suspend happen
right away if usage count is 0.

Change-Id: I70f6fe4ed015195874ef4cac61de9ef5d739b689
CRs-fixed: 2502382
2019-08-05 15:32:08 -07:00
Nirav Shah
69fd90a11c qcacmn: Increase Source ring size of HTT TX Copy Engine for QCN7605
Increase Source ring size of HTT TX Copy Engine for QCN7605
to avoid packet drop in DBS throughput scenarios.

Change-Id: I3f48579b88034a1eddb53d67ee161bd920ac848a
CRs-Fixed: 2496049
2019-08-02 05:00:25 -07:00
Visweswara Tanuku
cf1f958b5f qcacmn: SDIO HIF Layer refactor
1. Add ADMA channel registration APIs
2. Add ADMA support for TX and RX path
3. Remove async_task thread for ADMA, since transfer thread is
   present in the SDIO AL layer
4. Move hif functions which are legacy only to mailbox.c
5. get_hif_device and hif_sdio_set_drvdata changes for mailbox and adma
6. Add rx buffer allocation offload work

Change-Id: Ie98b302176381035b1bd590ef35a977aeef4f09c
CRs-Fixed: 2274807
2019-08-01 01:40:14 -07:00
Yue Ma
e92fe029df qcacmn: Do runtime pm sync resume when printing ring stats
Printing ring stats from requesting txrx stats needs access PCIe link
so make sure it is resumed by doing a sync resume if it is runtime PM
suspended. Also response of h2t_ext_stats_msg from FW is not guaranteed
so tag it properly so that in HTC layer, corresponding "put" API will
be called right after sending the packet.

Change-Id: Idc5797b38557ed5779d920c72200b9d28769ab58
CRs-fixed: 2487521
2019-07-27 18:21:26 -07:00
Akshay Kosigi
8eda31cab3 qcacmn: Remove void ptr usage in HAL
Add code to replace usage of void pointers from
HAL layer and instead use appropriate opaque pointers

Change-Id: Id950bd9130a99014305738937aed736cf0144aca
CRs-Fixed: 2487250
2019-07-27 13:43:07 -07:00
Akshay Kosigi
4002f765f1 qcacmn: Change to remove void pointer usage for HIF handle
Add code to remove void pointer usage for hif_handle
and use opaque pointer hif_opaque_softc and also use
cdp_soc for opaque DP soc handle

Change-Id: I2896f7704ffb809214c5b08756c4b8673307fd9e
CRs-Fixed: 2487247
2019-07-27 13:43:00 -07:00
Yue Ma
4986b2588b qcacmn: Log runtime PM resume source
It is very critical to know the source of who requests runtime
PM resume to debug all kinds of runtime PM related issues. Hence
log them accordingly.

Change-Id: I9551830b1cb567fd29e9d9bbec18705f9cc5e9ec
CRs-fixed: 2496481
2019-07-27 02:49:10 -07:00
Yue Ma
41e3af09f7 qcacmn: Set WAKE MSI monitor variable before enabling WAKE IRQ
After enabling WAKE IRQ during runtime PM suspend, it is able to come
anytime because device wants to wake up. In order to avoid missing
to handle the IRQ and missing resume, set WAKE MSI monitor variable
before enabling WAKE IRQ.

Change-Id: I450e2d7a28f68818e12ff000a36275707a9b97b0
CRs-fixed: 2496603
2019-07-27 02:49:07 -07:00
Yue Ma
99ffbda5dc qcacmn: Avoid disable/enable twice for runtime PM suspend/resume
Commit 13835b1aa2 ("qcacmn: Do not access bus in suspend_noirq")
adds enable/disable WAKE IRQ through hif_apps_irqs_enable/disable
APIs to bus suspend/resume routine which are also called by runtime
PM routine. However, runtime PM suspend/resume routine will also
enable/disable WAKE IRQ by itself so WAKE IRQ will be disabled twice
and only enabled once before entering suspend so the WAKE MSI will
be masked which results device requested resume failure. It is also
same for resume path. Hence remove enable/disable WAKE IRQ from
runtime PM routine.

Change-Id: I5774d0450c70f3ff74ea81dc44ef3656eb8c7a96
CRs-fixed: 2495897
2019-07-27 02:49:04 -07:00
Yue Ma
fd75cd2948 qcacmn: Remove WLAN_SUSPEND_RESUME_TEST flag for WAKE MSI handler
WAKE MSI can be triggered and handled properly for both unit test
framework and runtime PM feature in runtime, so there is no need
to have a compile time flag. Hence remove it.

Change-Id: I97127575114d6be40b36a7417cc7c177cec69808
CRs-fixed: 2496366
2019-07-26 12:16:08 -07:00
Kiran Venkatappa
a516abcc57 qcacmn: Mark CE5 as unused when pkt log is disabled
Mark CE5 as unused when pktlog feature is disabled. This provides memory
savings by skip configuration and replenish of the copy engine used for
packet log

Change-Id: I1bdd3355b84f257a2dbfe58a2752824a096b81e8
CRs-Fixed: 2495320
2019-07-26 09:27:12 -07:00
Vevek Venkatesan
ad55b14e32 qcacmn: converge target type defines for both MCL and WIN
Converge definitions of target types for both MCL and WIN.

Change-Id: I501d39ff5989747ddd22b08cb390bb4601c5dd0b
CRs-Fixed: 2484512
2019-07-24 21:43:24 -07:00
Mahesh Kumar Kalikot Veetil
bde1772622 qcacmn: Enable ASPM for FTM mode
Modify hif_pci_enable_power_management() API to enable pci ASPM for
FTM mode.

CRs-Fixed: 2491213
Change-Id: Ia421ee2af9ae270f5138ac5b8ff52680fbfe9679
2019-07-18 14:23:13 -07:00
Surabhi Vishnoi
b30b9176a2 qcacmn: Add target ce configs based on pktlog feature for Adrastea
When pktlog feature is disabled then the target CE11 attributes
should be set to CE_ATTR_DISABLE_INTR. Currently, the target ce configs
are attached unconditionally. This leads to incorrect attribute set for
CE11 in case when pktlog feature is disabled and thereby abortion of
HWDTIM in target as target checks host_ie for CE11. Currently host_ie
is not set for CE11, this results in aborting of suspend mode as
target assumes that host is using CE11.

To mitigate this issue, attach the target ce configs based on pktlog
feature. When pktlog feature is disabled then set the host_ie for
CE11 which will indicate to target that host is not using CE11 and
target will not abort HWDTIM mode.

Change-Id: I331d3bd8eda0c2aba9d86fb7601ac2b74c9e2c31
CRs-Fixed: 2459887
2019-07-12 02:05:28 -07:00
Nandha Kishore Easwaran
aa28cc38a3 qcacmn: Adding hal for pine
Added new hal folder for pine. Included hkv2 functions whereever possible
to make sure there is not much code duplication.

Change-Id: I13247beb1af0b250f8e1bf182005f2513bdf9902
2019-07-11 04:53:43 -07:00
Yu Ouyang
5936495779 qcacmn: fix pcie card enable issue without CNSS module
For 3rd party platform, without CNSS module, PCIe card failed
to enable.

Function hif_pci_enable_bus() should call hif_enable_pci_nopld(),
not hif_enable_pci_pld(). So, checking platform driver supported
or not before enable bus. If platform driver is not supported,
return false in function hif_is_pld_based_target().

CRs-Fixed: 2439335
Change-Id: I57a1272f082e7ba1fbeee43d58a81997f3d0e6d7
2019-07-08 12:10:04 -07:00
Vevek Venkatesan
0ac9aafb9a qcacmn: remove qwlan version string dependency
Remove QWLAN_VERSIONSTR dependency in cmn code, so that it would
be used in driver itself, part of CONFIG_MCL/CONFIG_WIN cleanup.

Change-Id: Iec0cefe1d9e39a5b5546c7b007cc0858044cdc7b
CRs-Fixed: 2481053
2019-07-02 08:39:23 -07:00
Vevek Venkatesan
94a976d817 qcacmn: move HIF_CONFIG_SLUB_DEBUG_ON define to driver Kbuild
Move definition of HIF_CONFIG_SLUB_DEBUG_ON to driver Kbuild,
to cleanup CONFIG_MCL/CONFIG_WIN dependency.

Change-Id: I563d248413c98d7704e32ae06c260c02d915495a
2019-07-02 02:40:18 -07:00
Yue Ma
fab77ad949 qcacmn: Do not request runtime PM resume for system resume
Firmware will trigger WAKE MSI for both runtime PM and system
resume. There is no need to request runtime PM resume again if
it is a system resume. Check the flags to avoid doing so.

Change-Id: I70bdfadf1d7c0ffd4e2849458c6aee6931037cd3
CRs-fixed: 2479631
2019-06-29 00:16:31 -07:00
Jinwei Chen
5372d55f63 qcacmn: fix invalid access to hif_ext_group issue
hif_ext_group is not initialized if DP interrupt is not registed
like monitor mode, invalid access will happen in function
hif_hist_record_event.

if hif_num_extgroup is 0, stop access to hif_ext_group member.

Change-Id: Id4432577446caa8887ca6d1fb8b669dda8c9fdf3
CRs-Fixed: 2475506
2019-06-27 12:30:25 -07:00