aboutsummaryrefslogtreecommitdiff
path: root/hw/net/spapr_llan.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net/spapr_llan.c')
-rw-r--r--hw/net/spapr_llan.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c
index 4cd02dd..d34cb29 100644
--- a/hw/net/spapr_llan.c
+++ b/hw/net/spapr_llan.c
@@ -38,6 +38,7 @@
#include "trace.h"
#include <libfdt.h>
+#include "qom/object.h"
#define ETH_ALEN 6
#define MAX_PACKET_SIZE 65536
@@ -84,8 +85,9 @@ typedef uint64_t vlan_bd_t;
#define VLAN_MAX_BUFS (VLAN_RX_BDS_LEN / 8)
#define TYPE_VIO_SPAPR_VLAN_DEVICE "spapr-vlan"
-#define VIO_SPAPR_VLAN_DEVICE(obj) \
- OBJECT_CHECK(SpaprVioVlan, (obj), TYPE_VIO_SPAPR_VLAN_DEVICE)
+typedef struct SpaprVioVlan SpaprVioVlan;
+DECLARE_INSTANCE_CHECKER(SpaprVioVlan, VIO_SPAPR_VLAN_DEVICE,
+ TYPE_VIO_SPAPR_VLAN_DEVICE)
#define RX_POOL_MAX_BDS 4096
#define RX_MAX_POOLS 5
@@ -96,7 +98,7 @@ typedef struct {
vlan_bd_t bds[RX_POOL_MAX_BDS];
} RxBufPool;
-typedef struct SpaprVioVlan {
+struct SpaprVioVlan {
SpaprVioDevice sdev;
NICConf nicconf;
NICState *nic;
@@ -108,7 +110,7 @@ typedef struct SpaprVioVlan {
QEMUTimer *rxp_timer;
uint32_t compat_flags; /* Compatibility flags for migration */
RxBufPool *rx_pool[RX_MAX_POOLS]; /* Receive buffer descriptor pools */
-} SpaprVioVlan;
+};
static bool spapr_vlan_can_receive(NetClientState *nc)
{