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

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

Merge "net: usb: Implement new IOCTLs for RmNET data driver"

parents 2c586a04 a9877b83
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -572,6 +572,30 @@ static int rmnet_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
		DBG0("[%s] rmnet_ioctl(): close transport port\n", dev->name);
		break;

	case RMNET_IOCTL_GET_SUPPORTED_FEATURES:
		break;

	case RMNET_IOCTL_SET_MRU:
		if (test_bit(EVENT_DEV_OPEN, &unet->flags))
			return -EBUSY;

		/* 16K max */
		if ((size_t)ifr->ifr_ifru.ifru_data > 0x4000)
			return -EINVAL;

		unet->rx_urb_size = (size_t)ifr->ifr_ifru.ifru_data;
		DBG0("[%s] rmnet_ioctl(): SET MRU to %u\n", dev->name,
				unet->rx_urb_size);
		break;

	case RMNET_IOCTL_GET_MRU:
		ifr->ifr_ifru.ifru_data = (void *)unet->rx_urb_size;
		break;

	case RMNET_IOCTL_GET_DRIVER_NAME:
		rc = copy_to_user(ifr->ifr_ifru.ifru_data, unet->driver_name,
				strlen(unet->driver_name));
		break;
	default:
		dev_err(&unet->intf->dev, "[%s] error: "
			"rmnet_ioct called for unsupported cmd[%d]",