mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-06-07 08:25:08 -06:00
Fixed coding style errors
This commit is contained in:
parent
60f7dbd4f8
commit
d469c6b583
@ -21,9 +21,9 @@
|
|||||||
#include "core/hle/service/ac/ac_u.h"
|
#include "core/hle/service/ac/ac_u.h"
|
||||||
#include "core/hle/service/nwm/nwm_inf.h"
|
#include "core/hle/service/nwm/nwm_inf.h"
|
||||||
#include "core/hle/service/soc/soc_u.h"
|
#include "core/hle/service/soc/soc_u.h"
|
||||||
|
#include "core/memory.h"
|
||||||
#include "network/network.h"
|
#include "network/network.h"
|
||||||
#include "network/room.h"
|
#include "network/room.h"
|
||||||
#include "core/memory.h"
|
|
||||||
|
|
||||||
SERIALIZE_EXPORT_IMPL(Service::AC::Module)
|
SERIALIZE_EXPORT_IMPL(Service::AC::Module)
|
||||||
SERVICE_CONSTRUCT_IMPL(Service::AC::Module)
|
SERVICE_CONSTRUCT_IMPL(Service::AC::Module)
|
||||||
@ -205,7 +205,7 @@ void Module::Interface::ScanAPs(Kernel::HLERequestContext& ctx) {
|
|||||||
VAddr cmd_addr = thread->GetCommandBufferAddress();
|
VAddr cmd_addr = thread->GetCommandBufferAddress();
|
||||||
VAddr buffer_vaddr = cmd_addr + 0x100;
|
VAddr buffer_vaddr = cmd_addr + 0x100;
|
||||||
const u32 descr = memory.Read32(buffer_vaddr);
|
const u32 descr = memory.Read32(buffer_vaddr);
|
||||||
ASSERT(descr == ((size << 14) | 2)); // preliminary check
|
ASSERT(descr == ((size << 14) | 2)); // preliminary check
|
||||||
const VAddr output_buffer = memory.Read32(buffer_vaddr + 0x4); // address to output buffer
|
const VAddr output_buffer = memory.Read32(buffer_vaddr + 0x4); // address to output buffer
|
||||||
|
|
||||||
// At this point, we have all the input given to us
|
// At this point, we have all the input given to us
|
||||||
@ -217,25 +217,24 @@ void Module::Interface::ScanAPs(Kernel::HLERequestContext& ctx) {
|
|||||||
Network::MacAddress mac = Network::BroadcastMac;
|
Network::MacAddress mac = Network::BroadcastMac;
|
||||||
|
|
||||||
std::array<u32, IPC::COMMAND_BUFFER_LENGTH + 2 * IPC::MAX_STATIC_BUFFERS> cmd_buf;
|
std::array<u32, IPC::COMMAND_BUFFER_LENGTH + 2 * IPC::MAX_STATIC_BUFFERS> cmd_buf;
|
||||||
cmd_buf[0] = 0x000603C4; // Command header
|
cmd_buf[0] = 0x000603C4; // Command header
|
||||||
cmd_buf[1] = size; // size of buffer
|
cmd_buf[1] = size; // size of buffer
|
||||||
cmd_buf[2] = 0; // dummy data
|
cmd_buf[2] = 0; // dummy data
|
||||||
cmd_buf[3] = 0; // dummy data
|
cmd_buf[3] = 0; // dummy data
|
||||||
std::memcpy(cmd_buf.data() + 4, mac.data(), sizeof(Network::MacAddress));
|
std::memcpy(cmd_buf.data() + 4, mac.data(), sizeof(Network::MacAddress));
|
||||||
cmd_buf[16] = 0; // 0x0 handle header
|
cmd_buf[16] = 0; // 0x0 handle header
|
||||||
cmd_buf[17] = 0; // set to 0 to ignore it
|
cmd_buf[17] = 0; // set to 0 to ignore it
|
||||||
cmd_buf[18] = (size << 4) | 12; // should be considered correct for mapped buffer
|
cmd_buf[18] = (size << 4) | 12; // should be considered correct for mapped buffer
|
||||||
cmd_buf[19] = output_buffer; // address of output buffer
|
cmd_buf[19] = output_buffer; // address of output buffer
|
||||||
|
|
||||||
// Create context for call to NWM_INF::RecvBeaconBroadcastData
|
// Create context for call to NWM_INF::RecvBeaconBroadcastData
|
||||||
auto context =
|
auto context = std::make_shared<Kernel::HLERequestContext>(Core::System::GetInstance().Kernel(),
|
||||||
std::make_shared<Kernel::HLERequestContext>(Core::System::GetInstance().Kernel(),
|
ctx.Session(), thread);
|
||||||
ctx.Session(), thread);
|
|
||||||
context->PopulateFromIncomingCommandBuffer(cmd_buf.data(), current_process);
|
context->PopulateFromIncomingCommandBuffer(cmd_buf.data(), current_process);
|
||||||
|
|
||||||
// Retrieve service from service manager
|
// Retrieve service from service manager
|
||||||
auto nwm_inf =
|
auto nwm_inf =
|
||||||
Core::System::GetInstance().ServiceManager().GetService<Service::NWM::NWM_INF>("nwm::INF");
|
Core::System::GetInstance().ServiceManager().GetService<Service::NWM::NWM_INF>("nwm::INF");
|
||||||
LOG_WARNING(Service_AC, "Calling NWM_INF::RecvBeaconBroadcastData");
|
LOG_WARNING(Service_AC, "Calling NWM_INF::RecvBeaconBroadcastData");
|
||||||
// Perform delegated task
|
// Perform delegated task
|
||||||
nwm_inf->HandleSyncRequest(*context);
|
nwm_inf->HandleSyncRequest(*context);
|
||||||
|
|||||||
@ -34,8 +34,8 @@ void NWM_INF::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) {
|
|||||||
cmd_buf[i] = rp.Pop<u32>();
|
cmd_buf[i] = rp.Pop<u32>();
|
||||||
}
|
}
|
||||||
rp.Pop<u32>();
|
rp.Pop<u32>();
|
||||||
cmd_buf[15] = 0; // dummy wlan_comm_id
|
cmd_buf[15] = 0; // dummy wlan_comm_id
|
||||||
cmd_buf[16] = 0; // dummy id
|
cmd_buf[16] = 0; // dummy id
|
||||||
for (i = 17; i <= 20; i++) {
|
for (i = 17; i <= 20; i++) {
|
||||||
cmd_buf[i] = rp.Pop<u32>();
|
cmd_buf[i] = rp.Pop<u32>();
|
||||||
}
|
}
|
||||||
@ -43,12 +43,12 @@ void NWM_INF::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) {
|
|||||||
// Prepare for call to NWM_UDS
|
// Prepare for call to NWM_UDS
|
||||||
std::shared_ptr<Kernel::Thread> thread = ctx.ClientThread();
|
std::shared_ptr<Kernel::Thread> thread = ctx.ClientThread();
|
||||||
auto current_process = thread->owner_process.lock();
|
auto current_process = thread->owner_process.lock();
|
||||||
auto context =
|
auto context = std::make_shared<Kernel::HLERequestContext>(Core::System::GetInstance().Kernel(),
|
||||||
std::make_shared<Kernel::HLERequestContext>(Core::System::GetInstance().Kernel(),
|
ctx.Session(), thread);
|
||||||
ctx.Session(), thread);
|
|
||||||
context->PopulateFromIncomingCommandBuffer(cmd_buf.data(), current_process);
|
context->PopulateFromIncomingCommandBuffer(cmd_buf.data(), current_process);
|
||||||
|
|
||||||
auto nwm_uds = Core::System::GetInstance().ServiceManager().GetService<Service::NWM::NWM_UDS>("nwm::UDS");
|
auto nwm_uds =
|
||||||
|
Core::System::GetInstance().ServiceManager().GetService<Service::NWM::NWM_UDS>("nwm::UDS");
|
||||||
LOG_WARNING(Service_NWM, "Calling NWM_UDS::RecvBeaconBroadcastData");
|
LOG_WARNING(Service_NWM, "Calling NWM_UDS::RecvBeaconBroadcastData");
|
||||||
nwm_uds->HandleSyncRequest(*context);
|
nwm_uds->HandleSyncRequest(*context);
|
||||||
LOG_WARNING(Service_NWM, "Returned to NWM_INF::RecvBeaconBroadcastData");
|
LOG_WARNING(Service_NWM, "Returned to NWM_INF::RecvBeaconBroadcastData");
|
||||||
|
|||||||
@ -628,7 +628,6 @@ void NWM_UDS::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) {
|
|||||||
entry.total_size = static_cast<u32>(sizeof(BeaconEntryHeader) + beacon.data.size());
|
entry.total_size = static_cast<u32>(sizeof(BeaconEntryHeader) + beacon.data.size());
|
||||||
entry.wifi_channel = beacon.channel;
|
entry.wifi_channel = beacon.channel;
|
||||||
entry.header_size = sizeof(BeaconEntryHeader);
|
entry.header_size = sizeof(BeaconEntryHeader);
|
||||||
ASSERT(entry.header_size == 0x1C); // Sanity check
|
|
||||||
entry.mac_address = beacon.transmitter_address;
|
entry.mac_address = beacon.transmitter_address;
|
||||||
|
|
||||||
ASSERT(cur_buffer_size < out_buffer_size);
|
ASSERT(cur_buffer_size < out_buffer_size);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user