if (ret < 0 || status) {
error("Cannot set random address [ret : %d] / errno : %d", ret, errno);
hci_close_dev(hdev);
+ if (errno == ETIMEDOUT) {
+ error("hci vendor command 0x%02x tx timeout", OCF_LE_SET_RANDOM_ADDRESS);
+ adapter_send_event("TxTimeoutError");
+ } else
+ adapter_send_event("HardwareError");
+
return -1;
}
rq.rlen = rp_len;
if (hci_send_req(dd, &rq, 5000) < 0) {
- error("Fail to send VSC");
+ error("Fail to send VSC : %s (%d)", strerror(errno), errno);
hci_close_dev(dd);
+ if (errno == ETIMEDOUT) {
+ error("hci vendor command 0x%02x tx timeout", ocf);
+ adapter_send_event("TxTimeoutError");
+ } else
+ adapter_send_event("HardwareError");
+
return -1;
}