Changes

Jump to navigation Jump to search
15,142 bytes added ,  17:10, 12 June 2022
Line 6: Line 6:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || OpenMode
+
| 0 || [[#OpenMode]]
 
|-
 
|-
| 1 || CloseMode
+
| 1 || [[#CloseMode]]
 
|-
 
|-
| 2 || GetMacAddress
+
| 2 || [[#GetMacAddress]]
 
|-
 
|-
| 3 || StartScan
+
| 3 || [[#StartScan]]
 
|-
 
|-
| 4 || StopScan
+
| 4 || [[#StopScan]]
 
|-
 
|-
| 5 || Connect
+
| 5 || [[#Connect]]
 
|-
 
|-
| 6 || CancelConnect
+
| 6 || [[#CancelConnect]]
 
|-
 
|-
| 7 || Disconnect
+
| 7 || [[#Disconnect]]
 
|-
 
|-
| 8 || GetSystemEvent
+
| 8 || [[#GetSystemEvent]]
 
|-
 
|-
 
| 9 || [[#GetConnectionStatus]]
 
| 9 || [[#GetConnectionStatus]]
 
|-
 
|-
| 10 || GetState
+
| 10 || [[#GetState]]
 
|-
 
|-
| 11 || GetScanResult
+
| 11 || [[#GetScanResult]]
 
|-
 
|-
| 12 || GetRssi
+
| 12 || [[#GetRssi]]
 
|-
 
|-
| 13 || ChangeRxAntenna
+
| 13 || [[#ChangeRxAntenna]]
 
|-
 
|-
| 14 || GetFwVersion
+
| 14 || [[#GetFwVersion]]
 
|-
 
|-
| 15 || RequestSleep
+
| 15 || [[#RequestSleep]]
 
|-
 
|-
| 16 || RequestWakeUp
+
| 16 || [[#RequestWakeUp]]
 
|-
 
|-
| 17 || ConnectWithWps
+
| 17 || [[#ConnectWithWps]]
 
|-
 
|-
 
| 18 || [3.0.0+]
 
| 18 || [3.0.0+]
Line 62: Line 62:  
| 27 || [4.0.0+]
 
| 27 || [4.0.0+]
 
|-
 
|-
| 28 || [5.0.0+] InitializeWlan
+
| 28 || [5.0.0+] [[#InitializeWlan]]
 
|-
 
|-
| 29 || [7.0.0+] FinalizeWlan
+
| 29 || [7.0.0+] [[#FinalizeWlan]]
 
|-
 
|-
| 30 || [8.0.0+]
+
| 30 || [8.0.0+] [[#SetWowlDelayedWakeTime]]
 
|-
 
|-
 
| 31 || [11.0.0+]
 
| 31 || [11.0.0+]
Line 82: Line 82:  
| 37 || [11.0.0+]
 
| 37 || [11.0.0+]
 
|-
 
|-
| 38 || [13.0.0+]
+
| 38 || [13.0.0+] [[#SetDfrts]]
 
|}
 
|}
   Line 90: Line 90:     
[7.0.0+] Input/output for cmds 27/28 were swapped, perhaps these cmds were swapped?
 
[7.0.0+] Input/output for cmds 27/28 were swapped, perhaps these cmds were swapped?
 +
 +
== OpenMode ==
 +
No input/output.
 +
 +
Sends command message 0x99 to the state machine.
 +
 +
This is used by [[Network_Interface_services|nifm]].
 +
 +
== CloseMode ==
 +
No input/output.
 +
 +
Sends command message 0x9A to the state machine.
 +
 +
This is used by [[Network_Interface_services|nifm]].
 +
 +
== GetMacAddress ==
 +
No input. Returns an output [[#MacAddress]].
 +
 +
Sends command message 0x18 (GetMacAddress) to the state machine.
 +
 +
This is used by [[Network_Interface_services|nifm]].
 +
 +
== StartScan ==
 +
Takes a type-0x15 input buffer buffer containing a [[#ScanRequest]]. No output.
 +
 +
Sends command messages 0xA (SetWlanInterfaceUpDown) and 0x14 (ScanRequest) to the state machine.
 +
 +
This is used by [[Network_Interface_services|nifm]].
 +
 +
== StopScan ==
 +
No input/output.
 +
 +
Sends command message 0x16 (CancelScan) to the state machine.
 +
 +
This is used by [[Network_Interface_services|nifm]].
 +
 +
== Connect ==
 +
Takes an input [[#ConnectParam]]. No output.
 +
 +
Sends command messages 0xA (SetWlanInterfaceUpDown), 0x11 (SetBeaconLostTimeout) and 0x20 (JoinNetworkSta) to the state machine.
 +
 +
This is used by [[Network_Interface_services|nifm]].
 +
 +
== CancelConnect ==
 +
No input/output.
 +
 +
Sends command message 0x23 (CancelJoinNetwork) to the state machine.
 +
 +
This is used by [[Network_Interface_services|nifm]].
 +
 +
== Disconnect ==
 +
No input/output.
 +
 +
Sends command message 0x24 (DisconnectRequest) to the state machine.
 +
 +
This is used by [[Network_Interface_services|nifm]].
 +
 +
== GetSystemEvent ==
 +
Takes an input u32 '''SystemEventType'''. Returns an output Event handle.
 +
 +
This is used by [[Network_Interface_services|nifm]].
    
== GetConnectionStatus ==
 
== GetConnectionStatus ==
No input, returns an output 0x3C-byte struct.
+
No input. Returns an output [[#ConnectionStatus]].
 +
 
 +
Sends command message 0x80 (GetState) to the state machine, to check current state. Then this copies data from state to output (unrelated to message 0x80).
 +
 
 +
This is used by [[Network_Interface_services|nifm]].
 +
 
 +
== GetState ==
 +
No input. Returns an output [[#State]].
 +
 
 +
Sends command message 0x80 (GetState) to the state machine.
 +
 
 +
This is used by [[Network_Interface_services|nifm]].
 +
 
 +
== GetScanResult ==
 +
Takes a type-0x6 output buffer containing a [[#ScanResult]]. No output.
 +
 
 +
Sends command message 0x15 (BssInfoListGet) to the state machine.
 +
 
 +
This is used by [[Network_Interface_services|nifm]].
 +
 
 +
== GetRssi ==
 +
No input. Returns an output u32 '''Rssi'''.
 +
 
 +
Sends command message 0x2E (GetRssi) to the state machine.
 +
 
 +
This is used by [[Network_Interface_services|nifm]].
 +
 
 +
== ChangeRxAntenna ==
 +
Takes an input u32. No output.
 +
 
 +
Sends command message 0x30 (SetRxChain) to the state machine.
 +
 
 +
The input value must be 1-3.
 +
 
 +
The message handler calls two vfuncs. The first vfunc uses the input u32 directly to configure "rxchain". The second vfunc configures "btc_params" with data determined using the input value.
 +
 
 +
This is not used on retail.
 +
 
 +
== GetFwVersion ==
 +
Takes a type-0xA output buffer containing a [[#FwVersion]]. No output.
 +
 
 +
Sends command message 0x33 (GetFwVersion) to the state machine. The handler validates state, then gets the value for config "ver".
 +
 
 +
This is not used on retail.
 +
 
 +
== RequestSleep ==
 +
No input/output.
 +
 
 +
Sends command messages 0x24 (DisconnectRequest), 0x34 (RequestSleep), 0x3D and 0x3E to the state machine.
 +
 
 +
First message GetState is sent, if state is 0x3 it does the following:
 +
 
 +
* Sends message 0x3D. If successful and the output u8 is 0, this then does the following:
 +
** Uses GetState to check for state 0x2/0x3. On success message DisconnectRequest is sent. If state is invalid or the command message failed, this will Abort.
 +
** Uses GetState to check for state 0x1/0x2/0xA. On success message 0x9A with param=0 is sent. If state is invalid or the command message failed, this will Abort.
 +
 
 +
Then message RequestSleep is sent. If the Result is not 0x146B (including success), it returns the Result. Otherwise when the Result is that value, it does the following:
 +
 
 +
* Sends message 0x3E.
 +
** Uses GetState to check for state 0x2/0x3. On success message DisconnectRequest is sent. If state is invalid or the command message failed, this will Abort.
 +
** Uses GetState to check for state 0x1/0x2/0xA. On success message 0x9A with param=0 is sent. If state is invalid or the command message failed, this will Abort.
 +
** Then this cmpl impl func will return the Result from calling itself.
 +
 
 +
This is used by [[Network_Interface_services|nifm]].
 +
 
 +
== RequestWakeUp ==
 +
No input/output.
 +
 
 +
Sends command messages 0x1 (InitalizeWlanDriver), 0x24 (DisconnectRequest), 0x35 (RequestWakeUp), 0x3E, 0x80 (GetState) and 0x81 (GetStateBeforeSleep) to the state machine.
 +
 
 +
First message GetState is sent, returning 0 if state is 0xC, or throwing error if it isn't 0xA. Then message RequestWakeUp is sent, if successful then message 0x3E is sent and 0 is returned.
 +
 
 +
If RequestWakeUp fails it will immediately return the Result, unless the Result is one of the following:
 +
* 0xE86B (normal non-wowl codepath was previously used during RequestSleep): Sends message InitalizeWlanDriver, returning a Result on failure. Then message GetStateBeforeSleep is sent. If the output state is 0x1, it returns 0. If not 0x2 or the second output field is non-zero, it will Abort. Uses GetState to verify the state is valid, returning the Result from that on failure. Otherwise this will return the Result from sending command request 0x99 with param=0.
 +
* 0xE66B: Sends message 0x3E. Uses GetState to verify the state is valid, when valid then message DisconnectRequest is sent. If state-validation/DisconnectRequest failed this will Abort, otherwise this then returns 0.
 +
 
 +
This is used by [[Network_Interface_services|nifm]].
 +
 
 +
== ConnectWithWps ==
 +
Takes a type-0x9 input buffer containing a [[#WpsPin]] and two input u32s '''WpsMethod''' and '''BeaconLostTimeout'''. No output.
 +
 
 +
Sends command messages 0xA (SetWlanInterfaceUpDown), 0x11 (SetBeaconLostTimeout) and 0x21 (JoinNetworkStaWithWps) to the state machine.
 +
 
 +
This is not used on retail.
   −
This copies data from state to the output struct.
+
== Cmd18 ==
 +
No input, returns an output u32.
   −
{| class="wikitable" border="1"
+
Sends command message 0x80 (GetState) to the state machine, to check current state. Sends command message 0x36 to the state machine to get a value from state, which is then passed to a vfunc call. That func checks bits in the input to determine what value to return, which is then written to the output u32.
|-
+
 
! Offset || Size || Description
+
This is not used on retail.
|-
  −
| 0x0 || 0x4 ||
  −
|-
  −
| 0x4 || 0x4 ||
  −
|-
  −
| 0x8 || 0x2 || Channel
  −
|-
  −
| 0xA || 0x6 || AccessPoint MAC address
  −
|-
  −
| 0x10 || 0x22 || u8 SSID_len, then the SSID data.
  −
|-
  −
| 0x32 || 0x2 ||
  −
|-
  −
| 0x34 || 0x2 ||
  −
|-
  −
| 0x36 || 0x2 ||
  −
|-
  −
| 0x38 || 0x2 ||
  −
|}
      
== Cmd19 ==
 
== Cmd19 ==
Takes a total of 0x18-bytes of input, no output.
+
Takes an input [[#MacAddress]], three input u16s '''SrcPort''', '''DstPort''' and '''Unk0''', and three input u32s '''SrcIp''', '''DstIp''' and '''Unk1'''. No output.
   −
This copies the input data into state, and sets a flag in state.
+
This copies the input data into state, and sets a flag in state. The input is written into state with the following structure: [[#MacAddress]], '''SrcIp''', '''DstIp''', '''SrcPort''', '''DstPort''', '''Unk1''', '''Unk0'''.
   −
This data is used during RequestSleep if a state field is set for using it (the codepath using this will throw an error if this data was not set). This data is cleared afterwards regardless of whether it was used. This is used for configuring various config related to wowl/tcpka/etc (wake-on-WLAN/TCP keep-alive). Note that an error is thrown if "wowl_activate" isn't set but sysmodule-side doesn't do so (unless wifi-controller sets it automatically?).
+
This data is used during RequestSleep if a state field is set for using it (the codepath using this will throw an error if this data was not set). This data is cleared afterwards unless sleep was successfully entered with wowl. This is also cleared during RequestWakeUp. This is used for configuring various config related to wowl/tcpka/etc (wake-on-WLAN/TCP keep-alive). Note that an error is thrown if "wowl_activate" isn't set but sysmodule-side doesn't do so - this seems to be set automatically at some point.
    
This is used by [[Network_Interface_services|nifm]].
 
This is used by [[Network_Interface_services|nifm]].
 +
 +
== Cmd20 ==
 +
No input/output.
 +
 +
This clears the state set by [[#Cmd19]].
 +
 +
This is not used on retail.
 +
 +
== Cmd21 ==
 +
No input, returns an output u32.
 +
 +
Same as [[#Cmd18]] except the value from the request is returned directly, without calling the vfunc.
 +
 +
This is not used on retail.
 +
 +
== Cmd22 ==
 +
Takes an input u32, no output.
 +
 +
Same as [[#Cmd21]] except this uses message 0x37 with the input u32. This is handled by writing the u32 into a global field (default value is 0xBC), which is used during configuration for [[#Cmd19|"wowl"]].
 +
 +
This is not used on retail.
 +
 +
== Cmd23 ==
 +
Takes an input u32, no output.
 +
 +
Sends command message 0x38 to the state machine. This is handled by writing the input value into a global flags field. The default value is 0x3 (all flag bits set). These flag bits are checked during the RequestSleep code handling the state for [[#Cmd19]].
 +
 +
This is not used on retail.
 +
 +
== Cmd24 ==
 +
No input, returns a [[#WakeUpStats]] and a [[#SleepStats]].
 +
 +
Sends command message 0x39 to the state machine, with 0x20-bytes from the output being copied to the first output struct. Sends command message 0x3A to the state machine, with 0x38-bytes from the output being copied to the second output struct.
 +
 +
These requests get data from state.
 +
 +
This is not used on retail.
 +
 +
== Cmd25 ==
 +
Takes two input bools, no output.
 +
 +
When the first bool flag is set, sends command message 0x3B to the state machine. When the second bool flag is set, sends command message 0x3C to the state machine. Then 0 is returned.
 +
 +
Both requests are handled by clearing various data in state. The first request clears the first state struct returned by [[#Cmd24]], likewise with the second request and the second state struct from [[#Cmd24]].
 +
 +
This is not used on retail.
    
== Cmd26 ==
 
== Cmd26 ==
Line 133: Line 305:  
This sends a request which sets a global flag.
 
This sends a request which sets a global flag.
   −
This flag is eventually checked by code which runs via RequestSleep, and in one case with wlan:dtc cmd19 (also used by requests done by nnMain).
+
This flag is eventually checked by code which runs via RequestSleep, and in one case with wlan:dtc cmd19 (also used by requests done by nnMain/RequestWakeUp).
 +
 
 +
This is not used on retail.
    
== Cmd27 ==
 
== Cmd27 ==
Line 140: Line 314:  
This memcpys data from state into the output buffer, clamped to a maximum of 0x40 entries (nifm hard-codes the count to 0x26).
 
This memcpys data from state into the output buffer, clamped to a maximum of 0x40 entries (nifm hard-codes the count to 0x26).
   −
== Cmd30 ==
+
This is used by [[Network_Interface_services|nifm]].
Takes an input s32, no output.
+
 
 +
== InitializeWlan ==
 +
No input/output.
 +
 
 +
Sends command message 0x1 (InitalizeWlanDriver) to the state machine.
 +
 
 +
This is not used on retail.
 +
 
 +
== FinalizeWlan ==
 +
No input/output.
 +
 
 +
Sends command message 0x2 (FinalizeWlanDriver) to the state machine.
 +
 
 +
This is not used on retail.
   −
The input s32 must be <=0xE10 (3600) and >= -1. The input value is written into state, then this returns 0.
+
== SetWowlDelayedWakeTime ==
 +
Unofficial name.
 +
 
 +
Takes an input s32 '''WowlDelayedWakeTime'''. No output.
 +
 
 +
'''WowlDelayedWakeTime''' must be <=0xE10 (3600) and >= -1. This value is written into state (last field in the state struct also used by [[#Cmd19]], which [[#Cmd19]] doesn't write), then this returns 0.
    
The user-process code using this cmd also has the above bounds check.
 
The user-process code using this cmd also has the above bounds check.
 +
 +
This is used by wlan during RequestSleep from the same code using the state set by [[#Cmd19]].
    
This cmd is used by [[Network_Interface_services|nifm]] with a value from state, prior to using RequestSleep.
 
This cmd is used by [[Network_Interface_services|nifm]] with a value from state, prior to using RequestSleep.
   −
== Cmd38 ==
+
If wificore gets to the point of actually using this for TCP-keep-alive, then it does the following:
Takes an input u32 enum, no output.
+
* This is only used when the [[#Cmd19|TCP]] connection is RST.
 +
** '''WowlDelayedWakeTime''' is the time in seconds to schedule a timer which will wake the system. 0 will schedule it for immediately.
 +
** -1 will skip scheduling that timer, hence waking the system is disabled when RST is received.
 +
** The wificore also supports -3 for immediately waking the system from the frame-handler, however wlan-sysmodule doesn't allow that.
 +
* Frames where the TCP flags do not match ACK will immediately wake the system, + other wake cause(s).
 +
 
 +
== Cmd31 ==
 +
No input/output.
 +
 
 +
Stubbed, just returns an error.
 +
 
 +
This is not used on retail.
 +
 
 +
== Cmd32 ==
 +
No input/output.
 +
 
 +
Stubbed, just returns an error.
 +
 
 +
This is not used on retail.
 +
 
 +
== Cmd33 ==
 +
Takes an input [[#MacAddress]] and a type-0x5 input buffer, no output.
 +
 
 +
Stubbed, just returns an error.
 +
 
 +
This is not used on retail.
 +
 
 +
== Cmd34 ==
 +
Takes a type-0x6 output buffer and returns a total of 0x10-bytes.
 +
 
 +
Stubbed, just returns an error.
 +
 
 +
This is not used on retail.
 +
 
 +
== Cmd35 ==
 +
No input/output.
 +
 
 +
Stubbed, just returns an error.
 +
 
 +
This is not used on retail.
 +
 
 +
== Cmd36 ==
 +
Takes two input u64s, no output.
 +
 
 +
Stubbed, just returns an error.
 +
 
 +
This is not used on retail.
 +
 
 +
== Cmd37 ==
 +
Takes an input u32, no output.
   −
The input value must be 0-1.
+
Stubbed, just returns an error.
   −
This internally sends a request which is then eventually handled (if the input doesn't match state already + other state fields are valid) by configuring "pm2_sleep_ret_ext" with a global struct selected via the input value. Afterwards another func is called with input value 2.
+
This is not used on retail.
 +
 
 +
== SetDfrts ==
 +
Unofficial name.
 +
 
 +
Takes an input u32 '''Mode'''. No output.
 +
 
 +
'''Mode''' must be 0 or 1.
 +
 
 +
Sends command message 0x32 to the state machine.
 +
 
 +
The state machine then handles this by issuing the WLC_SET_VAR ioctl for the "pm2_sleep_ret_ext" variable. '''Mode''' is used to select between 2 sets of hardcoded parameters as follows:
 +
  struct wl_pm2_sleep_ret_ext {
 +
    u8 logic;
 +
    u8 PAD;
 +
    u16 low_ms;
 +
    u16 high_ms;
 +
    u16 rx_pkts_threshold;
 +
    u16 tx_pkts_threshold;
 +
    u16 txrx_pkts_threshold;
 +
    u32 rx_bytes_threshold;
 +
    u32 tx_bytes_threshold;
 +
    u32 txrx_bytes_threshold;
 +
  };
 +
 
 +
  wl_pm2_sleep_ret_ext args = {0};
 +
 
 +
  if (mode == 0) {
 +
    args.logic = 2;
 +
    args.low_ms = 2000;
 +
    args.high_ms = 5000;
 +
    args.rx_pkts_threshold = 10;
 +
  } else if (mode == 1) {
 +
    args.logic = 2;
 +
    args.low_ms = 200;
 +
    args.high_ms = 800;
 +
    args.rx_pkts_threshold = 10;
 +
  }
 +
Afterwards, the WLC_SET_PM ioctl is issued with the argument value 2 (PM2).
 +
 
 +
This is used by [[Network_Interface_services|nifm]].
    
= wlan:lcl =
 
= wlan:lcl =
Line 347: Line 630:  
| 11 || EnableSharedMemory
 
| 11 || EnableSharedMemory
 
|-
 
|-
| 12 || [6.0.0+]
+
| 12 || [6.0.0+] [[#SetMulticastList]]
 
|}
 
|}
 +
 +
== SetMulticastList ==
 +
Unofficial name.
 +
 +
Takes an input [[#MulticastList]]. No output.
    
= wlan:dtc =
 
= wlan:dtc =
Line 418: Line 706:  
[7.0.0+] Cmd14 now takes an input u8.
 
[7.0.0+] Cmd14 now takes an input u8.
   −
= Notes =
+
= Ssid =
 +
This is "nn::wlan::Ssid". This is a 0x22-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x1 || Length
 +
|-
 +
| 0x1 || 0x20 || Ssid
 +
|-
 +
| 0x21 || 0x1 || Reserved
 +
|}
 +
 
 +
= MacAddress =
 +
This is a 0x6-byte struct with 1-byte alignment.
 +
 
 +
= ConnectParam =
 +
This is a 0x80-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x22 || [[#Ssid|Ssid]]
 +
|-
 +
| 0x22 || 0x6 || [[#MacAddress|Bssid]]
 +
|-
 +
| 0x28 || 0x1 ||
 +
|-
 +
| 0x29 || 0x1 || Reserved
 +
|-
 +
| 0x2A || 0x2 || Channel
 +
|-
 +
| 0x2C || 0x4 || PrivacyMode
 +
|-
 +
| 0x30 || 0x4 || GroupPrivacyMode
 +
|-
 +
| 0x34 || 0x4 || KeyIdx
 +
|-
 +
| 0x38 || 0x40 || SecurityKey
 +
|-
 +
| 0x78 || 0x4 || Reserved
 +
|-
 +
| 0x7C || 0x4 || BeaconLostTimeout
 +
|}
 +
 
 +
= ConnectionStatus =
 +
This is a 0x3C-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x4 || [[#ConnectionState|ConnectionState]]
 +
|-
 +
| 0x4 || 0x4 ||
 +
|-
 +
| 0x8 || 0x2 || Channel
 +
|-
 +
| 0xA || 0x6 || [[#MacAddress|Bssid]]
 +
|-
 +
| 0x10 || 0x22 || [[#Ssid|Ssid]]
 +
|-
 +
| 0x32 || 0x2 ||
 +
|-
 +
| 0x34 || 0x2 ||
 +
|-
 +
| 0x36 || 0x2 ||
 +
|-
 +
| 0x38 || 0x2 ||
 +
|-
 +
| 0x3A || 0x2 || Reserved
 +
|}
 +
 
 +
= ScanRequest =
 +
This is a 0x1B8-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x4 || ScanType
 +
|-
 +
| 0x4 || 0x2 * 38 ||
 +
|-
 +
| 0x50 || 0x1 ||
 +
|-
 +
| 0x51 || 0x3 || Reserved
 +
|-
 +
| 0x54 || 0x4 || ChannelScanTime
 +
|-
 +
| 0x58 || 0x4 || HomeChannelTime
 +
|-
 +
| 0x5C || 0x22 * 10 || Array of [[#Ssid|Ssid]]
 +
|-
 +
| 0x1B0 || 0x1 || SsidCount
 +
|-
 +
| 0x1B1 || 0x6 || [[#MacAddress|Bssid]]
 +
|-
 +
| 0x1B7 || 0x1 || Reserved
 +
|}
 +
 
 +
= ScanResult =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x4 || ScanBufferCapacity
 +
|-
 +
| 0x4 || 0x4 || BssInfoSize
 +
|-
 +
| 0x8 || 0x4 || BssInfoCount
 +
|-
 +
| 0xC || Variable || Array of [[#BssInfo]]
 +
|}
 +
 
 +
= BssInfo =
 +
This is a 0x58-byte struct.
 +
 
 +
= ConnectionState =
 +
This is "nn::wlan::ConnectionState".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 0 || None
 +
|-
 +
| 1 || Idle
 +
|-
 +
| 2 || Connected
 +
|-
 +
| 3 || Scanning
 +
|-
 +
| 4 || Connecting
 +
|-
 +
| 5 || CancelingScan
 +
|-
 +
| 6 || Disconnecting
 +
|}
 +
 
 +
= State =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 0 ||
 +
|-
 +
| 1 ||
 +
|-
 +
| 2 ||
 +
|-
 +
| 3 ||
 +
|-
 +
| 4 ||
 +
|-
 +
| 5 ||
 +
|-
 +
| 6 ||
 +
|-
 +
| 7 ||
 +
|-
 +
| 8 ||
 +
|-
 +
| 9 ||
 +
|-
 +
| 10 ||
 +
|-
 +
| 11 ||
 +
|-
 +
| 12 ||
 +
|-
 +
| 13 ||
 +
|-
 +
| 14 ||
 +
|-
 +
| 15 ||
 +
|-
 +
| 16 ||
 +
|-
 +
| 17 ||
 +
|-
 +
| 18 ||
 +
|-
 +
| 19 ||
 +
|}
 +
 
 +
= WpsPin =
 +
This is a 0x8-byte string.
 +
 
 +
= MulticastList =
 +
This is a 0x31-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x1 || Count
 +
|-
 +
| 0x1 || 0x30 || Array of [[#MacAddress]]
 +
|}
 +
 
 +
= WakeUpStats =
 +
This is a 0x20-byte struct.
 +
 
 +
This is updated during RequestWakeUp. The fields starting with offset +0x4 are updated when handling [[#Cmd19|wowl]], which counter is updated depends on the value of iovar "tcpka_wake_cause".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x4 || Number of normal non-wowl wakeups. Also incremented during wowl handling if the output from the func using "tcpka_wake_cause" is 0.
 +
|-
 +
| 0x4 || 0x4 ||
 +
|-
 +
| 0x8 || 0x4 ||
 +
|-
 +
| 0xC || 0x4 ||
 +
|-
 +
| 0x10 || 0x4 ||
 +
|-
 +
| 0x14 || 0x4 ||
 +
|-
 +
| 0x18 || 0x4 ||
 +
|-
 +
| 0x1C || 0x4 || Number of wowl wakeups where the cause is unrecognized.
 +
|}
 +
 
 +
= SleepStats =
 +
This is a 0x38-byte struct.
 +
 
 +
During RequestWakeUp when handling [[#Cmd19|wowl]], this data in state is updated by adding each field with the corresponding field from iovar "sleep_stats_get".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x4 ||
 +
|-
 +
| 0x4 || 0x4 ||
 +
|-
 +
| 0x8 || 0x4 ||
 +
|-
 +
| 0xC || 0x4 ||
 +
|-
 +
| 0x10 || 0x4 ||
 +
|-
 +
| 0x14 || 0x4 ||
 +
|-
 +
| 0x18 || 0x4 ||
 +
|-
 +
| 0x1C || 0x4 ||
 +
|-
 +
| 0x20 || 0x4 ||
 +
|-
 +
| 0x24 || 0x4 ||
 +
|-
 +
| 0x28 || 0x4 ||
 +
|-
 +
| 0x2C || 0x4 ||
 +
|-
 +
| 0x30 || 0x4 ||
 +
|-
 +
| 0x34 || 0x4 ||
 +
|}
 +
 
 +
= FwVersion =
 +
This is a 0x100-byte string.
   −
== Versions ==
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! System Version
 
! System Version
! Firmware string
+
! Firmware String
 
|-
 
|-
 
| [1.0.0] || 4356a3-roml/pcie-ag-msgbuf-splitrx-pktctx-keepalive-sr-proptxstatus-ampduhostreorder-dlystat-rxdesens-ntdds3-btcdyn-trfmgmt-pspretend-btafh-pktfilter-wowlpf-aoe Version: 7.35.252.58 CRC: f592f3bf Date: Tue 2016-10-04 23:54:54 PDT Ucode Ver: 1020.221 FWID: 01-5ec2fbfd
 
| [1.0.0] || 4356a3-roml/pcie-ag-msgbuf-splitrx-pktctx-keepalive-sr-proptxstatus-ampduhostreorder-dlystat-rxdesens-ntdds3-btcdyn-trfmgmt-pspretend-btafh-pktfilter-wowlpf-aoe Version: 7.35.252.58 CRC: f592f3bf Date: Tue 2016-10-04 23:54:54 PDT Ucode Ver: 1020.221 FWID: 01-5ec2fbfd
Line 457: Line 1,030:  
* [6.0.0+] Besides the version update, added "clm_4356a3_ntd" to the string.
 
* [6.0.0+] Besides the version update, added "clm_4356a3_ntd" to the string.
 
* [7.0.0+] Besides the version update, added "noclminc" to the string.
 
* [7.0.0+] Besides the version update, added "noclminc" to the string.
 +
 +
= Notes =
 +
Originally wlan-sysmodule had a func called from nnMain which (among other things) handled configuring [[Bus_services|GPIO]] WifiReset (uses commands SetDirection and SetValue with input value 1), when not disabled by a system-setting. This GPIO functionality was removed from wlan with [7.0.0+], it was redundant since [[PCIe_services|pcie]] already had code handling that GPIO as well.
    
[[Category:Services]]
 
[[Category:Services]]

Navigation menu