Support big endian machines.
This commit is contained in:
parent
19a3b86329
commit
14a717de1d
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: gtidmacreg.h,v 1.1 2010/04/28 13:51:56 kiyohara Exp $ */
|
/* $NetBSD: gtidmacreg.h,v 1.2 2010/06/08 05:15:52 kiyohara Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2009 KIYOHARA Takashi
|
* Copyright (c) 2008, 2009 KIYOHARA Takashi
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -226,6 +226,7 @@
|
||||||
|
|
||||||
|
|
||||||
struct gtidmac_desc {
|
struct gtidmac_desc {
|
||||||
|
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
uint16_t rbc; /* Remind BC */
|
uint16_t rbc; /* Remind BC */
|
||||||
|
@ -238,6 +239,20 @@ struct gtidmac_desc {
|
||||||
uint32_t srcaddr; /* Source Address */
|
uint32_t srcaddr; /* Source Address */
|
||||||
uint32_t dstaddr; /* Destination Address */
|
uint32_t dstaddr; /* Destination Address */
|
||||||
uint32_t nextdp; /* Next Descriptor Pointer */
|
uint32_t nextdp; /* Next Descriptor Pointer */
|
||||||
|
#else
|
||||||
|
uint32_t srcaddr; /* Source Address */
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
uint16_t rbc; /* Remind BC */
|
||||||
|
uint16_t bcnt;
|
||||||
|
} mode64k;
|
||||||
|
struct {
|
||||||
|
uint32_t bcnt;
|
||||||
|
} mode16m;
|
||||||
|
} bc; /* Byte Count */
|
||||||
|
uint32_t nextdp; /* Next Descriptor Pointer */
|
||||||
|
uint32_t dstaddr; /* Destination Address */
|
||||||
|
#endif
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define GTIDMAC_DESC_BYTECOUNT_MASK 0x00ffffff
|
#define GTIDMAC_DESC_BYTECOUNT_MASK 0x00ffffff
|
||||||
|
|
Loading…
Reference in New Issue