Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] patch for dvb_net.c (x Marcus)



Hello,

Just wonder if it is possible to integrate the following patch into the
next driver releases:

------------------ cut here ------------------------
diff -Naur DVB.safe/driver/dvb_net.c DVB/driver/dvb_net.c
--- DVB.safe/driver/dvb_net.c    Wed Jan 29 15:21:01 2003
+++ DVB/driver/dvb_net.c    Tue Jan 28 12:05:16 2003
@@ -483,6 +483,21 @@
       dvbnetif->if_num=result;
       break;
   }
+    case NET_GET_IF:
+    {
+        struct net_device *netdev;
+        struct dvb_net_priv *priv_data;
+        struct dvb_net_if *dvbnetif=(struct dvb_net_if *)parg;
+
+        if (dvbnetif->if_num >= dvbnet->dev_num ||
+            !dvbnet->state[dvbnetif->if_num])
+          return -EFAULT;
+
+        netdev=(struct net_device*)&dvbnet->device[dvbnetif->if_num];
+        priv_data=(struct dvb_net_priv*)netdev->priv;
+        dvbnetif->pid=priv_data->pid;
+        break;
+    }
   case NET_REMOVE_IF:
       return dvb_net_remove_if(dvbnet, (int) parg);
   default:
diff -Naur DVB.safe/include/linux/dvb/net.h DVB/include/linux/dvb/net.h
--- DVB.safe/include/linux/dvb/net.h    Wed Jan 29 15:21:01 2003
+++ DVB/include/linux/dvb/net.h    Tue Jan 28 10:09:24 2003
@@ -38,7 +38,8 @@


#define NET_ADD_IF                 _IOWR('o', 52, struct dvb_net_if)
-#define NET_REMOVE_IF              _IO('o', 53)
+#define NET_REMOVE_IF              _IO(  'o', 53)
+#define NET_GET_IF                 _IOWR('o', 54, struct dvb_net_if)

#endif /*_DVBNET_H_*/
------------------ cut here ------------------------

I think it could be useful to check what net ifaces (and their pids) are
already activated, couldn't it?

Lymes.




--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index