Commit Graph

206 Commits

Author SHA1 Message Date
Guisen Yang
b51b03ddca qcacmn: Add shadow address for CE3
When sending BE stream in epping mode, it fails when writing
registers of CE3 because the addr is not defined. Add this addr
to support epping mode data transfer.

Change-Id: I0d01cbee889c272b35a02bd1aca47f341f1edd2e
CRs-Fixed: 2901231
2021-03-24 09:48:04 -07:00
Vevek Venkatesan
17660198d7 qcacmn: disable all apps CE irqs except wake_irq in bus suspend
In Moselle, currently CE interrupts are not disabled from apps
side during ipci bus suspend, so adding changes to disable all
the CE interrupts except wake_irq during bus suspend and do the
symmetric inverse operation during bus resume, also drain all
the pending FW diag logs from copy engine.

Change-Id: Ib54fc6660fd81aff18787b0b699f3a6cd2d7803d
CRs-Fixed: 2879752
2021-03-09 08:57:09 -08:00
Jinwei Chen
017c719e4b qcacmn: Add HIF changes to support WCN7850
HIF changes to support WCN7850 WLAN chipset.

Change-Id: I02cd0702839a09b13a10b95237519f900a4cb7f9
2021-02-23 02:51:20 -08:00
Kiran Venkatappa
53d0aec26d qcacmn: Set error code when ce_init fails to alloc ce_state
Set proper error code when ce_state creation fails. Sending success from
here results in inconsistent state of CE data structures resulting in
invalid access. Send failure as return so that proper handling is done
by the caller.

CRs-Fixed: 2855116
Change-Id: I9c063760656a8125e627aaa62b309a2bb4c0ac6f
2021-01-28 06:19:45 -08:00
Pavankumar Nandeshwar
1adba0a413 qcacmn: change qcn9100 to qcn6122 in hif and umac
Change the name of target type qcn9100
to qcn6122 in hif and umac.

Change-Id: Ia473c531a0903fd514dacf645d23bec3886fd719
CRs-Fixed: 2849577
2021-01-18 21:45:34 -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
Govind Singh
183dd69628 qcacmn: Free mem leak in qmi bypass mode
QMI bypass mode uses 2mb of of mem region for
fw uses. Current implementation does not free this
memory region when qmi bypass mode in enabled.
Free mem leak in qmi bypass mode.

Change-Id: Ie11aa9f20f93183e0b999cd6578aea4b231f8d8b
2020-10-19 05:09:32 -07:00
Govind Singh
b481b85018 qcacmn: Fix pktlog pipe callbacks assignment for Adrastea
PKTLOG callback is not updated for Adrastea target as
htt_htc_soc_attach does not get called during initialization.
Fix pktlog pipe callbacks assignment for Adrastea target by
checking only CE_ATTR_INIT_ON_DEMAND attribute.

Change-Id: I16f2d2e493440315343087417a8d4c341065ae9a
2020-10-15 16:46:18 -07:00
Uraj Sasan
180f7b20d9 qcacmn: Pktlog dynamic CE config support
Add support to dynamically initialize the CE for PKTLOG
and post buffers on demand.

This helps avoid unnecessary initialization of PKTLOG
ring and save the memory in lowmem platforms

Change-Id: Ib02153b3e7205be30b07e4a4763edf3374827328
2020-10-08 10:19:22 -07:00
Sridhar Selvaraj
bf0668f3c0 qcacmn: Reinitialize pci irq ops for qcn9100
QCN9100 pci radio is connected to the IPQ5018 through PCI slots
and enumerated by the Q6 radio. From the host driver perspective,
QCN9100 is treated as an AHB device, however the QCN9100 uses
MSI interrupts to notify events
-Reinitialize pci irq ops for hybrid bus type device qcn9100
-Update CE flags of qcn9100 to interrupt mode
-Set disable_wake_irq flag for qcn9100 as wake irq is not used

Change-Id: I8da7f0b48923b9d70e62f4ff181bd47865ea2fe8
2020-10-01 19:09:03 -07:00
Srinivas Girigowda
80c1b5a6c3 qcacmn: Replace obsolete HIF_DBG() with hif_debug()
Replace obsolete HIF_DBG() with hif_debug().

Change-Id: I462d75617359fd13eafa497045ddfb70c2025595
CRs-Fixed: 2779720
2020-10-01 14:41:39 -07:00
Srinivas Girigowda
d89e043589 qcacmn: Replace obsolete HIF_TRACE() with hif_info()
Replace obsolete HIF_TRACE() with hif_info().

Change-Id: I315d86b886ce0bc28c8c967c986095fe2ee46bec
CRs-Fixed: 2779720
2020-10-01 14:41:34 -07:00
Srinivas Girigowda
f327fcd404 qcacmn: Replace obsolete HIF_INFO() with hif_info()
Replace obsolete HIF_INFO() with hif_info().

Change-Id: I7fcf079551db5a69bd45b96b2126d1521c3e3e4c
CRs-Fixed: 2779720
2020-10-01 14:41:06 -07:00
Srinivas Girigowda
9667b145c6 qcacmn: Replace obsolete HIF_ERROR() with hif_err()
Replace obsolete HIF_ERROR() with hif_err().

Change-Id: I9260b47d11c1820bb05d9a7e2bf50d5257ba85ae
CRs-Fixed: 2779720
2020-10-01 14:40:57 -07:00
Karthik Kantamneni
268ab400cd qcacmn: Add support for WMI DIAG events over CE7
Add support for handling firmware WMI DIAG events over CE7.

Change-Id: I3d6c0b08313e816809a65eb77d9728fc4b4488f3
CRs-Fixed: 2787010
2020-09-30 11:10:33 -07:00
Jinwei Chen
652bd3a42b qcacmn: Support unaligned consistent memory prealloc
Support unaligned consistent memory prealloc for CE srng
memory.

Change-Id: I7c014e4c13602de89d03e2f7c5efb39b5b376226
CRs-Fixed: 2761282
2020-09-25 20:20:40 -07:00
Pavankumar Nandeshwar
9e00273fe7 qcacmn: HIF layer changes for QCN9100 bringup
Initial changes made for bring up of
QCN9100 in HIF layer

Change-Id: I60c5f7e8d5456e6f2bfda8f99d873a30ca979ada
2020-09-01 01:49:57 -07:00
Shashikala Prabhu
ba0276b572 qcacmn: Correct the return types of functions in HIF component
A few functions in HIF component returns QDF status value with return
type as non QDF STATUS and vice versa. For such functions, update the
correct return type.

Change-Id: I806407dd0596cd03500242d97ca8220a7beb6c55
CRs-Fixed: 2734818
2020-07-24 09:21:17 -07:00
Shashikala Prabhu
cb2acc0ea0 qcacmn: Correct the return types of functions in HIF component
A few functions in HIF component returns QDF status value with return
type as non QDF STATUS and vice versa. For such functions, update the
correct return type.

Change-Id: Ifc1068d60e62f7405a15e2b4f0738d91243bd6de
CRs-Fixed: 2734818
2020-07-24 09:21:14 -07:00
Shashikala Prabhu
b87eec2b53 qcacmn: Correct the return types of HIF functions
A few functions in HIF component returns QDF status value with return
type as  non QDF STATUS. For such functions, update the return type as
QDF_STATUS.

Change-Id: I69644a2206266ffe2c2d105056f9fec452f5d972
CRs-Fixed: 2734818
2020-07-24 09:21:08 -07:00
Yeshwanth Sriram Guntuka
874f714a03 qcacmn: Schedule oom_allocation work for SRNG based CE
On nbuf allocation failure in hif_post_recv_buffers_for_pipe
for the last buffer in the CE destination ring, oom_allocation
work is not getting scheduled since there is a mismatch
between the recv_buffers_needed and the num_entries - 1 of the
destination ring.

Fix is to schedule the oom_allocation work for srng
based CE with appropriate check of recv_buffers_needed
and destination ring num_entries.

Change-Id: Ie20d5b21358a401e60776db8a3a8a8644279f1fe
CRs-Fixed: 2705475
2020-06-11 13:08:13 -07:00
Baowei Liu
68487f9c5c qcacmn: Don't destroy uncreated completion_freeq_lock
Sometimes, BMI download FW fail, cause destroy this uncreated spinlock.

Because fw download fail, hif_start() not called, so 
&pipe_info->completion_freeq_lock not be created.But hif_ce_stop() call
qdf_spinlock_destroy(&pipe_info->completion_freeq_lock);Cause WLAN Panic 
@ qdf_lock_stats_cookie_destroy:824: Lock destroyed twice or never created

hif_state->started be set to true in hif_start( )This fixes use 
hif_state->started to judge hif_start() be called or not.If false, 
hif_start() not be called, so needn’t destroy  uncreated 
completion_freeq_lock

Change-Id: Id6aae8024fe9df2ac6cf7976047ebd7a850438e4
2020-05-26 01:40:47 -07:00
Yeshwanth Sriram Guntuka
8cf020f44a qcacmn: Add support to register hif recovery notifier
Add support to register hif recovery notifier to log
hang event data.

Change-Id: I7e7ce2bacc88f00e68c2c347c3a578f377f8214f
CRs-Fixed: 2649147
2020-04-03 03:43:06 -07:00
Yeshwanth Sriram Guntuka
d3db10ec5b qcacmn: Add support to log ce hang event info
Add hif APIs to support logging of ce hang event
data.

Change-Id: I9b930d5f983d57a7359ba9f97ea65050c4f54a8a
CRs-Fixed: 2649148
2020-03-30 17:11:00 -07:00
Basamma Yakkanahalli
9def5df14a qcacmn: device ID and target type checks for ipq5018 target
Initial changes for ipq5018 compilation.
Added device ID and target type checks for ipq5018 traget.

Change-Id: Ib86a371fbe66749fcb6d114e7a4a9931b684e03d
2020-03-20 23:45:43 -07:00
Alok Kumar
ffc116e798 qcacmn: HIF changes to support Moselle
Add HIF changes for supporting the newly
added IPCI bus type for Moselle

CRs-Fixed: 2597321
Change-Id: I9097e4622e9d6d561e92f5a21cb279c4d631cfbb
2020-01-18 04:44:35 -08:00
Nandha Kishore Easwaran
54532861c7 qcacmn: Disable wake irq for QCN9000
Disable wake IRQ for QCN9000 since it doesn't require wake
feature.

Change-Id: I62e8712f9c7c7624c84889740249f3b70b21d6ff
2020-01-07 04:39:13 -08:00
Rakesh Pillai
4863352e53 qcacmn: Unmap the htc connect buffer after connect failure
The htc connect message buffer is not unmapped,
if the firmware does not send wmi ready event to the
host.

Scenario:
- Host sends htc init command.
- The command is queued into the src ring.
- The firmware has crashed before the Copy Engine
  could copy the message to the destination ring
- Due to the above point, no copy completion
  interrupt is received.
- The host times out during its wait for the wmi
  ready event.
- Hence the htc init command buffer stays unmapped
  and unfreed.

As a part of the wma ready event missing cleanup,
the htc connect buffer is not unmapped. Fix this
to avoid missing to unmap the buffer.

To avoid a side effect of sending a completion for
HTC connect command, all the commands are freed in
the htc completion handler in case of SSR.

CRs-Fixed: 2512344
Change-Id: I05026b3cbb764197e6df85c41634002d271a50e5
2019-12-25 22:11:36 -08: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
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
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
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
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
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
Akshay Kosigi
af98d7cbbe qcacmn: CONFIG_WIN Macros to be moved out of HIF/HTC
Remove CONFIG_WIN from HIF and HTC module

Change-Id: If5001a16047f802b077e6cd9b211a912df5ca55e
CRs-Fixed: 2349905
2019-06-24 15:44:32 -07:00
Yue Ma
ac6b275768 qcacmn: Record caller and timestamp for pm_runtime_mark_last_busy
pm_runtime_mark_last_busy will extend the timer for runtime suspend.
Recording caller and timestamp can help to debug who may prevent
runtime PM suspend.

Change-Id: I4848a2558197e0fc9b7300421a5a1993817333e4
CRs-fixed: 2457803
2019-05-30 19:29:48 -07:00
Venkata Sharath Chandra Manchala
ec01bbcfbe qcacmn: Copy HTC Packet data
Make a local copy of HTC buffer before giving it
to Firmware through CE

Change-Id: Ib11ee7f0d7cd7b055768c0fe10627b81383257f3
CRs-Fixed: 2434881
2019-05-13 13:11:33 -07:00
Basamma Yakkanahalli
b85768e4e5 qcacmn: Remove HK header dependencies for ipq6018 compilation
Add target specific HW header for ipq6018 compilation.
Remove the 8074 header dependencies for 6018 compilation.

Change-Id: I8e45e3e039a4596c6722538405dcd381918fa6b1
2019-05-02 01:25:01 -07:00
hangtian
c572f5f517 qcacmn: Memory optimize for QCS403 platform
Memory optimize for QCS403 platform, 1x1 chip. Reduce CE1 htt data
dest ring buffer from 512 to 256, reduce CE2 wmi dest ring buffer from
128 to 64, reduce CE9 & CE10 desg ring buffer from 512 to 64, disable
CE11 pktlog. Note: this change only affect specific WLAN build config for
extremely saving memory, for debug purose, there is another build
selecting default WLAN config for reference HW.

Change-Id: I868e74b09cdb11df3dccaa3f9e051da55724983d
CRs-Fixed: 2432632
2019-04-25 21:54:04 -07:00
Jeff Johnson
8d639a00e4 qcacmn: hif: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within hif replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I929cb64ee0523d11bc86d5145aade1ec5a713071
CRs-Fixed: 2418257
2019-03-28 13:13:29 -07:00
Akshay Kosigi
181b2f52e6 qcacmn: Clean up HIF module to remove CONFIG_WIN macros
Replace CONFIG_WIN macro definitions with feature based macros
for HIF module.

Change-Id: I31a3ef0f70d19f838e2dff0db345e765a0aeb84e
CRs-Fixed: 2407222
2019-03-14 19:27:51 -07:00
Venkata Sharath Chandra Manchala
cad74add80 qcacmn: Add support for full pktlog
1. Enable CE5 and allow it to service
   pktlog messages from the firmware.
2. Register full pktlog callback handlers
   for handling sw_events and full tx pktlog.

Change-Id: Ifb70ac0993f2402201f88758845f730cf677b1a0
CRs-Fixed: 2388906
2019-02-21 23:25:30 -08:00
Nirav Shah
3e6e04bc0c qcacmn: Fix epping mode for QCN7605
Epping mode is currently borken in qcacld-3.2 codebase.
Fix epping mode for QCN7605 for USB and PCIe interface.

Change-Id: I5ae5ff70b77836cdd6c3d002cf98d4949838b624
CRs-Fixed: 2400180
2019-02-21 01:46:35 -08:00
Madhvapathi Sriram
bfb0112412 qcacmn: Remove error log for qdf_mem_malloc in hif/htc files
qdf layer already has the error trace

Change-Id: I83441fb5ab2e954f670f2891ecec8fccf5abf9a7
CRs-Fixed: 2376419
2019-02-12 04:47:40 -08:00
Nirav Shah
bc8daa44ae qcacmn: Changes to support rri_over_ddr support for Genoa
Changes to support rri_over_ddr support for Genoa.

Change-Id: I9b14b4622a5e4413eaee9caec1f9e540db9bab7f
CRs-Fixed: 2357346
2019-01-30 00:03:10 -08:00
Pavankumar Nandeshwar
7eddeddb17 qcacmn: Make ce-debug lock per HIF
Make ce-debug buffer lock per HIF instead
of global. Rectify the #if conditional macros.

Change-Id: I0063014ed2fd9c7716386877dcbefec40e9fa2d9
2019-01-28 12:20:49 -08:00
Nirav Shah
8e93027a2e qcacmn: Changes to support QMI BYPASS for Genoa
Changes to support QMI BYPASS for Genoa.

Change-Id: I371e7f3413d6dec95eee64babcd8f3aaebaf7f3b
CRs-Fixed: 2357361
2019-01-03 18:32:55 -08:00
Basamma Yakkanahalli
5f7cfd49c2 qcacmn: Device and Target type support for qca6018
Added target and device type support for qca6018.

Change-Id: I85382bf053d0a5f34cfaf0cca78a4b66b4265989
CRs-Fixed: 2323023
2018-11-27 00:32:00 -08:00
Basamma Yakkanahalli
30265f8aeb qcacmn: add target_service_to_ce_map for ipq6018
Populating the data structure target_service_to_ce_map
for IPQ6018 platform.

Change-Id: If89f873a6124240f56b93b4b12464a1e388df272
CRs-Fixed: 2324518
2018-11-27 00:31:56 -08:00