Line 50:
Line 50:
|-
|-
| 0x1009
| 0x1009
−
| ?
+
| 1
−
| ?
+
| 0
| send frame?
| send frame?
|-
|-
Line 102:
Line 102:
char params_buffer[0x4E]; // haven't figured out what is in.
char params_buffer[0x4E]; // haven't figured out what is in.
};
};
+
</source>
+
+
<source lang="c">
+
typedef struct _wd_scanparam
+
{
+
u16 channelBitmap;
+
u16 maxChannelTime;
+
u16 unk4;
+
u16 unk6;
+
u16 unk8;
+
u16 scanType;//only 0/1 permitted.
+
u16 ssidLength;
+
char ssid[32];//?
+
u8 unk[32];
+
} wd_scanparam;
</source>
</source>
s32 WD_SetConfig(wd_config *config, u32 flags1, u32 flags0);
s32 WD_SetConfig(wd_config *config, u32 flags1, u32 flags0);
flags0 | flags1 must be non-zero. Each bit in the flags corresponds to a field or struct in config. The associated bits and fields/structs are listed in the below wd_config struct. If clear, nothing is done for that field/struct, otherwise the field/struct may be verified; not all are verified. All bits and their associated fields/structs are verified,(if they have verification code) before updating the internal configuration.
flags0 | flags1 must be non-zero. Each bit in the flags corresponds to a field or struct in config. The associated bits and fields/structs are listed in the below wd_config struct. If clear, nothing is done for that field/struct, otherwise the field/struct may be verified; not all are verified. All bits and their associated fields/structs are verified,(if they have verification code) before updating the internal configuration.
−
WD_GetConfig is similar to WD_SetConfig, except the configuaration from the internal config is copied to the input wd_config structure based on the flags.
+
WD_GetConfig is similar to WD_SetConfig, except the configuration from the internal config is copied to the input wd_config structure based on the flags.
−
WD_GetState always returns a value less than 7 and greater than 1. WD_GetState should always return state 3, any other states are illegal states. Frames can't be sent in illegal states.
+
WD_GetState always returns a value less than 7 and greater than 1. WD_GetState should always return state 3, any other states are illegal states. Frames can't be sent with ioctl 0x1009 in illegal states.
WD_GetStatus returns 0 or 1, depending on different flags for each state. For state 3, this returns 0 when wireless is disabled, 1 when enabled.
WD_GetStatus returns 0 or 1, depending on different flags for each state. For state 3, this returns 0 when wireless is disabled, 1 when enabled.
+
Ioctl 0x1009 input is a buffer/len pair.
Configuration and info structs:
Configuration and info structs: