/*1* dvb_net.h2*3* Copyright (C) 2001 Ralph Metzler for convergence integrated media GmbH4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU Lesser General Public License7* as published by the Free Software Foundation; either version 2.18* of the License, or (at your option) any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15*/1617#ifndef _DVB_NET_H_18#define _DVB_NET_H_1920#include <linux/module.h>2122#include <media/dvbdev.h>2324struct net_device;2526#define DVB_NET_DEVICES_MAX 102728#ifdef CONFIG_DVB_NET2930/**31* struct dvb_net - describes a DVB network interface32*33* @dvbdev: pointer to &struct dvb_device.34* @device: array of pointers to &struct net_device.35* @state: array of integers to each net device. A value36* different than zero means that the interface is37* in usage.38* @exit: flag to indicate when the device is being removed.39* @demux: pointer to &struct dmx_demux.40* @ioctl_mutex: protect access to this struct.41* @remove_mutex: mutex that avoids a race condition between a callback42* called when the hardware is disconnected and the43* file_operations of dvb_net.44*45* Currently, the core supports up to %DVB_NET_DEVICES_MAX (10) network46* devices.47*/4849struct dvb_net {50struct dvb_device *dvbdev;51struct net_device *device[DVB_NET_DEVICES_MAX];52int state[DVB_NET_DEVICES_MAX];53unsigned int exit:1;54struct dmx_demux *demux;55struct mutex ioctl_mutex;56struct mutex remove_mutex;57};5859/**60* dvb_net_init - nitializes a digital TV network device and registers it.61*62* @adap: pointer to &struct dvb_adapter.63* @dvbnet: pointer to &struct dvb_net.64* @dmxdemux: pointer to &struct dmx_demux.65*/66int dvb_net_init(struct dvb_adapter *adap, struct dvb_net *dvbnet,67struct dmx_demux *dmxdemux);6869/**70* dvb_net_release - releases a digital TV network device and unregisters it.71*72* @dvbnet: pointer to &struct dvb_net.73*/74void dvb_net_release(struct dvb_net *dvbnet);7576#else7778struct dvb_net {79struct dvb_device *dvbdev;80};8182static inline void dvb_net_release(struct dvb_net *dvbnet)83{84}8586static inline int dvb_net_init(struct dvb_adapter *adap,87struct dvb_net *dvbnet, struct dmx_demux *dmx)88{89return 0;90}9192#endif /* ifdef CONFIG_DVB_NET */9394#endif959697