Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[firefly-linux-kernel-4.4.55.git] / drivers / media / dvb-core / dvb_net.c
index 44225b186f6df4a42945a8f9998361558d470451..83a23afb13ab7f82e51f1dcba32b7de317af3557 100644 (file)
@@ -185,7 +185,7 @@ static __be16 dvb_net_eth_type_trans(struct sk_buff *skb,
                        skb->pkt_type=PACKET_MULTICAST;
        }
 
-       if (ntohs(eth->h_proto) >= 1536)
+       if (ntohs(eth->h_proto) >= ETH_P_802_3_MIN)
                return eth->h_proto;
 
        rawp = skb->data;
@@ -228,9 +228,9 @@ static int ule_test_sndu( struct dvb_net_priv *p )
 static int ule_bridged_sndu( struct dvb_net_priv *p )
 {
        struct ethhdr *hdr = (struct ethhdr*) p->ule_next_hdr;
-       if(ntohs(hdr->h_proto) < 1536) {
+       if(ntohs(hdr->h_proto) < ETH_P_802_3_MIN) {
                int framelen = p->ule_sndu_len - ((p->ule_next_hdr+sizeof(struct ethhdr)) - p->ule_skb->data);
-               /* A frame Type < 1536 for a bridged frame, introduces a LLC Length field. */
+               /* A frame Type < ETH_P_802_3_MIN for a bridged frame, introduces a LLC Length field. */
                if(framelen != ntohs(hdr->h_proto)) {
                        return -1;
                }
@@ -320,7 +320,7 @@ static int handle_ule_extensions( struct dvb_net_priv *p )
                        (int) p->ule_sndu_type, l, total_ext_len);
 #endif
 
-       } while (p->ule_sndu_type < 1536);
+       } while (p->ule_sndu_type < ETH_P_802_3_MIN);
 
        return total_ext_len;
 }
@@ -712,7 +712,7 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
                                }
 
                                /* Handle ULE Extension Headers. */
-                               if (priv->ule_sndu_type < 1536) {
+                               if (priv->ule_sndu_type < ETH_P_802_3_MIN) {
                                        /* There is an extension header.  Handle it accordingly. */
                                        int l = handle_ule_extensions(priv);
                                        if (l < 0) {