Commit graph

35 commits

Author SHA1 Message Date
codeworkx
15f81a19b5 Merge tag 'LA.UM.7.4.r1-05300-8x98.0' into lineage-16.0
"LA.UM.7.4.r1-05300-8x98.0"

Change-Id: I8e27939efccb7d0bda0ac7c4e32afdf3c6d62507
2019-06-16 08:15:21 +02:00
Sandeep Singh
ab8f63420c icnss: Add Api to Block/Unblock modem shutdown
Add API to Block/Unblock modem graceful shutdown.

Change-Id: I69b061fc7d25762b2c36d9590802addfc170f91f
Signed-off-by: Sandeep Singh <sandsing@codeaurora.org>
2019-03-27 18:10:38 +05:30
liochen
8148b9d900 Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0
kernel device tree source code for OnePlus 5 & 5T P device

Change-Id: I84f40e66833ea1ce30eb1d9a710d6e1529e9e637
2018-12-26 11:02:39 +08:00
Anurag Chouhan
e7ad20af9a icnss: Add a flag to indicare FW rejuvenate
Add a flag to maintain fw rejuvenate state,
set if fw rejuvenate happens and reset at fw ready.
export an API to the wlan host driver to distinguish the
case of ssr or pdr with the FW rejuventae.

Change-Id: I7a01cc4996f68f78aa13eacf36648331a701882a
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
2018-08-30 02:21:41 -07:00
Yuanyuan Liu
8d7bc77acd icnss: Remove sending uevent after FW ready
FW ready indication doesn't mean it is safe to access HW register.
FW ready only means that WLAN FW is initialized. The HW register
is safe to access only after FW ack the wlan enable mode request.
Hence removing uevent in FW ready indication handler. WLAN driver
will responsible for setting FW ready state once wlan enable mode
request is return success.

CRs-Fixed: 2168628
Change-Id: I769d848efb9dd427da0d71494090fcbf9514cfb2
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2018-01-25 10:23:36 -08:00
Yuanyuan Liu
daee03cd52 icnss: Do not send uevent when driver is unloading
If modem crashed during wlan driver unloading, icnss driver
will call driver uevent callback to send FW down uevent when
it receives BEFORE_SHUTDOWN notification. If wlan driver is
de-initialized just before the callback is called, kernel will
panic as driver's context is freed. This can be avoid by not
sending uevent when wlan host driver is unloading. Instead,
icnss driver will provide an API to host driver to check if
WLAN FW is down or not.

CRs-Fixed: 2161425
Change-Id: I569fd85366522606ececeda74df85c51b9b2fc28
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2017-12-20 10:53:14 -08:00
Sarada Prasanna Garnayak
f89e708410 icnss: Add dev to all export APIs in ICNSS
Add device pointer in all export symbol to
add support for numerous WLAN module.

CRs-Fixed: 2138446
Change-Id: I981155c165e4e5c2794b778afe647f8a588dd860
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2017-11-29 01:33:36 -08:00
Linux Build Service Account
63c0d4a4b6 Merge "icnss: change the cnss name to icnss" 2017-06-15 16:10:55 -07:00
Paul Zhang
8510e2c28b icnss: change the cnss name to icnss
Refine the code change for this changeID:
I335a046a886ac3ce35cf96eb71231bfe75d33c60

CRs-Fixed: 2058348
Change-Id: I9a734c8bed284870562ff2d096e7316328f37e02
Signed-off-by: Paul Zhang <paulz@codeaurora.org>
2017-06-14 17:38:43 +08:00
Anurag Chouhan
92dc4179ca icnss: Change MSA permissions to collect dump
With certain senarios such as error FATAL, WBOG Bite in modem
WLAN hardware is still alive, while trying to collect the dump
platform driver is removing the MSA permissions from MSS
and WLAN Hardware to HLOS, at the same time if WLAN Hardware
is trying to access the MSA region which results into SNOC error
To avoid such senarios instead of removing MSS and WLAN permissions
MSA is assigned HLOS permissions as well and once the ramdump is collected
HLOS permissions will be removed.

Change-Id: Ic71e0fa8c064fd70dad9958187244909cbb80c0a
CRs-fixed: 2048531
Signed-off-by: Anurag Chouhan <achouhan@qti.qualcomm.com>
2017-06-13 22:51:19 -07:00
Amar Singhal
e090be48c6 icnss: Add APIs to store driver load count
Host wlan driver needs to know if the drive has been
reloaded and wiphy re-registered with the kernel.
Therefore add APIs to retrieve this information.

CRs-Fixed: 2058292
Change-Id: Ia323e31e9b6779e2f5279f42b6e1860a9259a189
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
2017-06-09 12:45:06 -07:00
Paul Zhang
e184fd8d15 cnss: save the cc source to platform driver
There is a design limitation in host driver. Driver
sends regulatory_hint_user for both user-space and
11d country to kernel. So when wiphy re-registration
happens, kernel tells the source as USER even for 11d.
And per driver logic the 11d needs to be disabled
if INI gCountryCodePriority is set.

To mitigate this issue, storing the country source
in the platform driver.

CRs-Fixed: 2051651
Change-Id: I335a046a886ac3ce35cf96eb71231bfe75d33c60
Signed-off-by: Paul Zhang <paulz@codeaurora.org>
2017-05-24 05:53:23 -07:00
Anurag Chouhan
c1f5dcc5e8 icnss: Send FW Down indication to WLAN host driver
If FW is down irrespective of crash, a uevent
is sent to wlan host driver to indicate FW is down.

Change-Id: I9fe2a2a11178f72ea27150d74d93a1e411eac030
CRs-fixed: 2027902
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
2017-04-03 12:18:37 +05:30
Prashanth Bhatta
b70b942f24 icnss: For WDOG bite, shutdown after FW ready
When there is Modem WDOG bite, Q6 will not get chance to reset
the hardware and if shutdown is called as part of PD down
notification then freeing buffers already submitted to hardware
may cause exceptions as hardware may try to access DDR location
which is already freed.
Fix the issue by delaying the shutdown till FW ready happens and
hardware is reset to clean state this way buffers are freed after
hardware is in reset state.

CRs-fixed: 2000709
Change-Id: Iacea5e8b712dd4ca310e5b502e43f4beb99f6981
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
2017-02-09 16:41:22 -08:00
Yuanyuan Liu
28616cc435 icnss: rename and change the type of enable_fw_log
enable_fw_log is renamed to fw_log_mode and changed
from boolean type to uint8_t, so that it can support
multiple log mode.

CRs-Fixed: 1116983
Change-Id: I9d4af7cd2c857b62f434d968f51af76121006907
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2017-01-31 10:44:59 -08:00
Sameer Thalappil
1737536231 icnss: Add support for host initiated recovery
Add an API that can trigger WLAN PDR. WLAN host driver can use
this API to trigger PDR in the cases where it fails to communicate
with FW over it's native copy engine interface.

CRs-Fixed: 1110381
Change-Id: I7a076ba023b3e48c9e5473ec4895f50c71816831
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2017-01-12 15:13:16 -08:00
Sarada Prasanna Garnayak
72f739bbe7 icnss: Provide API to check the firmware ready status
API check the wlan firmware ready status in icnss platform
data and return the status(true/false) to caller.

CRs-Fixed: 1106520
Change-Id: I1246e6c213011d73ade5078c07bb2190135e54ec
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2017-01-01 23:07:41 -08:00
Yuanyuan Liu
97e02e9dfb icnss: Remove dev reference
Remove dev reference in icnss_set_wlan_mac_address as
this function is called by external module and won't
be able to get ICNSS dev pointer.

CRs-Fixed: 1099641
Change-Id: I21c992676c41b6cdc3ea53722806e8d0be78d9d5
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-12-12 09:52:36 -08:00
Yuanyuan Liu
d9a8fa86c0 icnss: Add support of setting MAC address from platform driver
Add support of setting WLAN MAC address from platform driver.
The MAC address will be passed to WLAN driver when WLAN is
turned on.

CRs-Fixed: 1096286
Change-Id: I249222b419dd130241cbc84f4d41709b408941e0
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-12-01 10:56:24 -08:00
Linux Build Service Account
49042f0e43 Merge "icnss: Provide API to check QMI support" 2016-10-07 22:15:42 -07:00
Hardik Kantilal Patel
0cc08805eb icnss: Provide API to check QMI support
Provide API to check QMI support present or not to WLAN
host driver. Based on this information driver can pass the
DMA physical address info via shadow register to WLAN FW.

CRs-Fixed: 1073647
Change-Id: Iec9d3a3b468ddf6607e4a942bb3cf9133e9f0c34
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
2016-10-06 23:00:51 -07:00
Yuanyuan Liu
8f276a71c0 icnss: Remove unused suspend/resume functions
Remove unused suspend/resume functions as pm_suspend/pm_resume
are the functions that being called during system suspend/resume.

CRs-Fixed: 1074250
Change-Id: Ifd1d90402d6f79dc96246c4825d46d41296b0ba5
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-10-04 15:49:56 -07:00
Yuanyuan Liu
2d44f9a775 icnss: Provide ICNSS support of reading SOC serial number
Provide support of reading SOC serial number. This will be used
for auto-generate WLAN MAC address.

CRs-Fixed: 1069005
Change-Id: Ie2072768b2fab3bcbdc70798897ca66614ee8a06
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-09-20 12:18:34 -07:00
Yuanyuan Liu
1947a834f5 icnss: Add support of sending athdiag read/write messages
Add support of sending athdiag read/write commands through QMI.
This enhance the runtime debugging of WLAN Hardware.

CRs-Fixed: 1038933
Change-Id: I6639ecce6c24d8b9757a98757bcc3f0cd4b2e9b2
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-09-12 09:55:52 -07:00
Yuanyuan Liu
b56e6e2c96 icnss: Add support of suspend_noirq/resume_noirq
Register suspend_noirq and resume_noirq for WLAN driver.
This could make sure that no wake up is pending from FW
and if initial wake up is received then failing suspend_noirq
should trigger resume.

CRs-Fixed: 1060667
Change-Id: Ib233ce66ad21819d2d62155072f0bf985a12837b
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-09-12 09:51:38 -07:00
Yuanyuan Liu
6b6d7f362e icnss: Add ICNSS utility file
Add ICNSS utility file, which provides APIs for getting/setting
WLAN DFS channels.

CRs-Fixed: 1060783
Change-Id: Iae89ce7b26453f9a0ff3214bd5598ee11e181857
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-09-10 17:39:41 -07:00
Yuanyuan Liu
a207e02a1d icnss: Provide APIs for getting SMMU mapping context
Provide APIs for getting SMMU mapping context to WLAN
driver.

CRs-Fixed: 1049889
Change-Id: Id7c6aa45608911ae2510e953e4c7d8ae19f8a111
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-08-11 15:47:30 -07:00
Yuanyuan Liu
c31155183b icnss: pass fw version to wlan driver
Update wlan fw version when wlan driver calls icnss_get_soc_info.

Change-Id: I1fda7209901cba2746d6d933796a07416cd1b021
CRs-Fixed: 1046753
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-07-27 10:18:25 -07:00
Yuanyuan Liu
ffb92f5b33 icnss: Export APIs for power on/off WLAN hardware
Export APIs to WLAN driver to power on/off WLAN hardware.

CRs-Fixed: 1017496
Change-Id: I4b09b7e9ee97129f952d737a530fc04205259f24
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-06-07 11:58:05 -07:00
Prashanth Bhatta
e8d675996c icnss: Add IPC logging
Add IPC logging mechanism so that all the driver logs can be
retrieved on the need basis.
Also use pr_fmt to format the logs so that icnss driver logs are
consistent.

Change-Id: I977b04964ac28c18f4ad85094746aa864f03d0c3
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
2016-06-01 15:21:42 -07:00
Sameer Thalappil
090978665c icnss: Add API to return the CE IRQ number
API retrieves the IRQ number for the CE ID passed.

Change-Id: I87cca1215134e6d406f60d54f6d0430978eeae9c
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2016-05-26 15:26:58 -07:00
Prashanth Bhatta
3cc4528523 icnss: Remove unused APIs
Remove unused APIs icnss_register_ce_irq &
icnss_unregister_ce_irq. These APIs are divided into multiple APIs
to provide flexibility to WLAN driver.

Change-Id: Icd56b61a372cb18e6600617184d8b185b78ce99d
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
2016-05-24 17:56:54 -07:00
Yuanyuan Liu
7c7f4fd1cf icnss: Update WLAN mode in wlan_firmware_service
Add CCPM/QVIT in WLAN mode and add support fo setting
WLAN mode from command line.

CRs-Fixed: 986484
Change-Id: I5921dc3978bf96221b50148bb2f86b0ffed3b5fb
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-04-07 15:55:54 -07:00
Yuanyuan Liu
fee5dd5aba icnss: Update WLFW QMI messages
Add QMI message to send MSA0 physical memory start address
and size to wlan FW.
Add QMI message indication to get the HAL-PYH Pin connect test
result from wlan FW.
Add a new qmi message for sending fw debug configuration.
Update cap_resp message.

CRs-Fixed: 978217
Change-Id: Ie0fa374b720ebbffd1d1fd5b9289b2aa816a822a
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-04-04 20:13:17 -07:00
Yue Ma
791a6a69a5 net: icnss: Add snapshot of icnss driver
This is a snapshot of the icnss driver and associated files as of
msm-3.18 commit:

e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 (Promotion of kernel.lnx.
3.18-151201.)

Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-22 11:16:42 -07:00