[PATCH] Read MAC for TeVii S470 PCI-e DVB-S2 card

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch retrieve the correct mac address from the eeprom for TeVii
S470 card.


Signed-off-by: Pierre Gronlier <pierre.gronlier@xxxxxxxxx>


diff --git a/linux/drivers/media/video/cx23885/cx23885-dvb.c
b/linux/drivers/media/video/cx23885/cx23885-dvb.c
--- a/linux/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c
@@ -929,6 +929,22 @@
                netup_ci_init(port);
                break;
                }
+       case CX23885_BOARD_TEVII_S470: {
+               u8 eeprom[256]; /* 24C02 i2c eeprom */
+
+               if (port->nr != 1)
+                       break;
+
+               /* Read entire EEPROM */
+               dev->i2c_bus[0].i2c_client.addr = 0xa0 >> 1;
+               tveeprom_read(&dev->i2c_bus[0].i2c_client, eeprom,
sizeof(eeprom));
+               printk(KERN_INFO "TeVii S470 MAC= "
+                               "%02X:%02X:%02X:%02X:%02X:%02X\n",
+                               eeprom[0xa0], eeprom[0xa1], eeprom[0xa2],
+                               eeprom[0xa3], eeprom[0xa4], eeprom[0xa5]);
+               memcpy(port->frontends.adapter.proposed_mac, eeprom +
0xa0, 6);
+               break;
+               }
        }

        return ret;


-- 
pierre gronlier
Read MAC for TeVii S470 PCI-e DVB-S2 card.
Signed-off-by: Pierre Gronlier <pierre.gronlier@xxxxxxxxx>

diff --git a/linux/drivers/media/video/cx23885/cx23885-dvb.c b/linux/drivers/media/video/cx23885/cx23885-dvb.c
--- a/linux/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c
@@ -929,6 +929,22 @@
 		netup_ci_init(port);
 		break;
 		}
+	case CX23885_BOARD_TEVII_S470: {
+		u8 eeprom[256]; /* 24C02 i2c eeprom */
+
+		if (port->nr != 1)
+			break;
+
+		/* Read entire EEPROM */
+		dev->i2c_bus[0].i2c_client.addr = 0xa0 >> 1;
+		tveeprom_read(&dev->i2c_bus[0].i2c_client, eeprom, sizeof(eeprom));
+		printk(KERN_INFO "TeVii S470 MAC= "
+				"%02X:%02X:%02X:%02X:%02X:%02X\n",
+				eeprom[0xa0], eeprom[0xa1], eeprom[0xa2],
+				eeprom[0xa3], eeprom[0xa4], eeprom[0xa5]);
+		memcpy(port->frontends.adapter.proposed_mac, eeprom + 0xa0, 6);
+		break;
+		}
 	}
 
 	return ret;

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux