icnss: Add support of skiping QMI

Add support of skiping QMI messaging when ICNSS driver is initialized.
So that we can disable QMI communication between WLAN Host and FW when
QMI framework is not supported.

CRs-Fixed: 978953
Change-Id: I7a9a61c8aa11bd5c0f5f2effc487a2225e27011d
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
This commit is contained in:
Yuanyuan Liu 2016-01-07 10:23:28 -08:00 committed by Jeevan Shriram
parent 4e488ab03a
commit bf78a129db
2 changed files with 12 additions and 0 deletions

View file

@ -14,6 +14,7 @@ Required properties:
- qcom,wlan-msa-memory: MSA memory size
Optional properties:
- qcom,skip-qmi: Boolean property to decide whether to use QMI or not
Example:
@ -35,4 +36,5 @@ Example:
<0 140 0 /* CE10 */ >,
<0 141 0 /* CE11 */ >;
qcom,wlan-msa-memory = <0x200000>;
qcom,skip-qmi;
};

View file

@ -99,6 +99,7 @@ static struct {
u32 rf_pin_result;
struct icnss_mem_region_info
icnss_mem_region[QMI_WLFW_MAX_NUM_MEMORY_REGIONS_V01];
bool skip_qmi;
} *penv;
static int icnss_qmi_event_post(enum icnss_qmi_event_type type, void *data)
@ -810,6 +811,9 @@ int icnss_register_driver(struct icnss_driver_ops *ops)
}
penv->ops = ops;
if (penv->skip_qmi)
penv->state |= ICNSS_FW_READY;
/* check for all conditions before invoking probe */
if (ICNSS_IS_FW_READY(penv->state) && penv->ops->probe) {
ret = penv->ops->probe(&pdev->dev);
@ -1101,6 +1105,9 @@ skip:
if (ret)
pr_err("%s: Failed to send mode, ret = %d\n", __func__, ret);
out:
if (penv->skip_qmi)
ret = 0;
return ret;
}
EXPORT_SYMBOL(icnss_wlan_enable);
@ -1175,6 +1182,9 @@ static int icnss_probe(struct platform_device *pdev)
goto out;
}
penv->skip_qmi = of_property_read_bool(dev->of_node,
"qcom,skip-qmi");
penv->qmi_event_wq = alloc_workqueue("icnss_qmi_event", 0, 0);
if (!penv->qmi_event_wq) {
pr_err("%s: workqueue creation failed\n", __func__);