mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-04-11 03:41:28 -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/nwm/nwm_inf.h"
|
||||
#include "core/hle/service/soc/soc_u.h"
|
||||
#include "core/memory.h"
|
||||
#include "network/network.h"
|
||||
#include "network/room.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Service::AC::Module)
|
||||
SERVICE_CONSTRUCT_IMPL(Service::AC::Module)
|
||||
@ -195,7 +195,7 @@ void Module::Interface::ScanAPs(Kernel::HLERequestContext& ctx) {
|
||||
// Arg 2 is CallingPID value (PID Header)
|
||||
// Arg 3 is PID
|
||||
const u32 pid = rp.PopPID();
|
||||
|
||||
|
||||
std::shared_ptr<Kernel::Thread> thread = ctx.ClientThread();
|
||||
auto current_process = Core::System::GetInstance().Kernel().GetCurrentProcess();
|
||||
Memory::MemorySystem& memory = Core::System::GetInstance().Memory();
|
||||
@ -205,7 +205,7 @@ void Module::Interface::ScanAPs(Kernel::HLERequestContext& ctx) {
|
||||
VAddr cmd_addr = thread->GetCommandBufferAddress();
|
||||
VAddr buffer_vaddr = cmd_addr + 0x100;
|
||||
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
|
||||
|
||||
// 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;
|
||||
|
||||
std::array<u32, IPC::COMMAND_BUFFER_LENGTH + 2 * IPC::MAX_STATIC_BUFFERS> cmd_buf;
|
||||
cmd_buf[0] = 0x000603C4; // Command header
|
||||
cmd_buf[1] = size; // size of buffer
|
||||
cmd_buf[2] = 0; // dummy data
|
||||
cmd_buf[3] = 0; // dummy data
|
||||
cmd_buf[0] = 0x000603C4; // Command header
|
||||
cmd_buf[1] = size; // size of buffer
|
||||
cmd_buf[2] = 0; // dummy data
|
||||
cmd_buf[3] = 0; // dummy data
|
||||
std::memcpy(cmd_buf.data() + 4, mac.data(), sizeof(Network::MacAddress));
|
||||
cmd_buf[16] = 0; // 0x0 handle header
|
||||
cmd_buf[17] = 0; // set to 0 to ignore it
|
||||
cmd_buf[16] = 0; // 0x0 handle header
|
||||
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[19] = output_buffer; // address of output buffer
|
||||
|
||||
// Create context for call to NWM_INF::RecvBeaconBroadcastData
|
||||
auto context =
|
||||
std::make_shared<Kernel::HLERequestContext>(Core::System::GetInstance().Kernel(),
|
||||
ctx.Session(), thread);
|
||||
auto context = std::make_shared<Kernel::HLERequestContext>(Core::System::GetInstance().Kernel(),
|
||||
ctx.Session(), thread);
|
||||
context->PopulateFromIncomingCommandBuffer(cmd_buf.data(), current_process);
|
||||
|
||||
// Retrieve service from service manager
|
||||
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");
|
||||
// Perform delegated task
|
||||
nwm_inf->HandleSyncRequest(*context);
|
||||
@ -250,7 +249,7 @@ void Module::Interface::ScanAPs(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
|
||||
IPC::RequestParser rp2(*context);
|
||||
rb.Push(rp2.Pop<u32>());
|
||||
// Mapped buffer at virtual address output_buffer
|
||||
// Mapped buffer at virtual address output_buffer
|
||||
Kernel::MappedBuffer mapped_buffer = rp2.PopMappedBuffer();
|
||||
rb.PushMappedBuffer(mapped_buffer);
|
||||
LOG_WARNING(Service_AC, "(STUBBED) called, pid={}", pid);
|
||||
|
||||
@ -34,8 +34,8 @@ void NWM_INF::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) {
|
||||
cmd_buf[i] = rp.Pop<u32>();
|
||||
}
|
||||
rp.Pop<u32>();
|
||||
cmd_buf[15] = 0; // dummy wlan_comm_id
|
||||
cmd_buf[16] = 0; // dummy id
|
||||
cmd_buf[15] = 0; // dummy wlan_comm_id
|
||||
cmd_buf[16] = 0; // dummy id
|
||||
for (i = 17; i <= 20; i++) {
|
||||
cmd_buf[i] = rp.Pop<u32>();
|
||||
}
|
||||
@ -43,12 +43,12 @@ void NWM_INF::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) {
|
||||
// Prepare for call to NWM_UDS
|
||||
std::shared_ptr<Kernel::Thread> thread = ctx.ClientThread();
|
||||
auto current_process = thread->owner_process.lock();
|
||||
auto context =
|
||||
std::make_shared<Kernel::HLERequestContext>(Core::System::GetInstance().Kernel(),
|
||||
ctx.Session(), thread);
|
||||
auto context = std::make_shared<Kernel::HLERequestContext>(Core::System::GetInstance().Kernel(),
|
||||
ctx.Session(), thread);
|
||||
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");
|
||||
nwm_uds->HandleSyncRequest(*context);
|
||||
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.wifi_channel = beacon.channel;
|
||||
entry.header_size = sizeof(BeaconEntryHeader);
|
||||
ASSERT(entry.header_size == 0x1C); // Sanity check
|
||||
entry.mac_address = beacon.transmitter_address;
|
||||
|
||||
ASSERT(cur_buffer_size < out_buffer_size);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user