Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd0aa569 authored by Yuanyuan Liu's avatar Yuanyuan Liu
Browse files

icnss: Add support of skiping QMI



Add support of skiping QMI messaging when ICNSS driver is initialized.

CRs-Fixed: 978953
Change-Id: I7a9a61c8aa11bd5c0f5f2effc487a2225e27011d
Signed-off-by: default avatarYuanyuan Liu <yuanliu@codeaurora.org>
parent 2f2a03e6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
    };
+10 −0
Original line number Diff line number Diff line
@@ -98,6 +98,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)
@@ -809,6 +810,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);
@@ -1100,6 +1104,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);
@@ -1174,6 +1181,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__);