summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c')
-rw-r--r--linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
index 86f697495..3198db391 100644
--- a/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
+++ b/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
@@ -13,9 +13,10 @@
static int debug;
module_param(debug, int, 0644);
-MODULE_PARM_DESC(debug, "set debugging level (1=rc (|-able))." DVB_USB_DEBUG_STATUS);
+MODULE_PARM_DESC(debug, "set debugging level (1=rc,2=eeprom (|-able))." DVB_USB_DEBUG_STATUS);
#define deb_rc(args...) dprintk(debug,0x01,args)
+#define deb_ee(args...) dprintk(debug,0x02,args)
/* Hauppauge NOVA-T USB2 keys */
static struct dvb_usb_rc_key haupp_rc_keys [] = {
@@ -113,6 +114,29 @@ static int nova_t_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
return 0;
}
+static int nova_t_read_mac_address (struct dvb_usb_device *d, u8 mac[6])
+{
+ int i;
+ u8 b;
+
+ mac[0] = 0x00;
+ mac[1] = 0x0d;
+ mac[2] = 0xfe;
+
+ /* this is a complete guess, but works for my box */
+ for (i = 136; i < 139; i++) {
+ dibusb_read_eeprom_byte(d,i, &b);
+
+ mac[5 - (i - 136)] = b;
+
+/* deb_ee("%02x ",b);
+ if ((i+1) % 16 == 0)
+ deb_ee("\n");*/
+ }
+
+ return 0;
+}
+
/* USB Driver stuff */
static struct dvb_usb_properties nova_t_properties;
@@ -145,7 +169,7 @@ static struct dvb_usb_properties nova_t_properties = {
.power_ctrl = dibusb2_0_power_ctrl,
.frontend_attach = dibusb_dib3000mc_frontend_attach,
.tuner_attach = dibusb_dib3000mc_tuner_attach,
- .read_mac_address = NULL,
+ .read_mac_address = nova_t_read_mac_address,
.rc_interval = 100,
.rc_key_map = haupp_rc_keys,