提交 948cd43f 编写于 作者: J Jesse Brandeburg 提交者: Jeff Garzik

e100: allow bad MAC address when running with invalid eeprom csum

Seved Torstendahl <seved.torstendahl@netinsight.net> suggested to
let the module parameter for invalid eeprom checksum control the valid
mac address test.

If this bypass happens we should print a different message,
or at least one that is correct, maybe something like below
Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: NAuke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 1211bb6d
...@@ -2597,11 +2597,16 @@ static int __devinit e100_probe(struct pci_dev *pdev, ...@@ -2597,11 +2597,16 @@ static int __devinit e100_probe(struct pci_dev *pdev,
memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN); memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN);
memcpy(netdev->perm_addr, nic->eeprom, ETH_ALEN); memcpy(netdev->perm_addr, nic->eeprom, ETH_ALEN);
if(!is_valid_ether_addr(netdev->perm_addr)) { if (!is_valid_ether_addr(netdev->perm_addr)) {
DPRINTK(PROBE, ERR, "Invalid MAC address from " if (!eeprom_bad_csum_allow) {
"EEPROM, aborting.\n"); DPRINTK(PROBE, ERR, "Invalid MAC address from "
err = -EAGAIN; "EEPROM, aborting.\n");
goto err_out_free; err = -EAGAIN;
goto err_out_free;
} else {
DPRINTK(PROBE, ERR, "Invalid MAC address from EEPROM, "
"you MUST configure one.\n");
}
} }
/* Wol magic packet can be enabled from eeprom */ /* Wol magic packet can be enabled from eeprom */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册