summaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
authorMichael Brown2017-06-14 18:40:05 +0200
committerMichael Brown2017-06-14 18:40:05 +0200
commitc8cb867d655227d779ce8ce9e392e853997b01dd (patch)
tree0eaca1037a90f70d7b7339202189b33035719299 /src/drivers
parent[build] Use -no-pie on newer versions of gcc (diff)
downloadipxe-c8cb867d655227d779ce8ce9e392e853997b01dd.tar.gz
ipxe-c8cb867d655227d779ce8ce9e392e853997b01dd.tar.xz
ipxe-c8cb867d655227d779ce8ce9e392e853997b01dd.zip
[ecm] Display invalid MAC address strings in debug messages
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/net/ecm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/drivers/net/ecm.c b/src/drivers/net/ecm.c
index f2d9161c..847a45b8 100644
--- a/src/drivers/net/ecm.c
+++ b/src/drivers/net/ecm.c
@@ -101,13 +101,18 @@ int ecm_fetch_mac ( struct usb_device *usb,
}
/* Sanity check */
- if ( len != ( ( int ) ( sizeof ( buf ) - 1 /* NUL */ ) ) )
+ if ( len != ( ( int ) ( sizeof ( buf ) - 1 /* NUL */ ) ) ) {
+ DBGC ( usb, "USB %s has invalid ECM MAC \"%s\"\n",
+ usb->name, buf );
return -EINVAL;
+ }
/* Decode MAC address */
len = base16_decode ( buf, hw_addr, ETH_ALEN );
if ( len < 0 ) {
rc = len;
+ DBGC ( usb, "USB %s could not decode ECM MAC \"%s\": %s\n",
+ usb->name, buf, strerror ( rc ) );
return rc;
}