Hi,
i need to know the mac adress of a dvb frontend (pci number would also be helpfull).
I found no way to identify a dvb device by its frontend.
I looked at the dvb api code, and then i patched dvb_frontend.c, and frontend.h for my needs.
Below are the changes I made.
But the code don't works. I don't get the information I need.
My devices:
Philips TDA10046H DVB-T
Conexant CX24123/CX24109
Conexant CX24123/CX24109
Montage Technology DS3000/TS2020 -> works
The value dvbdev->adapter->proposed_mac seems to be empty, for some cards.
But on driver load I can see a mac address for every dvb device I have.
The mac address for these cards are outputted in function: void tveeprom_hauppauge_analog(...).
Maybe someone can help me.
Maybe there is another way of determining a dvb frontend by PCI Bus or something.
Identifying dvb devices can be very important on some situations.
Regards, onur
----------------------------------------------------------
dvb_frontend.c:
static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file,
unsigned int cmd, void *parg)
{
struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend *fe = dvbdev->priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
int cb_err, err = -EOPNOTSUPP;
// FE_GET_PROPOSEDMAC
if (cmd == FE_GET_PROPOSEDMAC) {
struct dvb_proposed_mac* info = parg;
memcpy(info, dvbdev->adapter->proposed_mac, sizeof(struct dvb_proposed_mac));
//memcpy(info->proposed_mac, dvbdev->adapter->proposed_mac, 6);
return 0;
}
// FE_GET_PROPOSEDMAC
----------------------------------------------------------
frontend.h:
...
// FE_GET_PROPOSEDMAC
struct dvb_proposed_mac {
__u8 proposed_mac [6];
};
#define FE_GET_PROPOSEDMAC _IOR('o', 84, struct dvb_proposed_mac)
// FE_GET_PROPOSEDMAC
#endif /*_DVBFRONTEND_H_*/