aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-03-27 12:12:27 +0000
committerPeter Maydell <peter.maydell@linaro.org>2015-03-27 12:12:27 +0000
commitb27e767e8c8d56cb7c9d0b78eadd89521bdf836c (patch)
treea0baeb7a08d63a88e1f6040d8818e21484172775 /hw
parent500d76a093b81f0aa9a368039518ab333d5dbf7a (diff)
parent4e60a250d395ef0d04eb8b6489cc5f7615a8909b (diff)
Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging
# gpg: Signature made Fri Mar 27 11:59:41 2015 GMT using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/net-pull-request: hw/net/e1000: fix integer endianness Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/net/e1000.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 3405cb9ea0..091d61acc3 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -578,7 +578,7 @@ static inline int
is_vlan_packet(E1000State *s, const uint8_t *buf)
{
return (be16_to_cpup((uint16_t *)(buf + 12)) ==
- le16_to_cpup((uint16_t *)(s->mac_reg + VET)));
+ le16_to_cpu(s->mac_reg[VET]));
}
static inline int
@@ -711,7 +711,7 @@ process_tx_desc(E1000State *s, struct e1000_tx_desc *dp)
(tp->cptse || txd_lower & E1000_TXD_CMD_EOP)) {
tp->vlan_needed = 1;
stw_be_p(tp->vlan_header,
- le16_to_cpup((uint16_t *)(s->mac_reg + VET)));
+ le16_to_cpu(s->mac_reg[VET]));
stw_be_p(tp->vlan_header + 2,
le16_to_cpu(dp->upper.fields.special));
}