Lines Matching refs:cmd

61 	struct iwl_powertable_cmd cmd;  member
160 struct iwl_powertable_cmd *cmd, in iwl_static_sleep_cmd() argument
184 memset(cmd, 0, sizeof(*cmd)); in iwl_static_sleep_cmd()
186 *cmd = table[lvl].cmd; in iwl_static_sleep_cmd()
197 max_sleep[i] = le32_to_cpu(cmd->sleep_interval[i]); in iwl_static_sleep_cmd()
201 slp_itrvl = le32_to_cpu(cmd->sleep_interval[IWL_POWER_VEC_SIZE - 1]); in iwl_static_sleep_cmd()
204 cmd->sleep_interval[IWL_POWER_VEC_SIZE - 1] = in iwl_static_sleep_cmd()
207 slp_itrvl = le32_to_cpu(cmd->sleep_interval[IWL_POWER_VEC_SIZE - 1]); in iwl_static_sleep_cmd()
209 cmd->sleep_interval[IWL_POWER_VEC_SIZE - 1] = in iwl_static_sleep_cmd()
213 cmd->flags |= IWL_POWER_SLEEP_OVER_DTIM_MSK; in iwl_static_sleep_cmd()
215 cmd->flags &= ~IWL_POWER_SLEEP_OVER_DTIM_MSK; in iwl_static_sleep_cmd()
218 cmd->flags |= IWL_POWER_SHADOW_REG_ENA; in iwl_static_sleep_cmd()
220 cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA; in iwl_static_sleep_cmd()
224 cmd->flags |= IWL_POWER_BT_SCO_ENA; in iwl_static_sleep_cmd()
226 cmd->flags &= ~IWL_POWER_BT_SCO_ENA; in iwl_static_sleep_cmd()
230 slp_itrvl = le32_to_cpu(cmd->sleep_interval[IWL_POWER_VEC_SIZE - 1]); in iwl_static_sleep_cmd()
232 cmd->sleep_interval[IWL_POWER_VEC_SIZE - 1] = in iwl_static_sleep_cmd()
237 if (le32_to_cpu(cmd->sleep_interval[i]) > in iwl_static_sleep_cmd()
239 cmd->sleep_interval[i] = in iwl_static_sleep_cmd()
242 if (le32_to_cpu(cmd->sleep_interval[i]) > in iwl_static_sleep_cmd()
243 le32_to_cpu(cmd->sleep_interval[i+1])) in iwl_static_sleep_cmd()
244 cmd->sleep_interval[i] = in iwl_static_sleep_cmd()
245 cmd->sleep_interval[i+1]; in iwl_static_sleep_cmd()
250 cmd->flags |= IWL_POWER_PCI_PM_MSK; in iwl_static_sleep_cmd()
252 cmd->flags &= ~IWL_POWER_PCI_PM_MSK; in iwl_static_sleep_cmd()
262 struct iwl_powertable_cmd *cmd) in iwl_power_sleep_cam_cmd() argument
264 memset(cmd, 0, sizeof(*cmd)); in iwl_power_sleep_cam_cmd()
267 cmd->flags |= IWL_POWER_PCI_PM_MSK; in iwl_power_sleep_cam_cmd()
272 static int iwl_set_power(struct iwl_priv *priv, struct iwl_powertable_cmd *cmd) in iwl_set_power() argument
275 IWL_DEBUG_POWER(priv, "Flags value = 0x%08X\n", cmd->flags); in iwl_set_power()
276 IWL_DEBUG_POWER(priv, "Tx timeout = %u\n", le32_to_cpu(cmd->tx_data_timeout)); in iwl_set_power()
277 IWL_DEBUG_POWER(priv, "Rx timeout = %u\n", le32_to_cpu(cmd->rx_data_timeout)); in iwl_set_power()
279 le32_to_cpu(cmd->sleep_interval[0]), in iwl_set_power()
280 le32_to_cpu(cmd->sleep_interval[1]), in iwl_set_power()
281 le32_to_cpu(cmd->sleep_interval[2]), in iwl_set_power()
282 le32_to_cpu(cmd->sleep_interval[3]), in iwl_set_power()
283 le32_to_cpu(cmd->sleep_interval[4])); in iwl_set_power()
286 sizeof(struct iwl_powertable_cmd), cmd); in iwl_set_power()
290 struct iwl_powertable_cmd *cmd) in iwl_power_build_cmd() argument
296 iwl_power_sleep_cam_cmd(priv, cmd); in iwl_power_build_cmd()
303 iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, dtimper); in iwl_power_build_cmd()
306 iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20); in iwl_power_build_cmd()
309 iwl_static_sleep_cmd(priv, cmd, in iwl_power_build_cmd()
312 iwl_power_sleep_cam_cmd(priv, cmd); in iwl_power_build_cmd()
314 iwl_static_sleep_cmd(priv, cmd, in iwl_power_build_cmd()
322 iwl_static_sleep_cmd(priv, cmd, in iwl_power_build_cmd()
325 iwl_static_sleep_cmd(priv, cmd, in iwl_power_build_cmd()
330 int iwl_power_set_mode(struct iwl_priv *priv, struct iwl_powertable_cmd *cmd, in iwl_power_set_mode() argument
342 if (!memcmp(&priv->power_data.sleep_cmd, cmd, sizeof(*cmd)) && !force) in iwl_power_set_mode()
349 memcpy(&priv->power_data.sleep_cmd_next, cmd, sizeof(*cmd)); in iwl_power_set_mode()
355 if (cmd->flags & IWL_POWER_DRIVER_ALLOW_SLEEP_MSK) in iwl_power_set_mode()
358 ret = iwl_set_power(priv, cmd); in iwl_power_set_mode()
360 if (!(cmd->flags & IWL_POWER_DRIVER_ALLOW_SLEEP_MSK)) in iwl_power_set_mode()
371 memcpy(&priv->power_data.sleep_cmd, cmd, sizeof(*cmd)); in iwl_power_set_mode()
380 struct iwl_powertable_cmd cmd; in iwl_power_update_mode() local
382 iwl_power_build_cmd(priv, &cmd); in iwl_power_update_mode()
383 return iwl_power_set_mode(priv, &cmd, force); in iwl_power_update_mode()