Lines Matching refs:mvm
83 int iwl_mvm_beacon_filter_send_cmd(struct iwl_mvm *mvm, in iwl_mvm_beacon_filter_send_cmd() argument
87 IWL_DEBUG_POWER(mvm, "ba_enable_beacon_abort is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
89 IWL_DEBUG_POWER(mvm, "ba_escape_timer is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
91 IWL_DEBUG_POWER(mvm, "bf_debug_flag is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
93 IWL_DEBUG_POWER(mvm, "bf_enable_beacon_filter is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
95 IWL_DEBUG_POWER(mvm, "bf_energy_delta is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
97 IWL_DEBUG_POWER(mvm, "bf_escape_timer is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
99 IWL_DEBUG_POWER(mvm, "bf_roaming_energy_delta is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
101 IWL_DEBUG_POWER(mvm, "bf_roaming_state is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
103 IWL_DEBUG_POWER(mvm, "bf_temp_threshold is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
105 IWL_DEBUG_POWER(mvm, "bf_temp_fast_filter is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
107 IWL_DEBUG_POWER(mvm, "bf_temp_slow_filter is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
110 return iwl_mvm_send_cmd_pdu(mvm, REPLY_BEACON_FILTERING_CMD, flags, in iwl_mvm_beacon_filter_send_cmd()
115 void iwl_mvm_beacon_filter_set_cqm_params(struct iwl_mvm *mvm, in iwl_mvm_beacon_filter_set_cqm_params() argument
132 static void iwl_mvm_power_log(struct iwl_mvm *mvm, in iwl_mvm_power_log() argument
135 IWL_DEBUG_POWER(mvm, in iwl_mvm_power_log()
139 IWL_DEBUG_POWER(mvm, "Keep alive = %u sec\n", in iwl_mvm_power_log()
143 IWL_DEBUG_POWER(mvm, "Disable power management\n"); in iwl_mvm_power_log()
147 IWL_DEBUG_POWER(mvm, "Rx timeout = %u usec\n", in iwl_mvm_power_log()
149 IWL_DEBUG_POWER(mvm, "Tx timeout = %u usec\n", in iwl_mvm_power_log()
152 IWL_DEBUG_POWER(mvm, "DTIM periods to skip = %u\n", in iwl_mvm_power_log()
155 IWL_DEBUG_POWER(mvm, "LP RX RSSI threshold = %u\n", in iwl_mvm_power_log()
158 IWL_DEBUG_POWER(mvm, "uAPSD enabled\n"); in iwl_mvm_power_log()
159 IWL_DEBUG_POWER(mvm, "Rx timeout (uAPSD) = %u usec\n", in iwl_mvm_power_log()
161 IWL_DEBUG_POWER(mvm, "Tx timeout (uAPSD) = %u usec\n", in iwl_mvm_power_log()
163 IWL_DEBUG_POWER(mvm, "QNDP TID = %d\n", cmd->qndp_tid); in iwl_mvm_power_log()
164 IWL_DEBUG_POWER(mvm, "ACs flags = 0x%x\n", cmd->uapsd_ac_flags); in iwl_mvm_power_log()
165 IWL_DEBUG_POWER(mvm, "Max SP = %d\n", cmd->uapsd_max_sp); in iwl_mvm_power_log()
169 static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm, in iwl_mvm_power_configure_uapsd() argument
181 if (mvm->cur_ucode != IWL_UCODE_WOWLAN) in iwl_mvm_power_configure_uapsd()
225 cmd->snooze_window = (mvm->cur_ucode == IWL_UCODE_WOWLAN) ? in iwl_mvm_power_configure_uapsd()
232 if (mvm->cur_ucode == IWL_UCODE_WOWLAN || cmd->flags & in iwl_mvm_power_configure_uapsd()
262 static bool iwl_mvm_power_allow_uapsd(struct iwl_mvm *mvm, in iwl_mvm_power_allow_uapsd() argument
272 !(mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD)) in iwl_mvm_power_allow_uapsd()
287 if (iwl_mvm_phy_ctx_count(mvm) >= 2) in iwl_mvm_power_allow_uapsd()
311 static void iwl_mvm_power_config_skip_dtim(struct iwl_mvm *mvm, in iwl_mvm_power_config_skip_dtim() argument
349 static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm, in iwl_mvm_power_build_cmd() argument
375 if (mvm->ps_disabled) in iwl_mvm_power_build_cmd()
384 (!fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_power_build_cmd()
398 iwl_mvm_power_config_skip_dtim(mvm, vif, cmd, host_awake); in iwl_mvm_power_build_cmd()
406 fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_power_build_cmd()
419 if (iwl_mvm_power_allow_uapsd(mvm, vif)) in iwl_mvm_power_build_cmd()
420 iwl_mvm_power_configure_uapsd(mvm, vif, cmd); in iwl_mvm_power_build_cmd()
468 static int iwl_mvm_power_send_cmd(struct iwl_mvm *mvm, in iwl_mvm_power_send_cmd() argument
473 iwl_mvm_power_build_cmd(mvm, vif, &cmd, in iwl_mvm_power_send_cmd()
474 mvm->cur_ucode != IWL_UCODE_WOWLAN); in iwl_mvm_power_send_cmd()
475 iwl_mvm_power_log(mvm, &cmd); in iwl_mvm_power_send_cmd()
480 return iwl_mvm_send_cmd_pdu(mvm, MAC_PM_POWER_TABLE, 0, in iwl_mvm_power_send_cmd()
484 int iwl_mvm_power_update_device(struct iwl_mvm *mvm) in iwl_mvm_power_update_device() argument
491 mvm->ps_disabled = true; in iwl_mvm_power_update_device()
493 if (!mvm->ps_disabled) in iwl_mvm_power_update_device()
497 if ((mvm->cur_ucode == IWL_UCODE_WOWLAN) ? mvm->disable_power_off_d3 : in iwl_mvm_power_update_device()
498 mvm->disable_power_off) in iwl_mvm_power_update_device()
502 IWL_DEBUG_POWER(mvm, in iwl_mvm_power_update_device()
506 return iwl_mvm_send_cmd_pdu(mvm, POWER_TABLE_CMD, 0, sizeof(cmd), in iwl_mvm_power_update_device()
510 void iwl_mvm_power_vif_assoc(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_power_vif_assoc() argument
533 void iwl_mvm_power_uapsd_misbehaving_ap_notif(struct iwl_mvm *mvm, in iwl_mvm_power_uapsd_misbehaving_ap_notif() argument
541 mvm->hw, IEEE80211_IFACE_ITER_NORMAL, in iwl_mvm_power_uapsd_misbehaving_ap_notif()
546 struct iwl_mvm *mvm; member
634 static void iwl_mvm_power_set_pm(struct iwl_mvm *mvm, in iwl_mvm_power_set_pm() argument
643 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_set_pm()
646 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_set_pm()
661 if (iwl_mvm_tdls_sta_count(mvm, NULL)) in iwl_mvm_power_set_pm()
672 if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PM) in iwl_mvm_power_set_pm()
686 (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_DCM)) { in iwl_mvm_power_set_pm()
690 (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PM)) in iwl_mvm_power_set_pm()
700 (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_SCM)) { in iwl_mvm_power_set_pm()
703 if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PM) in iwl_mvm_power_set_pm()
709 int iwl_mvm_power_mac_dbgfs_read(struct iwl_mvm *mvm, in iwl_mvm_power_mac_dbgfs_read() argument
717 mutex_lock(&mvm->mutex); in iwl_mvm_power_mac_dbgfs_read()
719 mutex_unlock(&mvm->mutex); in iwl_mvm_power_mac_dbgfs_read()
818 static int _iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, in _iwl_mvm_enable_beacon_filter() argument
827 if (mvmvif != mvm->bf_allowed_vif || !vif->bss_conf.dtim_period || in _iwl_mvm_enable_beacon_filter()
831 iwl_mvm_beacon_filter_set_cqm_params(mvm, vif, cmd, d0i3); in _iwl_mvm_enable_beacon_filter()
834 ret = iwl_mvm_beacon_filter_send_cmd(mvm, cmd, cmd_flags); in _iwl_mvm_enable_beacon_filter()
843 int iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, in iwl_mvm_enable_beacon_filter() argument
852 return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd, flags, false); in iwl_mvm_enable_beacon_filter()
855 static int iwl_mvm_update_beacon_abort(struct iwl_mvm *mvm, in iwl_mvm_update_beacon_abort() argument
868 if (mvm->cur_ucode == IWL_UCODE_WOWLAN) in iwl_mvm_update_beacon_abort()
872 return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd, 0, false); in iwl_mvm_update_beacon_abort()
875 int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, in iwl_mvm_disable_beacon_filter() argument
886 ret = iwl_mvm_beacon_filter_send_cmd(mvm, &cmd, flags); in iwl_mvm_disable_beacon_filter()
894 static int iwl_mvm_power_set_ps(struct iwl_mvm *mvm) in iwl_mvm_power_set_ps() argument
902 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_set_ps()
908 if (mvm->ps_disabled != disable_ps) { in iwl_mvm_power_set_ps()
909 bool old_ps_disabled = mvm->ps_disabled; in iwl_mvm_power_set_ps()
911 mvm->ps_disabled = disable_ps; in iwl_mvm_power_set_ps()
912 ret = iwl_mvm_power_update_device(mvm); in iwl_mvm_power_set_ps()
914 mvm->ps_disabled = old_ps_disabled; in iwl_mvm_power_set_ps()
922 static int iwl_mvm_power_set_ba(struct iwl_mvm *mvm, in iwl_mvm_power_set_ba() argument
933 ba_enable = !(!mvmvif->pm_enabled || mvm->ps_disabled || in iwl_mvm_power_set_ba()
937 return iwl_mvm_update_beacon_abort(mvm, vifs->bf_vif, ba_enable); in iwl_mvm_power_set_ba()
940 int iwl_mvm_power_update_ps(struct iwl_mvm *mvm) in iwl_mvm_power_update_ps() argument
943 .mvm = mvm, in iwl_mvm_power_update_ps()
947 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_update_ps()
950 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_update_ps()
954 ret = iwl_mvm_power_set_ps(mvm); in iwl_mvm_power_update_ps()
958 return iwl_mvm_power_set_ba(mvm, &vifs); in iwl_mvm_power_update_ps()
961 int iwl_mvm_power_update_mac(struct iwl_mvm *mvm) in iwl_mvm_power_update_mac() argument
964 .mvm = mvm, in iwl_mvm_power_update_mac()
968 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_update_mac()
971 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_update_mac()
975 iwl_mvm_power_set_pm(mvm, &vifs); in iwl_mvm_power_update_mac()
977 ret = iwl_mvm_power_set_ps(mvm); in iwl_mvm_power_update_mac()
982 ret = iwl_mvm_power_send_cmd(mvm, vifs.bss_vif); in iwl_mvm_power_update_mac()
988 ret = iwl_mvm_power_send_cmd(mvm, vifs.p2p_vif); in iwl_mvm_power_update_mac()
993 return iwl_mvm_power_set_ba(mvm, &vifs); in iwl_mvm_power_update_mac()
996 int iwl_mvm_update_d0i3_power_mode(struct iwl_mvm *mvm, in iwl_mvm_update_d0i3_power_mode() argument
1010 iwl_mvm_power_build_cmd(mvm, vif, &cmd, !enable); in iwl_mvm_update_d0i3_power_mode()
1012 iwl_mvm_power_log(mvm, &cmd); in iwl_mvm_update_d0i3_power_mode()
1016 ret = iwl_mvm_send_cmd_pdu(mvm, MAC_PM_POWER_TABLE, flags, in iwl_mvm_update_d0i3_power_mode()
1022 if (mvmvif != mvm->bf_allowed_vif) in iwl_mvm_update_d0i3_power_mode()
1030 ret = _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd_bf, in iwl_mvm_update_d0i3_power_mode()
1034 ret = iwl_mvm_enable_beacon_filter(mvm, vif, flags); in iwl_mvm_update_d0i3_power_mode()
1036 ret = iwl_mvm_disable_beacon_filter(mvm, vif, flags); in iwl_mvm_update_d0i3_power_mode()