diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2007-04-26 12:43:11 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-04-28 11:01:07 -0400 |
commit | 948cd43fed7c7d919fa30e0609b2b5852c4503ef (patch) | |
tree | 8ec2af01e7df267e8da3768e4f633c7136312cea /drivers/net | |
parent | 1211bb6dcd935c48e864d4eecbf8a684e982419a (diff) |
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: 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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/e100.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 71c6d334bd7f..135617c5941f 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -2597,11 +2597,16 @@ static int __devinit e100_probe(struct pci_dev *pdev, | |||
2597 | 2597 | ||
2598 | memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN); | 2598 | memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN); |
2599 | memcpy(netdev->perm_addr, nic->eeprom, ETH_ALEN); | 2599 | memcpy(netdev->perm_addr, nic->eeprom, ETH_ALEN); |
2600 | if(!is_valid_ether_addr(netdev->perm_addr)) { | 2600 | if (!is_valid_ether_addr(netdev->perm_addr)) { |
2601 | DPRINTK(PROBE, ERR, "Invalid MAC address from " | 2601 | if (!eeprom_bad_csum_allow) { |
2602 | "EEPROM, aborting.\n"); | 2602 | DPRINTK(PROBE, ERR, "Invalid MAC address from " |
2603 | err = -EAGAIN; | 2603 | "EEPROM, aborting.\n"); |
2604 | goto err_out_free; | 2604 | err = -EAGAIN; |
2605 | goto err_out_free; | ||
2606 | } else { | ||
2607 | DPRINTK(PROBE, ERR, "Invalid MAC address from EEPROM, " | ||
2608 | "you MUST configure one.\n"); | ||
2609 | } | ||
2605 | } | 2610 | } |
2606 | 2611 | ||
2607 | /* Wol magic packet can be enabled from eeprom */ | 2612 | /* Wol magic packet can be enabled from eeprom */ |