mirror of
https://github.com/OpenIntelWireless/IntelBluetoothFirmware.git
synced 2025-02-19 18:36:19 +00:00
IntelBTPatcher: reduce side effect for systems before Sequoia.
This commit is contained in:
@ -165,12 +165,14 @@ IOReturn CIntelBTPatcher::newHostDeviceRequest(void *that, IOService *provider,
|
||||
char hciBuf[MAX_HCI_BUF_LEN] = {0};
|
||||
|
||||
if (data == nullptr) {
|
||||
if (descriptor != nullptr && !descriptor->prepare(kIODirectionOut)) {
|
||||
if (descriptor != nullptr &&
|
||||
(getKernelVersion() < KernelVersion::Sequoia || !descriptor->prepare(kIODirectionOut))) {
|
||||
if (descriptor->getLength() > 0) {
|
||||
descriptor->readBytes(0, hciBuf, min(descriptor->getLength(), MAX_HCI_BUF_LEN));
|
||||
hdrLen = (uint32_t)min(descriptor->getLength(), MAX_HCI_BUF_LEN);
|
||||
}
|
||||
descriptor->complete(kIODirectionOut);
|
||||
if (getKernelVersion() >= KernelVersion::Sequoia)
|
||||
descriptor->complete(kIODirectionOut);
|
||||
}
|
||||
hdr = (HciCommandHdr *)hciBuf;
|
||||
if (hdr->opcode == HCI_OP_LE_SET_SCAN_PARAM) {
|
||||
|
Reference in New Issue
Block a user