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.
This commit is contained in:
Warner Losh 2005-08-05 04:56:14 +00:00
parent dfaacec6ff
commit 584d11ee54

View File

@ -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);
}