summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mscc/ocelot_flower.c
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2020-06-20 18:43:38 +0300
committerDavid S. Miller <davem@davemloft.net>2020-06-20 17:25:23 -0700
commitff4b0bc62353d6c1fc3b347189464f85f6fa5643 (patch)
treeb5319e86c9b37b966dcf3d8074e8b9ec87e54bee /drivers/net/ethernet/mscc/ocelot_flower.c
parent7eb5c96a7cae01f500b584d21f6db3abf1aad33e (diff)
downloadlinux-ff4b0bc62353d6c1fc3b347189464f85f6fa5643.tar.bz2
net: mscc: ocelot: access EtherType using __be16
Get rid of sparse "cast to restricted __be16" warnings. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mscc/ocelot_flower.c')
-rw-r--r--drivers/net/ethernet/mscc/ocelot_flower.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_flower.c b/drivers/net/ethernet/mscc/ocelot_flower.c
index c90bafbd651f..99338d27aec0 100644
--- a/drivers/net/ethernet/mscc/ocelot_flower.c
+++ b/drivers/net/ethernet/mscc/ocelot_flower.c
@@ -176,8 +176,8 @@ finished_key_parsing:
if (proto < ETH_P_802_3_MIN)
return -EOPNOTSUPP;
ace->type = OCELOT_ACE_TYPE_ETYPE;
- *(u16 *)ace->frame.etype.etype.value = htons(proto);
- *(u16 *)ace->frame.etype.etype.mask = 0xffff;
+ *(__be16 *)ace->frame.etype.etype.value = htons(proto);
+ *(__be16 *)ace->frame.etype.etype.mask = htons(0xffff);
}
/* else, a rule of type OCELOT_ACE_TYPE_ANY is implicitly added */