diff --git a/src/DSi_NWifi.cpp b/src/DSi_NWifi.cpp index d95def5a..76e707d9 100644 --- a/src/DSi_NWifi.cpp +++ b/src/DSi_NWifi.cpp @@ -163,7 +163,7 @@ void DSi_NWifi::Reset() const Firmware* fw = NDS::SPI->GetFirmware(); - MacAddress mac = fw->GetHeader().MacAddress; + MacAddress mac = fw->GetHeader().MacAddr; Log(LogLevel::Info, "NWifi MAC: %02X:%02X:%02X:%02X:%02X:%02X\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); diff --git a/src/SPI.cpp b/src/SPI.cpp index 8eb8b0e0..8432b192 100644 --- a/src/SPI.cpp +++ b/src/SPI.cpp @@ -98,7 +98,7 @@ void FirmwareMem::Reset() // disable autoboot //Firmware[userdata+0x64] &= 0xBF; - MacAddress mac = Firmware->GetHeader().MacAddress; + MacAddress mac = Firmware->GetHeader().MacAddr; Log(LogLevel::Info, "MAC: %02X:%02X:%02X:%02X:%02X:%02X\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); // verify shit @@ -139,7 +139,7 @@ void FirmwareMem::SetupDirectBoot(bool dsi) if (dsi) { for (u32 i = 0; i < 6; i += 2) - DSi::ARM9Write16(0x02FFFCF4, *(u16*)&header.MacAddress[i]); // MAC address + DSi::ARM9Write16(0x02FFFCF4, *(u16*)&header.MacAddr[i]); // MAC address // checkme DSi::ARM9Write16(0x02FFFCFA, header.EnabledChannels); // enabled channels diff --git a/src/SPI.h b/src/SPI.h index 4578ad5f..2fde2269 100644 --- a/src/SPI.h +++ b/src/SPI.h @@ -85,7 +85,7 @@ public: void Release() override; private: - std::unique_ptr Firmware; + std::unique_ptr Firmware; u8 CurCmd; diff --git a/src/SPI_Firmware.cpp b/src/SPI_Firmware.cpp index 943a0b32..55071453 100644 --- a/src/SPI_Firmware.cpp +++ b/src/SPI_Firmware.cpp @@ -113,7 +113,7 @@ Firmware::FirmwareHeader::FirmwareHeader(int consoletype) WifiConfigLength = 0x138; Unused1 = 0; memcpy(&Unused3, DEFAULT_UNUSED3, sizeof(DEFAULT_UNUSED3)); - MacAddress = DEFAULT_MAC; + MacAddr = DEFAULT_MAC; EnabledChannels = 0x3FFE; memset(&Unknown2, 0xFF, sizeof(Unknown2)); RFChipType = RFChipType::Type3; diff --git a/src/SPI_Firmware.h b/src/SPI_Firmware.h index ad66a0a4..a264a6cb 100644 --- a/src/SPI_Firmware.h +++ b/src/SPI_Firmware.h @@ -45,7 +45,6 @@ constexpr const char* const DEFAULT_SSID = "melonAP"; constexpr int EXTENDED_WIFI_SETTINGS_OFFSET = -0xA00; using FirmwareIdentifier = std::array; -using MacAddress = std::array; constexpr FirmwareIdentifier GENERATED_FIRMWARE_IDENTIFIER = {'M', 'E', 'L', 'N'}; @@ -283,7 +282,7 @@ public: u8 Unused3[6]; - MacAddress MacAddress; + MacAddress MacAddr; u16 EnabledChannels; diff --git a/src/frontend/qt_sdl/ROMManager.cpp b/src/frontend/qt_sdl/ROMManager.cpp index 19ae9543..8a54e058 100644 --- a/src/frontend/qt_sdl/ROMManager.cpp +++ b/src/frontend/qt_sdl/ROMManager.cpp @@ -937,7 +937,7 @@ void LoadUserSettingsFromConfig(Firmware& firmware) bool rep = false; auto& header = firmware.GetHeader(); - memcpy(&mac, header.MacAddress.data(), sizeof(MacAddress)); + memcpy(&mac, header.MacAddr.data(), sizeof(MacAddress)); MacAddress configuredMac; @@ -961,7 +961,7 @@ void LoadUserSettingsFromConfig(Firmware& firmware) if (rep) { mac[0] &= 0xFC; // ensure the MAC isn't a broadcast MAC - header.MacAddress = mac; + header.MacAddr = mac; header.UpdateChecksum(); }