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

Commit 5451237f authored by Subash Abhinov Kasiviswanathan's avatar Subash Abhinov Kasiviswanathan Committed by David S. Miller
Browse files

net: qualcomm: rmnet: Remove duplicate setting of rmnet_devices



The rmnet_devices information is already stored in muxed_ep, so
storing this in rmnet_devices[] again is redundant.

Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 56470c92
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ struct rmnet_port {
	struct rmnet_endpoint muxed_ep[RMNET_MAX_LOGICAL_EP];
	u32 ingress_data_format;
	u32 egress_data_format;
	struct net_device *rmnet_devices[RMNET_MAX_LOGICAL_EP];
	u8 nr_rmnet_devs;
	u8 rmnet_mode;
};
+4 −4
Original line number Diff line number Diff line
@@ -105,12 +105,12 @@ int rmnet_vnd_newlink(u8 id, struct net_device *rmnet_dev,
	struct rmnet_priv *priv;
	int rc;

	if (port->rmnet_devices[id])
	if (port->muxed_ep[id].egress_dev)
		return -EINVAL;

	rc = register_netdevice(rmnet_dev);
	if (!rc) {
		port->rmnet_devices[id] = rmnet_dev;
		port->muxed_ep[id].egress_dev = rmnet_dev;
		port->nr_rmnet_devs++;

		rmnet_dev->rtnl_link_ops = &rmnet_link_ops;
@@ -127,10 +127,10 @@ int rmnet_vnd_newlink(u8 id, struct net_device *rmnet_dev,

int rmnet_vnd_dellink(u8 id, struct rmnet_port *port)
{
	if (id >= RMNET_MAX_LOGICAL_EP || !port->rmnet_devices[id])
	if (id >= RMNET_MAX_LOGICAL_EP || !port->muxed_ep[id].egress_dev)
		return -EINVAL;

	port->rmnet_devices[id] = NULL;
	port->muxed_ep[id].egress_dev = NULL;
	port->nr_rmnet_devs--;
	return 0;
}