@@ -2641,13 +2641,14 @@ static int sony_check_add(struct sony_sc *sc)
HID_REQ_GET_REPORT);
if (ret != DS4_FEATURE_REPORT_0x81_SIZE) {
- hid_err(sc->hdev, "failed to retrieve feature report 0x81 with the DualShock 4 MAC address\n");
- ret = ret < 0 ? ret : -EINVAL;
- goto out_free;
+ uint32_t hash = full_name_hash(NULL, dev_name(&sc->hdev->dev),
+ strlen(dev_name(&sc->hdev->dev)));
+ hid_warn(sc->hdev, "failed to retrieve feature report 0x81 with the DualShock 4 MAC address\n");
+ memcpy(sc->mac_address, &hash, sizeof(hash));
+ } else {
+ memcpy(sc->mac_address, &buf[1], sizeof(sc->mac_address));
}
- memcpy(sc->mac_address, &buf[1], sizeof(sc->mac_address));
-
snprintf(sc->hdev->uniq, sizeof(sc->hdev->uniq),
"%pMR", sc->mac_address);
} else if ((sc->quirks & SIXAXIS_CONTROLLER_USB) ||