Subject: RE: [PATCH net-next-2.6 09/13] net-caif: add CAIF netdevice

From: Marcel Holtmann <[email-masked]>
Date: Tue, 02 Feb 2010 06:14:40 -0800

Hi Sjur,

> >> +int chnl_net_ioctl(unsigned int cmd, unsigned long arg, bool
> >> +from_user_land) { +	struct chnl_net *priv;
> >> +	int result = -1;
> >> +	struct chnl_net *dev;
> >> +	struct net_device *netdevptr;
> >> +	int ret;
> >> +	struct ifreq ifreq;
> >> +	struct ifcaif_param param;
> >> +	rtnl_lock();
> >> +	if (from_user_land) {
> >> +		if (copy_from_user(&ifreq, (const void *)arg, sizeof(ifreq)))
> >> +			return -EFAULT; +	} else
> >> +		memcpy(&ifreq, (void *)arg, sizeof(ifreq));
> > 
> > Why do you need both an ioctl and a netlink interface?
> 
> Well, I would like to keep support for both netlink and ioctl.
> Internally we are using a netlink interface, and oFono is using ioctl to create interfaces.

we could try to convert oFono in using netlink. Shouldn't be that hard
as long as it is RTNL. Only the generic netlink is painful in userspace
applications with a mainloop.

Regards

Marcel