diff options
author | Alexander Duyck <alexander.h.duyck@redhat.com> | 2015-05-04 14:34:05 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-05 19:24:42 -0400 |
commit | 6713fc9b8fa33444aa000f0f31076f6a859ccb34 (patch) | |
tree | 3a33dfdf239f97921aefb32771c5688be1aa3de5 /net/openvswitch/flow.c | |
parent | d181ddca89cf8680db6c767ae38e3b66224d1657 (diff) |
openvswitch: Use eth_proto_is_802_3
Replace "ntohs(proto) >= ETH_P_802_3_MIN" w/ eth_proto_is_802_3(proto).
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/flow.c')
-rw-r--r-- | net/openvswitch/flow.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index 2dacc7b5af23..bc7b0aba994a 100644 --- a/net/openvswitch/flow.c +++ b/net/openvswitch/flow.c @@ -332,7 +332,7 @@ static __be16 parse_ethertype(struct sk_buff *skb) proto = *(__be16 *) skb->data; __skb_pull(skb, sizeof(__be16)); - if (ntohs(proto) >= ETH_P_802_3_MIN) + if (eth_proto_is_802_3(proto)) return proto; if (skb->len < sizeof(struct llc_snap_hdr)) @@ -349,7 +349,7 @@ static __be16 parse_ethertype(struct sk_buff *skb) __skb_pull(skb, sizeof(struct llc_snap_hdr)); - if (ntohs(llc->ethertype) >= ETH_P_802_3_MIN) + if (eth_proto_is_802_3(llc->ethertype)) return llc->ethertype; return htons(ETH_P_802_2); |