diff options
author | imp <imp@FreeBSD.org> | 2005-08-05 04:56:14 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-08-05 04:56:14 +0000 |
commit | c962eea21b73487af77b7f9dda4a2557ddd9e5ba (patch) | |
tree | a2dcb655c1ee9458ac59e192313c8eae5afe1523 /sys/dev/wi | |
parent | 8334e4160937e043ee1c77ad962f6347033a631c (diff) | |
download | FreeBSD-src-c962eea21b73487af77b7f9dda4a2557ddd9e5ba.zip FreeBSD-src-c962eea21b73487af77b7f9dda4a2557ddd9e5ba.tar.gz |
When the MAC address is reported all zeros, then error is necessarily
0. This means that we 'succeed' the attach, even after we've freed
the internal data bits. This leads to a panic when you eject the card
with this problem.
Set error = ENXIO in the mac read zeros case.
Diffstat (limited to 'sys/dev/wi')
-rw-r--r-- | sys/dev/wi/if_wi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index 72f5eca..c80c939 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -294,8 +294,10 @@ wi_attach(device_t dev) if (error || IEEE80211_ADDR_EQ(ic->ic_myaddr, empty_macaddr)) { if (error != 0) device_printf(dev, "mac read failed %d\n", error); - else + else { device_printf(dev, "mac read failed (all zeros)\n"); + error = ENXIO; + } wi_free(dev); return (error); } |