Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137951675
D38199.id115735.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D38199.id115735.diff
View Options
diff --git a/sys/net/if.c b/sys/net/if.c
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -4821,6 +4821,19 @@
ifp->if_label = label;
}
+void *
+if_getllsoftc(if_t ifp)
+{
+ return (ifp->if_llsoftc);
+}
+
+int
+if_setllsoftc(if_t ifp, void *llsoftc)
+{
+ ifp->if_llsoftc = llsoftc;
+ return (0);
+};
+
#ifdef DDB
static void
if_show_ifnet(struct ifnet *ifp)
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -412,7 +412,8 @@
#define IF_MINMTU 72
#define IF_MAXMTU 65535
-#define TOEDEV(ifp) ((ifp)->if_llsoftc)
+#define TOEDEV(ifp) if_getllsoftc(ifp)
+#define SETTOEDEV(ifp, sc) if_setllsoftc((ifp), (sc))
/*
* The ifaddr structure contains information about one address
@@ -596,6 +597,8 @@
int if_setsoftc(if_t ifp, void *softc);
void *if_getsoftc(if_t ifp);
int if_setflags(if_t ifp, int flags);
+int if_setllsoftc(if_t ifp, void *softc);
+void *if_getllsoftc(if_t ifp);
int if_gethwaddr(const if_t ifp, struct ifreq *);
int if_setmtu(if_t ifp, int mtu);
int if_getmtu(const if_t ifp);
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1922,7 +1922,7 @@
if (p->if_capabilities & IFCAP_VLAN_TOE)
cap |= p->if_capabilities & IFCAP_TOE;
if (p->if_capenable & IFCAP_VLAN_TOE) {
- TOEDEV(ifp) = TOEDEV(p);
+ SETTOEDEV(ifp, TOEDEV(p));
ena |= mena & IFCAP_TOE;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 28, 3:13 PM (1 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26275219
Default Alt Text
D38199.id115735.diff (1 KB)
Attached To
Mode
D38199: IfAPI: Add if_llsoftc member accessors for TOEDEV
Attached
Detach File
Event Timeline
Log In to Comment