diff options
Diffstat (limited to 'hw/net/xgmac.c')
-rw-r--r-- | hw/net/xgmac.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c index 5bf1b61..a066550 100644 --- a/hw/net/xgmac.c +++ b/hw/net/xgmac.c @@ -32,6 +32,7 @@ #include "qemu/log.h" #include "qemu/module.h" #include "net/net.h" +#include "qom/object.h" #ifdef DEBUG_XGMAC #define DEBUGF_BRK(message, args...) do { \ @@ -139,9 +140,11 @@ typedef struct RxTxStats { } RxTxStats; #define TYPE_XGMAC "xgmac" -#define XGMAC(obj) OBJECT_CHECK(XgmacState, (obj), TYPE_XGMAC) +typedef struct XgmacState XgmacState; +DECLARE_INSTANCE_CHECKER(XgmacState, XGMAC, + TYPE_XGMAC) -typedef struct XgmacState { +struct XgmacState { SysBusDevice parent_obj; MemoryRegion iomem; @@ -153,7 +156,7 @@ typedef struct XgmacState { struct RxTxStats stats; uint32_t regs[R_MAX]; -} XgmacState; +}; static const VMStateDescription vmstate_rxtx_stats = { .name = "xgmac_stats", |