Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Mar 2015 14:23:08 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r280618 - projects/ifnet/sys/net
Message-ID:  <201503251423.t2PEN8Jn005428@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Wed Mar 25 14:23:07 2015
New Revision: 280618
URL: https://svnweb.freebsd.org/changeset/base/280618

Log:
  Remove vlan_cookie()/vlan_setcookie(), they are unused. Note that there
  is a plan to provide KPI to assign arbitrary cookies on ifnet(9).

Modified:
  projects/ifnet/sys/net/if_vlan.c
  projects/ifnet/sys/net/if_vlan_var.h

Modified: projects/ifnet/sys/net/if_vlan.c
==============================================================================
--- projects/ifnet/sys/net/if_vlan.c	Wed Mar 25 14:20:57 2015	(r280617)
+++ projects/ifnet/sys/net/if_vlan.c	Wed Mar 25 14:23:07 2015	(r280618)
@@ -106,7 +106,6 @@ struct	ifvlan {
 	struct	ifnet *ifv_ifp;
 #define	TRUNK(ifv)	((ifv)->ifv_trunk)
 #define	PARENT(ifv)	((ifv)->ifv_trunk->parent)
-	void	*ifv_cookie;
 	int	ifv_pflags;	/* special flags we have set on parent */
 	struct	ifv_linkmib {
 		int	ifvm_encaplen;	/* encapsulation length */
@@ -644,37 +643,6 @@ vlan_tag(struct ifnet *ifp, uint16_t *vi
 }
 
 /*
- * Return a driver specific cookie for this interface.  Synchronization
- * with setcookie must be provided by the driver. 
- */
-static void *
-vlan_cookie(struct ifnet *ifp)
-{
-	struct ifvlan *ifv;
-
-	if (ifp->if_type != IFT_L2VLAN)
-		return (NULL);
-	ifv = ifp->if_softc;
-	return (ifv->ifv_cookie);
-}
-
-/*
- * Store a cookie in our softc that drivers can use to store driver
- * private per-instance data in.
- */
-static int
-vlan_setcookie(struct ifnet *ifp, void *cookie)
-{
-	struct ifvlan *ifv;
-
-	if (ifp->if_type != IFT_L2VLAN)
-		return (EINVAL);
-	ifv = ifp->if_softc;
-	ifv->ifv_cookie = cookie;
-	return (0);
-}
-
-/*
  * Return the vlan device present at the specific VID.
  */
 static struct ifnet *
@@ -727,8 +695,6 @@ vlan_modevent(module_t mod, int type, vo
 		vlan_link_state_p = vlan_link_state;
 		vlan_trunk_cap_p = vlan_trunk_capabilities;
 		vlan_trunkdev_p = vlan_trunkdev;
-		vlan_cookie_p = vlan_cookie;
-		vlan_setcookie_p = vlan_setcookie;
 		vlan_tag_p = vlan_tag;
 		vlan_devat_p = vlan_devat;
 #ifndef VIMAGE
@@ -756,8 +722,6 @@ vlan_modevent(module_t mod, int type, vo
 		vlan_trunk_cap_p = NULL;
 		vlan_trunkdev_p = NULL;
 		vlan_tag_p = NULL;
-		vlan_cookie_p = NULL;
-		vlan_setcookie_p = NULL;
 		vlan_devat_p = NULL;
 		VLAN_LOCK_DESTROY();
 		if (bootverbose)

Modified: projects/ifnet/sys/net/if_vlan_var.h
==============================================================================
--- projects/ifnet/sys/net/if_vlan_var.h	Wed Mar 25 14:20:57 2015	(r280617)
+++ projects/ifnet/sys/net/if_vlan_var.h	Wed Mar 25 14:23:07 2015	(r280618)
@@ -114,11 +114,6 @@ struct	vlanreq {
 	(_ifp)->if_type == IFT_L2VLAN ? (*vlan_trunkdev_p)((_ifp)) : NULL
 #define	VLAN_TAG(_ifp, _vid)					\
 	(_ifp)->if_type == IFT_L2VLAN ? (*vlan_tag_p)((_ifp), (_vid)) : EINVAL
-#define	VLAN_COOKIE(_ifp)					\
-	(_ifp)->if_type == IFT_L2VLAN ? (*vlan_cookie_p)((_ifp)) : NULL
-#define	VLAN_SETCOOKIE(_ifp, _cookie)				\
-	(_ifp)->if_type == IFT_L2VLAN ?				\
-	    (*vlan_setcookie_p)((_ifp), (_cookie)) : EINVAL
 #define	VLAN_DEVAT(_ifp, _vid)					\
 	(_ifp)->if_vlantrunk != NULL ? (*vlan_devat_p)((_ifp), (_vid)) : NULL
 
@@ -126,8 +121,6 @@ extern	void (*vlan_trunk_cap_p)(struct i
 extern	struct ifnet *(*vlan_trunkdev_p)(struct ifnet *);
 extern	struct ifnet *(*vlan_devat_p)(struct ifnet *, uint16_t);
 extern	int (*vlan_tag_p)(struct ifnet *, uint16_t *);
-extern	int (*vlan_setcookie_p)(struct ifnet *, void *);
-extern	void *(*vlan_cookie_p)(struct ifnet *);
 
 #ifdef _SYS_EVENTHANDLER_H_
 /* VLAN state change events */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503251423.t2PEN8Jn005428>