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

Commit dd43f0dc authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: rmnet_ipa: add support for RMNET_IOCTL_GET_SG_SUPPORT"

parents a33b681c 05969946
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@ Required properties:
Optional:
- qcom,rmnet-ipa-ssr: determine if modem SSR is supported
- qcom,ipa-loaduC: indicate that ipa uC should be loaded
- qcom,ipa-advertise-sg-support: determine how to respond to a query
regarding scatter-gather capability

Example:
	qcom,rmnet-ipa {
+18 −2
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ enum wwan_device_status {
struct ipa_rmnet_plat_drv_res {
	bool ipa_rmnet_ssr;
	bool ipa_loaduC;
	bool ipa_advertise_sg_support;
};

/**
@@ -1161,6 +1162,8 @@ static void apps_ipa_packet_receive_notify(void *priv,
	dev->stats.rx_bytes += packet_len;
}

static struct ipa_rmnet_plat_drv_res ipa_rmnet_res = {0, };

/**
 * ipa_wwan_ioctl() - I/O control for wwan network driver.
 *
@@ -1289,6 +1292,15 @@ static int ipa_wwan_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
				sizeof(struct rmnet_ioctl_extended_s)))
				rc = -EFAULT;
			break;
		/* GET SG support */
		case RMNET_IOCTL_GET_SG_SUPPORT:
			extend_ioctl_data.u.data =
				ipa_rmnet_res.ipa_advertise_sg_support;
			if (copy_to_user((u8 *)ifr->ifr_ifru.ifru_data,
				&extend_ioctl_data,
				sizeof(struct rmnet_ioctl_extended_s)))
				rc = -EFAULT;
			break;
		/*  Get endpoint ID  */
		case RMNET_IOCTL_GET_EPID:
			IPAWANDBG("get ioctl: RMNET_IOCTL_GET_EPID\n");
@@ -1823,8 +1835,6 @@ static struct notifier_block ssr_notifier = {
	.notifier_call = ssr_notifier_cb,
};

static struct ipa_rmnet_plat_drv_res ipa_rmnet_res = {0, };

static int get_ipa_rmnet_dts_configuration(struct platform_device *pdev,
		struct ipa_rmnet_plat_drv_res *ipa_rmnet_drv_res)
{
@@ -1838,6 +1848,12 @@ static int get_ipa_rmnet_dts_configuration(struct platform_device *pdev,
			"qcom,ipa-loaduC");
	pr_info("IPA ipa-loaduC = %s\n",
		ipa_rmnet_drv_res->ipa_loaduC ? "True" : "False");

	ipa_rmnet_drv_res->ipa_advertise_sg_support =
			of_property_read_bool(pdev->dev.of_node,
			"qcom,ipa-advertise-sg-support");
	pr_info("IPA SG support = %s\n",
		ipa_rmnet_drv_res->ipa_advertise_sg_support ? "True" : "False");
	return 0;
}