Hi Pavel,
}
/* Restrict maximum inquiry length to 60 seconds */
if (ir.length > 60) {
..
}
+ if (ir.length > HCI_INQUIRY_MAX_TIMEOUT) {
+ err = -EINVAL;
+ goto done;
+ }
+
I found this easier to read than adding anything define somewhere else. And since this is a legacy interface that is no longer used by bluetoothd, this should be fine. We will start to deprecate this eventually.
And I prefer 1 minute max time here. Just to be safe.