strcpy(buf, "cur_etheraddr");
ret = dhdcdc_query_ioctl(dhd, 0, WLC_GET_VAR, buf, sizeof(buf));
if (ret < 0) {
- goto fail;
+ dhd_os_proto_unblock(dhd);
+ return ret;
}
memcpy(dhd->mac.octet, buf, ETHER_ADDR_LEN);
/* Always assumes wl for now */
dhd->iswl = TRUE;
-fail:
-
return ret;
}
bcmerror = dhd_prot_ioctl(&dhd->pub, ifidx, (wl_ioctl_t *)&ioc, buf, buflen);
- if (bcmerror == -ETIMEDOUT) {
+done:
+ if ((bcmerror == -ETIMEDOUT) || ((dhd->pub.busstate == DHD_BUS_DOWN) &&
+ (!dhd->pub.dongle_reset))) {
DHD_ERROR(("%s: Event HANG send up\n", __FUNCTION__));
wl_iw_send_priv_event(net, "HANG");
}
-done:
+
if (!bcmerror && buf && ioc.buf) {
if (copy_to_user(ioc.buf, buf, buflen))
bcmerror = -EFAULT;