summaryrefslogtreecommitdiffstats
path: root/sys/net/if_vlan.c
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2006-06-29 07:30:39 +0000
committeryar <yar@FreeBSD.org>2006-06-29 07:30:39 +0000
commit0f44e871f88c4b408d9e6dcf55804f6543edbdba (patch)
tree6382a55a27572863cb49eaccb7d78738df777f29 /sys/net/if_vlan.c
parentc722171a0322220b4746c9041dbb059f7f958fc9 (diff)
downloadFreeBSD-src-0f44e871f88c4b408d9e6dcf55804f6543edbdba.zip
FreeBSD-src-0f44e871f88c4b408d9e6dcf55804f6543edbdba.tar.gz
Remove a few unused things.
Fix some style and consistency points.
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r--sys/net/if_vlan.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 120cc5b..5db76c1 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -105,17 +105,15 @@ struct ifvlan {
#define PARENT(ifv) ((ifv)->ifv_trunk->parent)
int ifv_pflags; /* special flags we have set on parent */
struct ifv_linkmib {
- int ifvm_parent;
int ifvm_encaplen; /* encapsulation length */
int ifvm_mtufudge; /* MTU fudged by this much */
int ifvm_mintu; /* min transmission unit */
- uint16_t ifvm_proto; /* encapsulation ethertype */
uint16_t ifvm_tag; /* tag to apply on packets leaving if */
} ifv_mib;
- SLIST_HEAD(__vlan_mchead, vlan_mc_entry) vlan_mc_listhead;
+ SLIST_HEAD(, vlan_mc_entry) vlan_mc_listhead;
LIST_ENTRY(ifvlan) ifv_list;
};
-#define ifv_tag ifv_mib.ifvm_tag
+#define ifv_tag ifv_mib.ifvm_tag
#define ifv_encaplen ifv_mib.ifvm_encaplen
#define ifv_mtufudge ifv_mib.ifvm_mtufudge
#define ifv_mintu ifv_mib.ifvm_mintu
@@ -177,7 +175,7 @@ static __inline struct ifvlan * vlan_gethash(struct ifvlantrunk *trunk,
static void trunk_destroy(struct ifvlantrunk *trunk);
static void vlan_start(struct ifnet *ifp);
-static void vlan_ifinit(void *foo);
+static void vlan_init(void *foo);
static void vlan_input(struct ifnet *ifp, struct mbuf *m);
static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr);
static int vlan_setflag(struct ifnet *ifp, int flag, int status,
@@ -204,6 +202,7 @@ static struct if_clone vlan_cloner = IFC_CLONE_INITIALIZER(VLANNAME, NULL,
#ifndef VLAN_ARRAY
#define HASH(n, m) ((((n) >> 8) ^ ((n) >> 4) ^ (n)) & (m))
+
static void
vlan_inithash(struct ifvlantrunk *trunk)
{
@@ -627,7 +626,7 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len)
struct ifvlan *ifv;
struct ifnet *ifp;
struct ifnet *p;
- u_char eaddr[6] = {0,0,0,0,0,0};
+ static const u_char eaddr[6]; /* 00:00:00:00:00:00 */
if ((p = vlan_clone_match_ethertag(ifc, name, &tag)) != NULL) {
ethertag = 1;
@@ -685,7 +684,7 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len)
ifp->if_linkmiblen = sizeof(ifv->ifv_mib);
/* NB: mtu is not set here */
- ifp->if_init = vlan_ifinit;
+ ifp->if_init = vlan_init;
ifp->if_start = vlan_start;
ifp->if_ioctl = vlan_ioctl;
ifp->if_snd.ifq_maxlen = ifqmaxlen;
@@ -723,10 +722,8 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len)
static int
vlan_clone_destroy(struct if_clone *ifc, struct ifnet *ifp)
{
- int unit;
struct ifvlan *ifv = ifp->if_softc;
-
- unit = ifp->if_dunit;
+ int unit = ifp->if_dunit;
vlan_unconfig(ifp);
@@ -744,9 +741,8 @@ vlan_clone_destroy(struct if_clone *ifc, struct ifnet *ifp)
* The ifp->if_init entry point for vlan(4) is a no-op.
*/
static void
-vlan_ifinit(void *foo)
+vlan_init(void *foo __unused)
{
-
}
/*
OpenPOWER on IntegriCloud