openbsd_network: Some basic additions in preparation for "rtl8125".
These are trivial and do not really need testing.
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
|
||||
|
||||
#include_next <dev/pci/pcivar.h>
|
||||
#include <dev/pci/pcireg.h>
|
||||
|
||||
#include <sys/rman.h>
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
#include_next <net/if.h>
|
||||
|
||||
|
||||
#define LINK_STATE_IS_UP(_s) \
|
||||
((_s) >= LINK_STATE_UP || (_s) == LINK_STATE_UNKNOWN)
|
||||
|
||||
#define IFF_RUNNING IFF_DRV_RUNNING
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
#define _OBSD_COMPAT_NET_IFQ_H_
|
||||
|
||||
|
||||
#define ifq_purge(IFQ) IFQ_PURGE(IFQ)
|
||||
#define ifq_set_maxlen(IFQ, LEN) IFQ_SET_MAXLEN(IFQ, LEN)
|
||||
|
||||
#define ifq_is_oactive(IFQ) ((if_getdrvflags(ifp) & IFF_DRV_OACTIVE) != 0)
|
||||
#define ifq_set_oactive(IFQ) if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0)
|
||||
#define ifq_clr_oactive(IFQ) if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE)
|
||||
|
||||
@@ -27,6 +27,13 @@
|
||||
|
||||
#define MAXMCLBYTES MJUM16BYTES
|
||||
|
||||
#define M_IPV4_CSUM_OUT CSUM_IP
|
||||
#define M_TCP_CSUM_OUT CSUM_IP_TCP
|
||||
#define M_UDP_CSUM_OUT CSUM_IP_UDP
|
||||
#define M_IPV4_CSUM_IN_OK (CSUM_IP_CHECKED | CSUM_IP_VALID)
|
||||
#define M_TCP_CSUM_IN_OK (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)
|
||||
#define M_UDP_CSUM_IN_OK (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)
|
||||
|
||||
|
||||
static struct mbuf*
|
||||
MCLGETL(struct mbuf* m, int how, int size)
|
||||
|
||||
Reference in New Issue
Block a user