Skip to content

Commit

Permalink
Codestyle and changelog fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PMheart committed Oct 31, 2021
1 parent 8b5c9d7 commit 7af1132
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions BrcmPatchRAM/BlueToolFixup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ bool BlueToolFixup::start(IOService *provider) {
#pragma mark - Patches

static const uint8_t kSkipUpdateFilePathOriginal[] = "/etc/bluetool/SkipBluetoothAutomaticFirmwareUpdate";
static const uint8_t kSkipUpdateFilePathPatched[] = "/System/Library/CoreServices/boot.efi";
static const uint8_t kSkipUpdateFilePathPatched[] = "/System/Library/CoreServices/boot.efi";

static const uint8_t kVendorCheckOriginal[] =
{
0x81, 0xFA, // cmp edx
0x81, 0xFA, // cmp edx
0x5C, 0x0A, 0x00, 0x00, // Vendor BRCM,
0x74 // jnz short
0x74 // jnz short
};

static const uint8_t kVendorCheckPatched[] =
{
0x81, 0xFA, // cmp edx
0x81, 0xFA, // cmp edx
0x5C, 0x0A, 0x00, 0x00, // Vendor BRCM,
0xEB // jmp short
0xEB // jmp short
};

// Workaround for bugged chipset range check that
Expand All @@ -68,22 +68,21 @@ static const uint8_t kVendorCheckPatched[] =
// See https://github.com/acidanthera/BrcmPatchRAM/pull/18 for more details.
static const uint8_t kBadChipsetCheckOriginal[] =
{
0x81, 0xF9, // cmp ecx
0x81, 0xF9, // cmp ecx
0xCF, 0x07, 0x00, 0x00, // int 1999
0x72 // jb short
0x72 // jb short
};

static const uint8_t kBadChipsetCheckPatched[] =
{
0x81, 0xF9, // cmp ecx
0x81, 0xF9, // cmp ecx
0xCF, 0x07, 0x00, 0x00, // int 1999
0xEB // jmp short
0xEB // jmp short
};

static bool shouldPatchBoardId = false;

static const size_t kBoardIdSize = sizeof(
"Mac-F60DEB81FF30ACF6");
static const size_t kBoardIdSize = sizeof("Mac-F60DEB81FF30ACF6");

static const char boardIdsWithUSBBluetooth[][kBoardIdSize] = {
"Mac-F60DEB81FF30ACF6",
Expand Down
2 changes: 1 addition & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BrcmPatchRAM Changelog
#### v2.6.1
- Improved BlueToolFixup compatibility with macOS 12b10 (thx @dhinakg, @williambj1)
- Fixed bluetooth support on MBP15,4 and other similar boards (thx @dhinakg, @usr-sse2)
- Fixed bluetooth not working on macOS 12 after wake (thx @williambj1)
- Fixed bluetooth not working on macOS 12 after the first power cycle (thx @williambj1, @zxystd)

#### v2.6.0
- Added BlueToolFixup for macOS 12 compatibility
Expand Down

0 comments on commit 7af1132

Please sign in to comment.