summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-12-20 12:37:46 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-12-20 12:37:45 -0800
commita3cf98624f04268cb9ac3ca43b83368089edcb19 (patch)
tree12977c1724e3c84e598e41122ea684c9cdfa99a8
parent86451b3a26d55ed15f96919feed931c8e86e87b1 (diff)
parent50e6a826d7770faece1a77ec30208e668f885a03 (diff)
Merge "msm: ipa: Change error value for set quota"
-rw-r--r--drivers/platform/msm/ipa/ipa_v2/rmnet_ipa.c2
-rw-r--r--drivers/platform/msm/ipa/ipa_v2/rmnet_ipa_fd_ioctl.c12
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c2
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/rmnet_ipa_fd_ioctl.c12
4 files changed, 18 insertions, 10 deletions
diff --git a/drivers/platform/msm/ipa/ipa_v2/rmnet_ipa.c b/drivers/platform/msm/ipa/ipa_v2/rmnet_ipa.c
index b158b2b1c326..80e51ad61417 100644
--- a/drivers/platform/msm/ipa/ipa_v2/rmnet_ipa.c
+++ b/drivers/platform/msm/ipa/ipa_v2/rmnet_ipa.c
@@ -2647,7 +2647,7 @@ static int rmnet_ipa_set_data_quota_modem(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;
diff --git a/drivers/platform/msm/ipa/ipa_v2/rmnet_ipa_fd_ioctl.c b/drivers/platform/msm/ipa/ipa_v2/rmnet_ipa_fd_ioctl.c
index 02bdd0334e7f..f2aecdaeff54 100644
--- a/drivers/platform/msm/ipa/ipa_v2/rmnet_ipa_fd_ioctl.c
+++ b/drivers/platform/msm/ipa/ipa_v2/rmnet_ipa_fd_ioctl.c
@@ -61,7 +61,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;
@@ -184,10 +184,14 @@ 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");
- retval = -EFAULT;
+ if (rc == -ENODEV)
+ retval = -ENODEV;
+ else
+ retval = -EFAULT;
break;
}
if (copy_to_user((u8 *)arg, param, pyld_sz)) {
diff --git a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c
index e49402afb6a2..9c28a6f4b3db 100644
--- a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c
+++ b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c
@@ -2791,7 +2791,7 @@ static int rmnet_ipa3_set_data_quota_modem(
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;
diff --git a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa_fd_ioctl.c b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa_fd_ioctl.c
index dc1e5ce511a6..522fe2d49e67 100644
--- a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa_fd_ioctl.c
+++ b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa_fd_ioctl.c
@@ -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;
@@ -247,10 +247,14 @@ 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");
- retval = -EFAULT;
+ if (retval == -ENODEV)
+ retval = -ENODEV;
+ else
+ retval = -EFAULT;
break;
}
if (copy_to_user((u8 *)arg, param, pyld_sz)) {