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

Commit ffe4a7cf authored by Sandeep Singh's avatar Sandeep Singh
Browse files

icnss: Add code to pass device configs to wlan driver



Add code to pass device configs to wlan driver.

Change-Id: I977fc564914f9fbdabc0004eff4c5c2f14a1fc7c
Signed-off-by: default avatarSandeep Singh <quic_sandsing@quicinc.com>
parent 48274fac
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -654,6 +654,15 @@ bool icnss_is_fw_ready(void)
}
EXPORT_SYMBOL(icnss_is_fw_ready);

unsigned long icnss_get_device_config(void)
{
	if (!penv)
		return 0;

	return penv->device_config;
}
EXPORT_SYMBOL(icnss_get_device_config);

void icnss_block_shutdown(bool status)
{
	if (!penv)
@@ -3804,6 +3813,14 @@ static int icnss_smmu_dt_parse(struct icnss_priv *priv)
	return 0;
}

static void icnss_read_device_configs(struct icnss_priv *priv)
{
	if (of_property_read_bool(priv->pdev->dev.of_node,
				  "wlan-ipa-disabled")) {
		set_bit(ICNSS_IPA_DISABLED, &priv->device_config);
	}
}

static int icnss_probe(struct platform_device *pdev)
{
	int ret = 0;
@@ -3831,6 +3848,8 @@ static int icnss_probe(struct platform_device *pdev)

	icnss_allow_recursive_recovery(dev);

	icnss_read_device_configs(priv);

	ret = icnss_resource_parse(priv);
	if (ret)
		goto out;
+1 −0
Original line number Diff line number Diff line
@@ -388,6 +388,7 @@ struct icnss_priv {
	struct workqueue_struct *soc_update_wq;
	bool is_chain1_supported;
	bool chain_reg_info_updated;
	unsigned long device_config;
};

struct icnss_reg_info {
+5 −0
Original line number Diff line number Diff line
@@ -21,6 +21,10 @@ enum icnss_uevent {
	ICNSS_UEVENT_HANG_DATA,
};

enum icnss_device_config {
	ICNSS_IPA_DISABLED,
};

struct icnss_uevent_hang_data {
	void *hang_event_data;
	uint16_t hang_event_data_len;
@@ -152,4 +156,5 @@ extern void icnss_block_shutdown(bool status);
extern bool icnss_is_pdr(void);
extern int icnss_idle_restart(struct device *dev);
extern int icnss_idle_shutdown(struct device *dev);
extern unsigned long icnss_get_device_config(void);
#endif /* _ICNSS_WLAN_H_ */