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.
+
'''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]].
This is used by [[Network_Interface_services|nifm]].