Commit cce33c34 authored by Ralph Metzler's avatar Ralph Metzler Committed by Mauro Carvalho Chehab

[media] ngene: Add net device

Add dvb net device.
Note that the physical address must be setup manually.
Signed-off-by: default avatarRalph Metzler <rjkm@metzlerbros.de>
Signed-off-by: default avatarOliver Endriss <o.endriss@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1b7c41ef
...@@ -1451,6 +1451,7 @@ static void release_channel(struct ngene_channel *chan) ...@@ -1451,6 +1451,7 @@ static void release_channel(struct ngene_channel *chan)
dvb_frontend_detach(chan->fe); dvb_frontend_detach(chan->fe);
chan->fe = NULL; chan->fe = NULL;
} }
dvb_net_release(&chan->dvbnet);
dvbdemux->dmx.close(&dvbdemux->dmx); dvbdemux->dmx.close(&dvbdemux->dmx);
dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, dvbdemux->dmx.remove_frontend(&dvbdemux->dmx,
&chan->hw_frontend); &chan->hw_frontend);
...@@ -1504,6 +1505,8 @@ static int init_channel(struct ngene_channel *chan) ...@@ -1504,6 +1505,8 @@ static int init_channel(struct ngene_channel *chan)
ret = my_dvb_dmxdev_ts_card_init(&chan->dmxdev, &chan->demux, ret = my_dvb_dmxdev_ts_card_init(&chan->dmxdev, &chan->demux,
&chan->hw_frontend, &chan->hw_frontend,
&chan->mem_frontend, adapter); &chan->mem_frontend, adapter);
ret = dvb_net_init(adapter, &chan->dvbnet, &chan->demux.dmx);
if (dev->ci.en && (io&NGENE_IO_TSOUT)) { if (dev->ci.en && (io&NGENE_IO_TSOUT)) {
dvb_ca_en50221_init(adapter, dev->ci.en, 0, 1); dvb_ca_en50221_init(adapter, dev->ci.en, 0, 1);
set_transfer(chan, 1); set_transfer(chan, 1);
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "dvb_ca_en50221.h" #include "dvb_ca_en50221.h"
#include "dvb_frontend.h" #include "dvb_frontend.h"
#include "dvb_ringbuffer.h" #include "dvb_ringbuffer.h"
#include "dvb_net.h"
#include "cxd2099.h" #include "cxd2099.h"
#define DEVICE_NAME "ngene" #define DEVICE_NAME "ngene"
...@@ -642,6 +643,7 @@ struct ngene_channel { ...@@ -642,6 +643,7 @@ struct ngene_channel {
struct dvb_frontend *fe; struct dvb_frontend *fe;
struct dmxdev dmxdev; struct dmxdev dmxdev;
struct dvb_demux demux; struct dvb_demux demux;
struct dvb_net dvbnet;
struct dmx_frontend hw_frontend; struct dmx_frontend hw_frontend;
struct dmx_frontend mem_frontend; struct dmx_frontend mem_frontend;
int users; int users;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment