|
@@ -1290,11 +1290,10 @@ static int lan78xx_ethtool_set_eeprom(struct net_device *netdev,
|
|
|
if (ret)
|
|
|
return ret;
|
|
|
|
|
|
- /* Allow entire eeprom update only */
|
|
|
- if ((ee->magic == LAN78XX_EEPROM_MAGIC) &&
|
|
|
- (ee->offset == 0) &&
|
|
|
- (ee->len == 512) &&
|
|
|
- (data[0] == EEPROM_INDICATOR))
|
|
|
+ /* Invalid EEPROM_INDICATOR at offset zero will result in a failure
|
|
|
+ * to load data from EEPROM
|
|
|
+ */
|
|
|
+ if (ee->magic == LAN78XX_EEPROM_MAGIC)
|
|
|
ret = lan78xx_write_raw_eeprom(dev, ee->offset, ee->len, data);
|
|
|
else if ((ee->magic == LAN78XX_OTP_MAGIC) &&
|
|
|
(ee->offset == 0) &&
|