Skip to content

Commit

Permalink
e100: allow bad MAC address when running with invalid eeprom csum
Browse files Browse the repository at this point in the history
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: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Jesse Brandeburg authored and Jeff Garzik committed Apr 28, 2007
1 parent 1211bb6 commit 948cd43
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions drivers/net/e100.c
Original file line number Diff line number Diff line change
Expand Up @@ -2597,11 +2597,16 @@ static int __devinit e100_probe(struct pci_dev *pdev,

memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN);
memcpy(netdev->perm_addr, nic->eeprom, ETH_ALEN);
if(!is_valid_ether_addr(netdev->perm_addr)) {
DPRINTK(PROBE, ERR, "Invalid MAC address from "
"EEPROM, aborting.\n");
err = -EAGAIN;
goto err_out_free;
if (!is_valid_ether_addr(netdev->perm_addr)) {
if (!eeprom_bad_csum_allow) {
DPRINTK(PROBE, ERR, "Invalid MAC address from "
"EEPROM, aborting.\n");
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 */
Expand Down

0 comments on commit 948cd43

Please sign in to comment.