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

Commit 5032a768 authored by Ahmad Masri's avatar Ahmad Masri Committed by Gerrit - the friendly Code Review server
Browse files

msm_11ad: add support for AP power save



Wigig devices can support AP power save. Add a support in msm_11ad
driver to check if device tree enables AP PS feature.

Change-Id: Ia0249b830fa3f5b53ffe22b3e08c841eb28fbf27
Signed-off-by: default avatarAhmad Masri <amasri@codeaurora.org>
parent 9d8eff77
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -126,6 +126,7 @@ struct msm11ad_ctx {
	struct cpumask boost_cpu_1;

	bool keep_radio_on_during_sleep;
	bool use_ap_ps;
	int features;
};

@@ -1054,6 +1055,7 @@ static int msm_11ad_probe(struct platform_device *pdev)
	 *	qcom,msm-bus,vectors-KBps =
	 *		<100 512 0 0>,
	 *		<100 512 600000 800000>;
	 *	qcom,use-ap-power-save; (ctx->use_ap_ps)
	 *};
	 * rc_node stands for "qcom,pcie", selected entries:
	 * cell-index = <1>; (ctx->rc_index)
@@ -1094,6 +1096,8 @@ static int msm_11ad_probe(struct platform_device *pdev)
		rc = -EINVAL;
		goto out_module;
	}
	ctx->use_ap_ps = of_property_read_bool(of_node,
					       "qcom,use-ap-power-save");

	/*== execute ==*/
	/* turn device on */
@@ -1558,6 +1562,12 @@ static int ops_get_capa(void *handle)
	if (!ctx->smmu_s1_bypass)
		capa |= BIT(WIL_PLATFORM_CAPA_SMMU);

	pr_debug("%s: use AP power save is %s\n", __func__, ctx->use_ap_ps ?
		 "allowed" : "not allowed");

	if (ctx->use_ap_ps)
		capa |= BIT(WIL_PLATFORM_CAPA_AP_PS);

	return capa;
}