hopefully get the compiler to shut up
This commit is contained in:
parent
e4f4e94694
commit
f188c2cf1a
|
@ -163,7 +163,7 @@ void DSi_NWifi::Reset()
|
||||||
|
|
||||||
const Firmware* fw = NDS::SPI->GetFirmware();
|
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",
|
Log(LogLevel::Info, "NWifi MAC: %02X:%02X:%02X:%02X:%02X:%02X\n",
|
||||||
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ void FirmwareMem::Reset()
|
||||||
// disable autoboot
|
// disable autoboot
|
||||||
//Firmware[userdata+0x64] &= 0xBF;
|
//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]);
|
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
|
// verify shit
|
||||||
|
@ -139,7 +139,7 @@ void FirmwareMem::SetupDirectBoot(bool dsi)
|
||||||
if (dsi)
|
if (dsi)
|
||||||
{
|
{
|
||||||
for (u32 i = 0; i < 6; i += 2)
|
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
|
// checkme
|
||||||
DSi::ARM9Write16(0x02FFFCFA, header.EnabledChannels); // enabled channels
|
DSi::ARM9Write16(0x02FFFCFA, header.EnabledChannels); // enabled channels
|
||||||
|
|
|
@ -85,7 +85,7 @@ public:
|
||||||
void Release() override;
|
void Release() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<Firmware> Firmware;
|
std::unique_ptr<class Firmware> Firmware;
|
||||||
|
|
||||||
u8 CurCmd;
|
u8 CurCmd;
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ Firmware::FirmwareHeader::FirmwareHeader(int consoletype)
|
||||||
WifiConfigLength = 0x138;
|
WifiConfigLength = 0x138;
|
||||||
Unused1 = 0;
|
Unused1 = 0;
|
||||||
memcpy(&Unused3, DEFAULT_UNUSED3, sizeof(DEFAULT_UNUSED3));
|
memcpy(&Unused3, DEFAULT_UNUSED3, sizeof(DEFAULT_UNUSED3));
|
||||||
MacAddress = DEFAULT_MAC;
|
MacAddr = DEFAULT_MAC;
|
||||||
EnabledChannels = 0x3FFE;
|
EnabledChannels = 0x3FFE;
|
||||||
memset(&Unknown2, 0xFF, sizeof(Unknown2));
|
memset(&Unknown2, 0xFF, sizeof(Unknown2));
|
||||||
RFChipType = RFChipType::Type3;
|
RFChipType = RFChipType::Type3;
|
||||||
|
|
|
@ -45,7 +45,6 @@ constexpr const char* const DEFAULT_SSID = "melonAP";
|
||||||
constexpr int EXTENDED_WIFI_SETTINGS_OFFSET = -0xA00;
|
constexpr int EXTENDED_WIFI_SETTINGS_OFFSET = -0xA00;
|
||||||
|
|
||||||
using FirmwareIdentifier = std::array<u8, 4>;
|
using FirmwareIdentifier = std::array<u8, 4>;
|
||||||
using MacAddress = std::array<u8, 6>;
|
|
||||||
|
|
||||||
constexpr FirmwareIdentifier GENERATED_FIRMWARE_IDENTIFIER = {'M', 'E', 'L', 'N'};
|
constexpr FirmwareIdentifier GENERATED_FIRMWARE_IDENTIFIER = {'M', 'E', 'L', 'N'};
|
||||||
|
|
||||||
|
@ -283,7 +282,7 @@ public:
|
||||||
|
|
||||||
u8 Unused3[6];
|
u8 Unused3[6];
|
||||||
|
|
||||||
MacAddress MacAddress;
|
MacAddress MacAddr;
|
||||||
|
|
||||||
u16 EnabledChannels;
|
u16 EnabledChannels;
|
||||||
|
|
||||||
|
|
|
@ -937,7 +937,7 @@ void LoadUserSettingsFromConfig(Firmware& firmware)
|
||||||
bool rep = false;
|
bool rep = false;
|
||||||
auto& header = firmware.GetHeader();
|
auto& header = firmware.GetHeader();
|
||||||
|
|
||||||
memcpy(&mac, header.MacAddress.data(), sizeof(MacAddress));
|
memcpy(&mac, header.MacAddr.data(), sizeof(MacAddress));
|
||||||
|
|
||||||
|
|
||||||
MacAddress configuredMac;
|
MacAddress configuredMac;
|
||||||
|
@ -961,7 +961,7 @@ void LoadUserSettingsFromConfig(Firmware& firmware)
|
||||||
if (rep)
|
if (rep)
|
||||||
{
|
{
|
||||||
mac[0] &= 0xFC; // ensure the MAC isn't a broadcast MAC
|
mac[0] &= 0xFC; // ensure the MAC isn't a broadcast MAC
|
||||||
header.MacAddress = mac;
|
header.MacAddr = mac;
|
||||||
header.UpdateChecksum();
|
header.UpdateChecksum();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue