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

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

Merge "msm: ipa: Change error value for set quota"

parents bb4a1c68 bc3759e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2561,7 +2561,7 @@ int rmnet_ipa_set_data_quota(struct wan_ioctl_set_data_quota *data)
	if (index == MAX_NUM_OF_MUX_CHANNEL) {
		IPAWANERR("%s is an invalid iface name\n",
			  data->interface_name);
		return -EFAULT;
		return -ENODEV;
	}

	mux_id = mux_channel[index].mux_id;
+8 −4
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ static dev_t device;

static long wan_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
	int retval = 0;
	int retval = 0, rc = 0;
	u32 pyld_sz;
	u8 *param = NULL;

@@ -183,9 +183,13 @@ static long wan_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
			retval = -EFAULT;
			break;
		}
		if (rmnet_ipa_set_data_quota(
		(struct wan_ioctl_set_data_quota *)param)) {
		rc = rmnet_ipa_set_data_quota(
			(struct wan_ioctl_set_data_quota *)param);
		if (rc != 0) {
			IPAWANERR("WAN_IOC_SET_DATA_QUOTA failed\n");
			if (rc == -ENODEV)
				retval = -ENODEV;
			else
				retval = -EFAULT;
			break;
		}
+1 −1
Original line number Diff line number Diff line
@@ -2720,7 +2720,7 @@ int rmnet_ipa3_set_data_quota(struct wan_ioctl_set_data_quota *data)
	if (index == MAX_NUM_OF_MUX_CHANNEL) {
		IPAWANERR("%s is an invalid iface name\n",
			  data->interface_name);
		return -EFAULT;
		return -ENODEV;
	}

	mux_id = rmnet_ipa3_ctx->mux_channel[index].mux_id;
+8 −4
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ static long ipa3_wan_ioctl(struct file *filp,
		unsigned int cmd,
		unsigned long arg)
{
	int retval = 0;
	int retval = 0, rc = 0;
	u32 pyld_sz;
	u8 *param = NULL;

@@ -246,9 +246,13 @@ static long ipa3_wan_ioctl(struct file *filp,
			retval = -EFAULT;
			break;
		}
		if (rmnet_ipa3_set_data_quota(
		(struct wan_ioctl_set_data_quota *)param)) {
		rc = rmnet_ipa3_set_data_quota(
			(struct wan_ioctl_set_data_quota *)param);
		if (rc != 0) {
			IPAWANERR("WAN_IOC_SET_DATA_QUOTA failed\n");
			if (retval == -ENODEV)
				retval = -ENODEV;
			else
				retval = -EFAULT;
			break;
		}