aboutsummaryrefslogtreecommitdiff
path: root/hw/net/e1000x_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net/e1000x_common.c')
-rw-r--r--hw/net/e1000x_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/e1000x_common.c b/hw/net/e1000x_common.c
index 94f85c98c8..eb0e097137 100644
--- a/hw/net/e1000x_common.c
+++ b/hw/net/e1000x_common.c
@@ -47,7 +47,7 @@ bool e1000x_rx_ready(PCIDevice *d, uint32_t *mac)
bool e1000x_is_vlan_packet(const uint8_t *buf, uint16_t vet)
{
- uint16_t eth_proto = be16_to_cpup((uint16_t *)(buf + 12));
+ uint16_t eth_proto = lduw_be_p(buf + 12);
bool res = (eth_proto == vet);
trace_e1000x_vlan_is_vlan_pkt(res, eth_proto, vet);