Commit eb5908c7 authored by Michael Hunold's avatar Michael Hunold Committed by Linus Torvalds

[PATCH] DVB: Other DVB core updates

 - [DVB] remove superflous memset() which caused section data to be
   overwritten when a) there are two sections in one TS packet, and b)
   the first section was smaller than 18 bytes; thanks to Jean-Claude
   Repetto for tracking this down
 - [DVB] starting a ts filter on a running section filter's pid did
   break the section filter; fixed. 
 - [DVB] integrate ULE Decapsulation code, thanks to gcs - Global
   Communication & Services GmbH.  and Institute for Computer Sciences
   Salzburg University.  Hilmar Linder <hlinder@cosy.sbg.ac.at> and
   Wolfram Stering <wstering@cosy.sbg.ac.at>
 - [DVB] fix the module use count bugs, thanks to Hernan A.Perez Masci
   for his initial work on this problem
 - [DVB] if dvb_frontend_internal_ioctl() returns an error code, be sure
   to deliver it to the calling application, don't ignore it (fixes the
   bug that the frontend0 doesn't respond properly to unknown ioctls...)
 - [DVB] major frontend code clean up, rewritten core tuning loop.
   Thanks to Andrew de Quincey.
 - [DVB] follow changes in dvb-core in skystar2, dvb-bt8xx
parent 7679ba7b
......@@ -2242,7 +2242,7 @@ static int skystar2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (driver_initialize(pdev) != 0)
return -ENODEV;
dvb_register_adapter(&dvb_adapter, skystar2_pci_driver.name);
dvb_register_adapter(&dvb_adapter, skystar2_pci_driver.name, THIS_MODULE);
if (dvb_adapter == NULL) {
printk("%s: Error registering DVB adapter\n", __FUNCTION__);
......@@ -2342,6 +2342,8 @@ static struct pci_device_id skystar2_pci_tbl[] = {
{0,},
};
MODULE_DEVICE_TABLE(pci, skystar2_pci_tbl);
static struct pci_driver skystar2_pci_driver = {
.name = "Technisat SkyStar2 driver",
.id_table = skystar2_pci_tbl,
......
......@@ -286,7 +286,7 @@ static int __init dvb_bt8xx_load_card( struct dvb_bt8xx_card *card)
}
if ((result = dvb_register_adapter(&card->dvb_adapter, card->card_name)) < 0) {
if ((result = dvb_register_adapter(&card->dvb_adapter, card->card_name, THIS_MODULE)) < 0) {
printk("dvb_bt8xx: dvb_register_adapter failed (errno = %d)\n", result);
......
......@@ -192,7 +192,6 @@ static inline int dvb_dmx_swfilter_section_feed (struct dvb_demux_feed *feed)
struct dvb_demux *demux = feed->demux;
struct dvb_demux_filter *f = feed->filter;
struct dmx_section_feed *sec = &feed->feed.sec;
u8 *buf = sec->secbuf;
int section_syntax_indicator;
if (!sec->is_filtering)
......@@ -215,8 +214,6 @@ static inline int dvb_dmx_swfilter_section_feed (struct dvb_demux_feed *feed)
sec->seclen = 0;
memset(buf, 0, DVB_DEMUX_MASK_MAX);
return 0;
}
......
This diff is collapsed.
......@@ -56,14 +56,25 @@ struct dvb_frontend {
void *data; /* can be used by hardware module... */
};
struct dvb_frontend_tune_settings {
int min_delay_ms;
int step_size;
int max_drift;
struct dvb_frontend_parameters parameters;
};
/**
* private frontend command ioctl's.
* keep them in sync with the public ones defined in linux/dvb/frontend.h
*
* FE_SLEEP. Ioctl used to put frontend into a low power mode.
* FE_INIT. Ioctl used to initialise the frontend.
* FE_GET_TUNE_SETTINGS. Get the frontend-specific tuning loop settings for the supplied set of parameters.
*/
#define FE_SLEEP _IO('v', 80)
#define FE_INIT _IO('v', 81)
#define FE_RESET _IO('v', 82)
#define FE_GET_TUNE_SETTINGS _IOWR('v', 83, struct dvb_frontend_tune_settings)
extern int
......
This diff is collapsed.
......@@ -211,6 +211,8 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
dvbdev->adapter = adap;
dvbdev->priv = priv;
dvbdev->fops->owner = adap->module;
list_add_tail (&dvbdev->list_head, &adap->device_list);
devfs_mk_cdev(MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
......@@ -227,13 +229,15 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
void dvb_unregister_device(struct dvb_device *dvbdev)
{
if (dvbdev) {
if (!dvbdev)
return;
devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num,
dnames[dvbdev->type], dvbdev->id);
list_del(&dvbdev->list_head);
kfree(dvbdev);
}
}
static int dvbdev_get_free_adapter_num (void)
......@@ -257,7 +261,7 @@ static int dvbdev_get_free_adapter_num (void)
}
int dvb_register_adapter(struct dvb_adapter **padap, const char *name)
int dvb_register_adapter(struct dvb_adapter **padap, const char *name, struct module *module)
{
struct dvb_adapter *adap;
int num;
......@@ -281,8 +285,10 @@ int dvb_register_adapter(struct dvb_adapter **padap, const char *name)
printk ("DVB: registering new adapter (%s).\n", name);
devfs_mk_dir("dvb/adapter%d", num);
adap->num = num;
adap->name = name;
adap->module = module;
list_add_tail (&adap->list_head, &dvb_adapter_list);
......
......@@ -48,6 +48,8 @@ struct dvb_adapter {
struct list_head device_list;
const char *name;
u8 proposed_mac [6];
struct module *module;
};
......@@ -75,7 +77,7 @@ struct dvb_device {
};
extern int dvb_register_adapter (struct dvb_adapter **padap, const char *name);
extern int dvb_register_adapter (struct dvb_adapter **padap, const char *name, struct module *module);
extern int dvb_unregister_adapter (struct dvb_adapter *adap);
extern int dvb_register_device (struct dvb_adapter *adap,
......
......@@ -59,9 +59,9 @@ typedef enum fe_caps {
FE_CAN_BANDWIDTH_AUTO = 0x40000,
FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
FE_CAN_HIERARCHY_AUTO = 0x100000,
FE_CAN_RECOVER = 0x20000000,
FE_CAN_CLEAN_SETUP = 0x40000000,
FE_CAN_MUTE_TS = 0x80000000
FE_NEEDS_BENDING = 0x20000000, // frontend requires frequency bending
FE_CAN_RECOVER = 0x40000000, // frontend can recover from a cable unplug automatically
FE_CAN_MUTE_TS = 0x80000000 // frontend can stop spurious TS data output
} fe_caps_t;
......
......@@ -30,6 +30,9 @@
struct dvb_net_if {
__u16 pid;
__u16 if_num;
__u8 feedtype;
#define DVB_NET_FEEDTYPE_MPE 0 /* multi protocol encapsulation */
#define DVB_NET_FEEDTYPE_ULE 1 /* ultra lightweight encapsulation */
};
......@@ -37,5 +40,14 @@ struct dvb_net_if {
#define NET_REMOVE_IF _IO('o', 53)
#define NET_GET_IF _IOWR('o', 54, struct dvb_net_if)
#endif /*_DVBNET_H_*/
/* binary compatibility cruft: */
struct __dvb_net_if_old {
__u16 pid;
__u16 if_num;
};
#define __NET_ADD_IF_OLD _IOWR('o', 52, struct __dvb_net_if_old)
#define __NET_GET_IF_OLD _IOWR('o', 54, struct __dvb_net_if_old)
#endif /*_DVBNET_H_*/
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