Lines Matching refs:cmd

23 				   struct iwl_beacon_filter_cmd *cmd)  in iwl_mvm_beacon_filter_send_cmd()  argument
28 le32_to_cpu(cmd->ba_enable_beacon_abort)); in iwl_mvm_beacon_filter_send_cmd()
30 le32_to_cpu(cmd->ba_escape_timer)); in iwl_mvm_beacon_filter_send_cmd()
32 le32_to_cpu(cmd->bf_debug_flag)); in iwl_mvm_beacon_filter_send_cmd()
34 le32_to_cpu(cmd->bf_enable_beacon_filter)); in iwl_mvm_beacon_filter_send_cmd()
36 le32_to_cpu(cmd->bf_energy_delta)); in iwl_mvm_beacon_filter_send_cmd()
38 le32_to_cpu(cmd->bf_escape_timer)); in iwl_mvm_beacon_filter_send_cmd()
40 le32_to_cpu(cmd->bf_roaming_energy_delta)); in iwl_mvm_beacon_filter_send_cmd()
42 le32_to_cpu(cmd->bf_roaming_state)); in iwl_mvm_beacon_filter_send_cmd()
44 le32_to_cpu(cmd->bf_temp_threshold)); in iwl_mvm_beacon_filter_send_cmd()
46 le32_to_cpu(cmd->bf_temp_fast_filter)); in iwl_mvm_beacon_filter_send_cmd()
48 le32_to_cpu(cmd->bf_temp_slow_filter)); in iwl_mvm_beacon_filter_send_cmd()
50 le32_to_cpu(cmd->bf_threshold_absolute_low[0]), in iwl_mvm_beacon_filter_send_cmd()
51 le32_to_cpu(cmd->bf_threshold_absolute_low[1])); in iwl_mvm_beacon_filter_send_cmd()
54 le32_to_cpu(cmd->bf_threshold_absolute_high[0]), in iwl_mvm_beacon_filter_send_cmd()
55 le32_to_cpu(cmd->bf_threshold_absolute_high[1])); in iwl_mvm_beacon_filter_send_cmd()
65 len, cmd); in iwl_mvm_beacon_filter_send_cmd()
71 struct iwl_beacon_filter_cmd *cmd) in iwl_mvm_beacon_filter_set_cqm_params() argument
76 cmd->bf_energy_delta = in iwl_mvm_beacon_filter_set_cqm_params()
79 cmd->bf_roaming_state = in iwl_mvm_beacon_filter_set_cqm_params()
82 cmd->ba_enable_beacon_abort = cpu_to_le32(mvmvif->ba_enabled); in iwl_mvm_beacon_filter_set_cqm_params()
86 struct iwl_mac_power_cmd *cmd) in iwl_mvm_power_log() argument
90 cmd->id_and_color, iwlmvm_mod_params.power_scheme, in iwl_mvm_power_log()
91 le16_to_cpu(cmd->flags)); in iwl_mvm_power_log()
93 le16_to_cpu(cmd->keep_alive_seconds)); in iwl_mvm_power_log()
95 if (!(cmd->flags & cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK))) { in iwl_mvm_power_log()
101 le32_to_cpu(cmd->rx_data_timeout)); in iwl_mvm_power_log()
103 le32_to_cpu(cmd->tx_data_timeout)); in iwl_mvm_power_log()
104 if (cmd->flags & cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK)) in iwl_mvm_power_log()
106 cmd->skip_dtim_periods); in iwl_mvm_power_log()
107 if (cmd->flags & cpu_to_le16(POWER_FLAGS_LPRX_ENA_MSK)) in iwl_mvm_power_log()
109 cmd->lprx_rssi_threshold); in iwl_mvm_power_log()
110 if (cmd->flags & cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK)) { in iwl_mvm_power_log()
113 le32_to_cpu(cmd->rx_data_timeout_uapsd)); in iwl_mvm_power_log()
115 le32_to_cpu(cmd->tx_data_timeout_uapsd)); in iwl_mvm_power_log()
116 IWL_DEBUG_POWER(mvm, "QNDP TID = %d\n", cmd->qndp_tid); in iwl_mvm_power_log()
117 IWL_DEBUG_POWER(mvm, "ACs flags = 0x%x\n", cmd->uapsd_ac_flags); in iwl_mvm_power_log()
118 IWL_DEBUG_POWER(mvm, "Max SP = %d\n", cmd->uapsd_max_sp); in iwl_mvm_power_log()
124 struct iwl_mac_power_cmd *cmd) in iwl_mvm_power_configure_uapsd() argument
131 cmd->flags & cpu_to_le16(POWER_FLAGS_SNOOZE_ENA_MSK)) { in iwl_mvm_power_configure_uapsd()
132 cmd->rx_data_timeout_uapsd = in iwl_mvm_power_configure_uapsd()
134 cmd->tx_data_timeout_uapsd = in iwl_mvm_power_configure_uapsd()
137 cmd->rx_data_timeout_uapsd = in iwl_mvm_power_configure_uapsd()
139 cmd->tx_data_timeout_uapsd = in iwl_mvm_power_configure_uapsd()
146 cmd->flags |= cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK); in iwl_mvm_power_configure_uapsd()
156 cmd->flags |= in iwl_mvm_power_configure_uapsd()
159 cmd->uapsd_ac_flags |= BIT(ac); in iwl_mvm_power_configure_uapsd()
166 cmd->qndp_tid = 6; in iwl_mvm_power_configure_uapsd()
169 cmd->qndp_tid = 5; in iwl_mvm_power_configure_uapsd()
172 cmd->qndp_tid = 0; in iwl_mvm_power_configure_uapsd()
175 cmd->qndp_tid = 1; in iwl_mvm_power_configure_uapsd()
181 cmd->flags |= cpu_to_le16(POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK); in iwl_mvm_power_configure_uapsd()
183 if (cmd->uapsd_ac_flags == (BIT(IEEE80211_AC_VO) | in iwl_mvm_power_configure_uapsd()
187 cmd->flags |= cpu_to_le16(POWER_FLAGS_SNOOZE_ENA_MSK); in iwl_mvm_power_configure_uapsd()
188 cmd->snooze_interval = cpu_to_le16(IWL_MVM_PS_SNOOZE_INTERVAL); in iwl_mvm_power_configure_uapsd()
189 cmd->snooze_window = in iwl_mvm_power_configure_uapsd()
195 cmd->uapsd_max_sp = mvm->hw->uapsd_max_sp_len; in iwl_mvm_power_configure_uapsd()
197 if (cmd->flags & cpu_to_le16(POWER_FLAGS_SNOOZE_ENA_MSK)) { in iwl_mvm_power_configure_uapsd()
198 cmd->heavy_tx_thld_packets = in iwl_mvm_power_configure_uapsd()
200 cmd->heavy_rx_thld_packets = in iwl_mvm_power_configure_uapsd()
203 cmd->heavy_tx_thld_packets = in iwl_mvm_power_configure_uapsd()
205 cmd->heavy_rx_thld_packets = in iwl_mvm_power_configure_uapsd()
208 cmd->heavy_tx_thld_percentage = in iwl_mvm_power_configure_uapsd()
210 cmd->heavy_rx_thld_percentage = in iwl_mvm_power_configure_uapsd()
300 struct iwl_mac_power_cmd *cmd) in iwl_mvm_power_config_skip_dtim() argument
307 cmd->skip_dtim_periods = 0; in iwl_mvm_power_config_skip_dtim()
308 cmd->flags &= ~cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK); in iwl_mvm_power_config_skip_dtim()
313 cmd->skip_dtim_periods = 2; in iwl_mvm_power_config_skip_dtim()
314 cmd->flags |= cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK); in iwl_mvm_power_config_skip_dtim()
342 cmd->skip_dtim_periods = min_link_skip; in iwl_mvm_power_config_skip_dtim()
343 cmd->flags |= cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK); in iwl_mvm_power_config_skip_dtim()
348 struct iwl_mac_power_cmd *cmd) in iwl_mvm_power_build_cmd() argument
355 cmd->id_and_color = cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id, in iwl_mvm_power_build_cmd()
369 cmd->keep_alive_seconds = cpu_to_le16(keep_alive); in iwl_mvm_power_build_cmd()
374 cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_SAVE_ENA_MSK); in iwl_mvm_power_build_cmd()
385 cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK); in iwl_mvm_power_build_cmd()
390 cmd->flags |= cpu_to_le16(POWER_FLAGS_LPRX_ENA_MSK); in iwl_mvm_power_build_cmd()
391 cmd->lprx_rssi_threshold = POWER_LPRX_RSSI_THRESHOLD; in iwl_mvm_power_build_cmd()
394 iwl_mvm_power_config_skip_dtim(mvm, vif, cmd); in iwl_mvm_power_build_cmd()
397 cmd->rx_data_timeout = in iwl_mvm_power_build_cmd()
399 cmd->tx_data_timeout = in iwl_mvm_power_build_cmd()
404 cmd->tx_data_timeout = in iwl_mvm_power_build_cmd()
406 cmd->rx_data_timeout = in iwl_mvm_power_build_cmd()
409 cmd->rx_data_timeout = in iwl_mvm_power_build_cmd()
411 cmd->tx_data_timeout = in iwl_mvm_power_build_cmd()
416 iwl_mvm_power_configure_uapsd(mvm, vif, cmd); in iwl_mvm_power_build_cmd()
420 cmd->keep_alive_seconds = in iwl_mvm_power_build_cmd()
424 cmd->flags |= in iwl_mvm_power_build_cmd()
427 cmd->flags &= in iwl_mvm_power_build_cmd()
431 cmd->rx_data_timeout = in iwl_mvm_power_build_cmd()
434 cmd->tx_data_timeout = in iwl_mvm_power_build_cmd()
437 cmd->skip_dtim_periods = mvmvif->dbgfs_pm.skip_dtim_periods; in iwl_mvm_power_build_cmd()
440 cmd->flags |= cpu_to_le16(POWER_FLAGS_LPRX_ENA_MSK); in iwl_mvm_power_build_cmd()
442 cmd->flags &= cpu_to_le16(~POWER_FLAGS_LPRX_ENA_MSK); in iwl_mvm_power_build_cmd()
445 cmd->lprx_rssi_threshold = mvmvif->dbgfs_pm.lprx_rssi_threshold; in iwl_mvm_power_build_cmd()
448 cmd->flags |= in iwl_mvm_power_build_cmd()
451 cmd->flags &= in iwl_mvm_power_build_cmd()
457 cmd->flags |= cpu_to_le16(flag); in iwl_mvm_power_build_cmd()
459 cmd->flags &= cpu_to_le16(flag); in iwl_mvm_power_build_cmd()
467 struct iwl_mac_power_cmd cmd = {}; in iwl_mvm_power_send_cmd() local
469 iwl_mvm_power_build_cmd(mvm, vif, &cmd); in iwl_mvm_power_send_cmd()
470 iwl_mvm_power_log(mvm, &cmd); in iwl_mvm_power_send_cmd()
472 memcpy(&iwl_mvm_vif_from_mac80211(vif)->mac_pwr_cmd, &cmd, sizeof(cmd)); in iwl_mvm_power_send_cmd()
476 sizeof(cmd), &cmd); in iwl_mvm_power_send_cmd()
481 struct iwl_device_power_cmd cmd = { in iwl_mvm_power_update_device() local
489 cmd.flags |= cpu_to_le16(DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK); in iwl_mvm_power_update_device()
494 cmd.flags &= in iwl_mvm_power_update_device()
498 cmd.flags |= cpu_to_le16(DEVICE_POWER_FLAGS_32K_CLK_VALID_MSK); in iwl_mvm_power_update_device()
502 cmd.flags |= in iwl_mvm_power_update_device()
507 cmd.flags); in iwl_mvm_power_update_device()
509 return iwl_mvm_send_cmd_pdu(mvm, POWER_TABLE_CMD, 0, sizeof(cmd), in iwl_mvm_power_update_device()
510 &cmd); in iwl_mvm_power_update_device()
718 struct iwl_mac_power_cmd cmd = {}; in iwl_mvm_power_mac_dbgfs_read() local
722 memcpy(&cmd, &mvmvif->mac_pwr_cmd, sizeof(cmd)); in iwl_mvm_power_mac_dbgfs_read()
728 le16_to_cpu(cmd.flags)); in iwl_mvm_power_mac_dbgfs_read()
730 le16_to_cpu(cmd.keep_alive_seconds)); in iwl_mvm_power_mac_dbgfs_read()
732 if (!(cmd.flags & cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK))) in iwl_mvm_power_mac_dbgfs_read()
736 (cmd.flags & in iwl_mvm_power_mac_dbgfs_read()
739 cmd.skip_dtim_periods); in iwl_mvm_power_mac_dbgfs_read()
740 if (!(cmd.flags & cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK))) { in iwl_mvm_power_mac_dbgfs_read()
742 le32_to_cpu(cmd.rx_data_timeout)); in iwl_mvm_power_mac_dbgfs_read()
744 le32_to_cpu(cmd.tx_data_timeout)); in iwl_mvm_power_mac_dbgfs_read()
746 if (cmd.flags & cpu_to_le16(POWER_FLAGS_LPRX_ENA_MSK)) in iwl_mvm_power_mac_dbgfs_read()
749 cmd.lprx_rssi_threshold); in iwl_mvm_power_mac_dbgfs_read()
751 if (!(cmd.flags & cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK))) in iwl_mvm_power_mac_dbgfs_read()
755 le32_to_cpu(cmd.rx_data_timeout_uapsd)); in iwl_mvm_power_mac_dbgfs_read()
757 le32_to_cpu(cmd.tx_data_timeout_uapsd)); in iwl_mvm_power_mac_dbgfs_read()
758 pos += scnprintf(buf+pos, bufsz-pos, "qndp_tid = %d\n", cmd.qndp_tid); in iwl_mvm_power_mac_dbgfs_read()
760 cmd.uapsd_ac_flags); in iwl_mvm_power_mac_dbgfs_read()
762 cmd.uapsd_max_sp); in iwl_mvm_power_mac_dbgfs_read()
764 cmd.heavy_tx_thld_packets); in iwl_mvm_power_mac_dbgfs_read()
766 cmd.heavy_rx_thld_packets); in iwl_mvm_power_mac_dbgfs_read()
768 cmd.heavy_tx_thld_percentage); in iwl_mvm_power_mac_dbgfs_read()
770 cmd.heavy_rx_thld_percentage); in iwl_mvm_power_mac_dbgfs_read()
772 (cmd.flags & in iwl_mvm_power_mac_dbgfs_read()
776 if (!(cmd.flags & cpu_to_le16(POWER_FLAGS_SNOOZE_ENA_MSK))) in iwl_mvm_power_mac_dbgfs_read()
780 cmd.snooze_interval); in iwl_mvm_power_mac_dbgfs_read()
782 cmd.snooze_window); in iwl_mvm_power_mac_dbgfs_read()
789 struct iwl_beacon_filter_cmd *cmd) in iwl_mvm_beacon_filter_debugfs_parameters() argument
795 cmd->bf_energy_delta = cpu_to_le32(dbgfs_bf->bf_energy_delta); in iwl_mvm_beacon_filter_debugfs_parameters()
797 cmd->bf_roaming_energy_delta = in iwl_mvm_beacon_filter_debugfs_parameters()
800 cmd->bf_roaming_state = cpu_to_le32(dbgfs_bf->bf_roaming_state); in iwl_mvm_beacon_filter_debugfs_parameters()
802 cmd->bf_temp_threshold = in iwl_mvm_beacon_filter_debugfs_parameters()
805 cmd->bf_temp_fast_filter = in iwl_mvm_beacon_filter_debugfs_parameters()
808 cmd->bf_temp_slow_filter = in iwl_mvm_beacon_filter_debugfs_parameters()
811 cmd->bf_debug_flag = cpu_to_le32(dbgfs_bf->bf_debug_flag); in iwl_mvm_beacon_filter_debugfs_parameters()
813 cmd->bf_escape_timer = cpu_to_le32(dbgfs_bf->bf_escape_timer); in iwl_mvm_beacon_filter_debugfs_parameters()
815 cmd->ba_escape_timer = cpu_to_le32(dbgfs_bf->ba_escape_timer); in iwl_mvm_beacon_filter_debugfs_parameters()
817 cmd->ba_enable_beacon_abort = in iwl_mvm_beacon_filter_debugfs_parameters()
824 struct iwl_beacon_filter_cmd *cmd) in _iwl_mvm_enable_beacon_filter() argument
833 iwl_mvm_beacon_filter_set_cqm_params(mvm, vif, cmd); in _iwl_mvm_enable_beacon_filter()
834 iwl_mvm_beacon_filter_debugfs_parameters(vif, cmd); in _iwl_mvm_enable_beacon_filter()
835 ret = iwl_mvm_beacon_filter_send_cmd(mvm, cmd); in _iwl_mvm_enable_beacon_filter()
846 struct iwl_beacon_filter_cmd cmd = { in iwl_mvm_enable_beacon_filter() local
851 return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd); in iwl_mvm_enable_beacon_filter()
857 struct iwl_beacon_filter_cmd cmd = {}; in _iwl_mvm_disable_beacon_filter() local
864 ret = iwl_mvm_beacon_filter_send_cmd(mvm, &cmd); in _iwl_mvm_disable_beacon_filter()
910 struct iwl_beacon_filter_cmd cmd = { in iwl_mvm_power_set_ba() local
919 cmd.ba_escape_timer = cpu_to_le32(IWL_BA_ESCAPE_TIMER_D3); in iwl_mvm_power_set_ba()
926 return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd); in iwl_mvm_power_set_ba()