]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/media/dvb-core/dvb_net.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux...
[karo-tx-linux.git] / drivers / media / dvb-core / dvb_net.c
index 44225b186f6df4a42945a8f9998361558d470451..f91c80c0e9ec0899816ea177dc616e4aa2b2755d 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) {
@@ -1044,7 +1044,7 @@ static int dvb_net_feed_start(struct net_device *dev)
                ret = priv->tsfeed->set(priv->tsfeed,
                                        priv->pid, /* pid */
                                        TS_PACKET, /* type */
-                                       DMX_TS_PES_OTHER, /* pes type */
+                                       DMX_PES_OTHER, /* pes type */
                                        32768,     /* circular buffer size */
                                        timeout    /* timeout */
                                        );
@@ -1479,11 +1479,8 @@ static int dvb_net_close(struct inode *inode, struct file *file)
 
        dvb_generic_release(inode, file);
 
-       if(dvbdev->users == 1 && dvbnet->exit == 1) {
-               fops_put(file->f_op);
-               file->f_op = NULL;
+       if(dvbdev->users == 1 && dvbnet->exit == 1)
                wake_up(&dvbdev->wait_queue);
-       }
        return 0;
 }