aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
diff options
context:
space:
mode:
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2017-09-02 23:30:42 -0600
committerDavid S. Miller <davem@davemloft.net>2017-09-03 21:27:18 -0700
commit61bf5490ec47f61b522ecf24958c835aefa38812 (patch)
treeeb9e8656cc5a18b7a1eb552d0f74e6890d9f98b9 /drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
parentnet: qualcomm: rmnet: Fix memory corruption if mux_id is greater than 32 (diff)
downloadlinux-dev-61bf5490ec47f61b522ecf24958c835aefa38812.tar.xz
linux-dev-61bf5490ec47f61b522ecf24958c835aefa38812.zip
net: qualcomm: rmnet: Remove the unused endpoint -1
This was used only in the original patch series where the IOCTLs were present and is no longer in use. Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> Cc: Dan Williams <dcbw@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c')
-rw-r--r--drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
index e836d267d5cc..3ca98ecda02b 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
@@ -42,7 +42,6 @@
*/
/* Local Definitions and Declarations */
-#define RMNET_LOCAL_LOGICAL_ENDPOINT -1
struct rmnet_walk_data {
struct net_device *real_dev;
@@ -89,10 +88,7 @@ rmnet_get_endpoint(struct net_device *dev, int config_id)
if (!r)
return NULL;
- if (config_id == RMNET_LOCAL_LOGICAL_ENDPOINT)
- ep = &r->local_ep;
- else
- ep = &r->muxed_ep[config_id];
+ ep = &r->muxed_ep[config_id];
}
return ep;
@@ -182,10 +178,7 @@ static int __rmnet_set_endpoint_config(struct net_device *dev, int config_id,
return -EINVAL;
memcpy(dev_ep, ep, sizeof(struct rmnet_endpoint));
- if (config_id == RMNET_LOCAL_LOGICAL_ENDPOINT)
- dev_ep->mux_id = 0;
- else
- dev_ep->mux_id = config_id;
+ dev_ep->mux_id = config_id;
return 0;
}
@@ -199,8 +192,7 @@ static int rmnet_set_endpoint_config(struct net_device *dev,
netdev_dbg(dev, "id %d mode %d dev %s\n",
config_id, rmnet_mode, egress_dev->name);
- if (config_id < RMNET_LOCAL_LOGICAL_ENDPOINT ||
- config_id >= RMNET_MAX_LOGICAL_EP)
+ if (config_id >= RMNET_MAX_LOGICAL_EP)
return -EINVAL;
/* This config is cleared on every set, so its ok to not