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>
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>
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>
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>
Refine the code change for this changeID:
I335a046a886ac3ce35cf96eb71231bfe75d33c60
CRs-Fixed: 2058348
Change-Id: I9a734c8bed284870562ff2d096e7316328f37e02
Signed-off-by: Paul Zhang <paulz@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Provide APIs for getting SMMU mapping context to WLAN
driver.
CRs-Fixed: 1049889
Change-Id: Id7c6aa45608911ae2510e953e4c7d8ae19f8a111
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
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>
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>
API retrieves the IRQ number for the CE ID passed.
Change-Id: I87cca1215134e6d406f60d54f6d0430978eeae9c
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
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>
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>
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>
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>