diff --git a/sys/net/firewire.h b/sys/net/firewire.h index dd7d23e49e73..527113aec720 100644 --- a/sys/net/firewire.h +++ b/sys/net/firewire.h @@ -131,7 +131,7 @@ struct fw_com { uint16_t fc_node; /* our nodeid */ struct fw_reass_list fc_frags; /* partial datagrams */ }; -#define IFP2FWC(ifp) ((struct fw_com *)(ifp)->if_l2com) +#define IFP2FWC(ifp) ((struct fw_com *)if_getl2com(ifp)) extern void firewire_input(struct ifnet *ifp, struct mbuf *m, uint16_t src); extern void firewire_ifattach(struct ifnet *, struct fw_hwaddr *); diff --git a/sys/net/if.c b/sys/net/if.c index ac8b6963172d..2ab12d1ac313 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4941,6 +4941,12 @@ if_getpcp(if_t ifp) return (ifp->if_pcp); } +void * +if_getl2com(if_t ifp) +{ + return (ifp->if_l2com); +} + #ifdef DDB static void if_show_ifnet(struct ifnet *ifp) diff --git a/sys/net/if_var.h b/sys/net/if_var.h index be7a5f059a7e..dbf8796865f0 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -644,6 +644,7 @@ struct label *if_getmaclabel(if_t ifp); void if_setmaclabel(if_t ifp, struct label *label); struct bpf_if *if_getbpf(if_t ifp); uint8_t if_getpcp(if_t ifp); +void *if_getl2com(if_t ifp); struct ifvlantrunk *if_getvlantrunk(if_t ifp); void *if_getafdata(if_t ifp, int);