Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * dvb_net.h |
| 3 | * |
| 4 | * Copyright (C) 2001 Ralph Metzler for convergence integrated media GmbH |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU Lesser General Public License |
| 8 | * as published by the Free Software Foundation; either version 2.1 |
| 9 | * of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Lesser General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | #ifndef _DVB_NET_H_ |
| 23 | #define _DVB_NET_H_ |
| 24 | |
| 25 | #include <linux/module.h> |
| 26 | #include <linux/netdevice.h> |
| 27 | #include <linux/inetdevice.h> |
| 28 | #include <linux/etherdevice.h> |
| 29 | #include <linux/skbuff.h> |
| 30 | |
| 31 | #include "dvbdev.h" |
| 32 | |
| 33 | #define DVB_NET_DEVICES_MAX 10 |
| 34 | |
Hans Petter Selasky | a34ff6c | 2011-05-23 09:43:35 -0300 | [diff] [blame] | 35 | #ifdef CONFIG_DVB_NET |
| 36 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | struct dvb_net { |
| 38 | struct dvb_device *dvbdev; |
| 39 | struct net_device *device[DVB_NET_DEVICES_MAX]; |
| 40 | int state[DVB_NET_DEVICES_MAX]; |
Markus Rechberger | 2c4d336 | 2007-04-14 10:19:36 -0300 | [diff] [blame] | 41 | unsigned int exit:1; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | struct dmx_demux *demux; |
Nikolaus Schulz | 30ad64b | 2012-12-23 18:49:07 -0300 | [diff] [blame] | 43 | struct mutex ioctl_mutex; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | }; |
| 45 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | void dvb_net_release(struct dvb_net *); |
| 47 | int dvb_net_init(struct dvb_adapter *, struct dvb_net *, struct dmx_demux *); |
| 48 | |
Mauro Carvalho Chehab | fcc8e7d | 2011-06-01 13:03:12 -0300 | [diff] [blame] | 49 | #else |
Hans Petter Selasky | a34ff6c | 2011-05-23 09:43:35 -0300 | [diff] [blame] | 50 | |
| 51 | struct dvb_net { |
Mauro Carvalho Chehab | fcc8e7d | 2011-06-01 13:03:12 -0300 | [diff] [blame] | 52 | struct dvb_device *dvbdev; |
Hans Petter Selasky | a34ff6c | 2011-05-23 09:43:35 -0300 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | static inline void dvb_net_release(struct dvb_net *dvbnet) |
| 56 | { |
Hans Petter Selasky | a34ff6c | 2011-05-23 09:43:35 -0300 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | static inline int dvb_net_init(struct dvb_adapter *adap, |
| 60 | struct dvb_net *dvbnet, struct dmx_demux *dmx) |
| 61 | { |
Hans Petter Selasky | a34ff6c | 2011-05-23 09:43:35 -0300 | [diff] [blame] | 62 | return 0; |
| 63 | } |
| 64 | |
Mauro Carvalho Chehab | fcc8e7d | 2011-06-01 13:03:12 -0300 | [diff] [blame] | 65 | #endif /* ifdef CONFIG_DVB_NET */ |
Hans Petter Selasky | a34ff6c | 2011-05-23 09:43:35 -0300 | [diff] [blame] | 66 | |
| 67 | #endif |