mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-12-24 17:01:48 +01:00
Services/UDS: Use consistent spelling for WiFi and simplify the GetChannel function.
This commit is contained in:
parent
0ae6d8be5b
commit
f8f3b27eb3
@ -35,7 +35,7 @@ static NodeInfo node_info;
|
|||||||
// Mapping of bind node ids to their respective events.
|
// Mapping of bind node ids to their respective events.
|
||||||
static std::unordered_map<u32, Kernel::SharedPtr<Kernel::Event>> bind_node_events;
|
static std::unordered_map<u32, Kernel::SharedPtr<Kernel::Event>> bind_node_events;
|
||||||
|
|
||||||
// The wifi network channel that the network is currently on.
|
// The WiFi network channel that the network is currently on.
|
||||||
// Since we're not actually interacting with physical radio waves, this is just a dummy value.
|
// Since we're not actually interacting with physical radio waves, this is just a dummy value.
|
||||||
static u8 network_channel = DefaultNetworkChannel;
|
static u8 network_channel = DefaultNetworkChannel;
|
||||||
|
|
||||||
@ -320,10 +320,10 @@ static void GetChannel(Interface* self) {
|
|||||||
IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x1A, 0, 0);
|
IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x1A, 0, 0);
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
||||||
|
|
||||||
u8 channel = network_channel;
|
bool is_connected = connection_status.status !=
|
||||||
|
static_cast<u32>(NetworkStatus::NotConnected);
|
||||||
|
|
||||||
if (connection_status.status == static_cast<u32>(NetworkStatus::NotConnected))
|
u8 channel = is_connected ? network_channel : 0;
|
||||||
channel = 0;
|
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushRaw(channel);
|
rb.PushRaw(channel);
|
||||||
|
Loading…
Reference in New Issue
Block a user