Skip to content

Commit

Permalink
Merge branch 'OpenIntelWireless:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorys89 committed Sep 18, 2024
2 parents 62e96fd + 01cc180 commit 3c0a6f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions IntelBTPatcher/IntelBTPatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,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) {
Expand Down

0 comments on commit 3c0a6f0

Please sign in to comment.