socsvn commit: r304246 - soc2016/vincenzo/head/sys/dev/netmap

vincenzo at FreeBSD.org vincenzo at FreeBSD.org
Tue May 31 10:27:41 UTC 2016


Author: vincenzo
Date: Tue May 31 10:27:39 2016
New Revision: 304246
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=304246

Log:
   freebsd: ptnet: introduce ptnet_ioctl()

Modified:
  soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c

Modified: soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c
==============================================================================
--- soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c	Tue May 31 10:27:20 2016	(r304245)
+++ soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c	Tue May 31 10:27:39 2016	(r304246)
@@ -139,6 +139,7 @@
 static int	ptnet_shutdown(device_t);
 
 static void	ptnet_init(void *opaque);
+static int	ptnet_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
 static void	ptnet_start(struct ifnet *ifp);
 
 static int	ptnet_media_change(struct ifnet *ifp);
@@ -283,6 +284,7 @@
 	ifp->if_softc = sc;
 	ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX;
 	ifp->if_init = ptnet_init;
+	ifp->if_ioctl = ptnet_ioctl;
 	ifp->if_start = ptnet_start;
 
 	IFQ_SET_MAXLEN(&ifp->if_snd, 255);
@@ -494,6 +496,19 @@
 	(void)sc;
 }
 
+static int
+ptnet_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+{
+	int err = 0;
+
+	switch (cmd) {
+		default:
+			err = ether_ioctl(ifp, cmd, data);
+	}
+
+	return err;
+}
+
 static void
 ptnet_start(struct ifnet *ifp)
 {


More information about the svn-soc-all mailing list