Lines Matching refs:mvm

81 int iwl_mvm_beacon_filter_send_cmd(struct iwl_mvm *mvm,  in iwl_mvm_beacon_filter_send_cmd()  argument
85 IWL_DEBUG_POWER(mvm, "ba_enable_beacon_abort is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
87 IWL_DEBUG_POWER(mvm, "ba_escape_timer is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
89 IWL_DEBUG_POWER(mvm, "bf_debug_flag is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
91 IWL_DEBUG_POWER(mvm, "bf_enable_beacon_filter is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
93 IWL_DEBUG_POWER(mvm, "bf_energy_delta is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
95 IWL_DEBUG_POWER(mvm, "bf_escape_timer is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
97 IWL_DEBUG_POWER(mvm, "bf_roaming_energy_delta is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
99 IWL_DEBUG_POWER(mvm, "bf_roaming_state is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
101 IWL_DEBUG_POWER(mvm, "bf_temp_threshold is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
103 IWL_DEBUG_POWER(mvm, "bf_temp_fast_filter is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
105 IWL_DEBUG_POWER(mvm, "bf_temp_slow_filter is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
108 return iwl_mvm_send_cmd_pdu(mvm, REPLY_BEACON_FILTERING_CMD, flags, in iwl_mvm_beacon_filter_send_cmd()
113 void iwl_mvm_beacon_filter_set_cqm_params(struct iwl_mvm *mvm, in iwl_mvm_beacon_filter_set_cqm_params() argument
129 static void iwl_mvm_power_log(struct iwl_mvm *mvm, in iwl_mvm_power_log() argument
132 IWL_DEBUG_POWER(mvm, in iwl_mvm_power_log()
136 IWL_DEBUG_POWER(mvm, "Keep alive = %u sec\n", in iwl_mvm_power_log()
140 IWL_DEBUG_POWER(mvm, "Disable power management\n"); in iwl_mvm_power_log()
144 IWL_DEBUG_POWER(mvm, "Rx timeout = %u usec\n", in iwl_mvm_power_log()
146 IWL_DEBUG_POWER(mvm, "Tx timeout = %u usec\n", in iwl_mvm_power_log()
149 IWL_DEBUG_POWER(mvm, "DTIM periods to skip = %u\n", in iwl_mvm_power_log()
152 IWL_DEBUG_POWER(mvm, "LP RX RSSI threshold = %u\n", in iwl_mvm_power_log()
155 IWL_DEBUG_POWER(mvm, "uAPSD enabled\n"); in iwl_mvm_power_log()
156 IWL_DEBUG_POWER(mvm, "Rx timeout (uAPSD) = %u usec\n", in iwl_mvm_power_log()
158 IWL_DEBUG_POWER(mvm, "Tx timeout (uAPSD) = %u usec\n", in iwl_mvm_power_log()
160 IWL_DEBUG_POWER(mvm, "QNDP TID = %d\n", cmd->qndp_tid); in iwl_mvm_power_log()
161 IWL_DEBUG_POWER(mvm, "ACs flags = 0x%x\n", cmd->uapsd_ac_flags); in iwl_mvm_power_log()
162 IWL_DEBUG_POWER(mvm, "Max SP = %d\n", cmd->uapsd_max_sp); in iwl_mvm_power_log()
166 static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm, in iwl_mvm_power_configure_uapsd() argument
178 if (mvm->cur_ucode != IWL_UCODE_WOWLAN) in iwl_mvm_power_configure_uapsd()
222 cmd->snooze_window = (mvm->cur_ucode == IWL_UCODE_WOWLAN) ? in iwl_mvm_power_configure_uapsd()
229 if (mvm->cur_ucode == IWL_UCODE_WOWLAN || cmd->flags & in iwl_mvm_power_configure_uapsd()
259 static bool iwl_mvm_power_allow_uapsd(struct iwl_mvm *mvm, in iwl_mvm_power_allow_uapsd() argument
269 !(mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD)) in iwl_mvm_power_allow_uapsd()
284 if (iwl_mvm_phy_ctx_count(mvm) >= 2) in iwl_mvm_power_allow_uapsd()
329 static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm, in iwl_mvm_power_build_cmd() argument
355 if (mvm->ps_disabled) in iwl_mvm_power_build_cmd()
379 mvm->cur_ucode == IWL_UCODE_WOWLAN)) { in iwl_mvm_power_build_cmd()
387 if (mvm->cur_ucode != IWL_UCODE_WOWLAN) { in iwl_mvm_power_build_cmd()
399 if (iwl_mvm_power_allow_uapsd(mvm, vif)) in iwl_mvm_power_build_cmd()
400 iwl_mvm_power_configure_uapsd(mvm, vif, cmd); in iwl_mvm_power_build_cmd()
448 static int iwl_mvm_power_send_cmd(struct iwl_mvm *mvm, in iwl_mvm_power_send_cmd() argument
453 iwl_mvm_power_build_cmd(mvm, vif, &cmd); in iwl_mvm_power_send_cmd()
454 iwl_mvm_power_log(mvm, &cmd); in iwl_mvm_power_send_cmd()
459 return iwl_mvm_send_cmd_pdu(mvm, MAC_PM_POWER_TABLE, 0, in iwl_mvm_power_send_cmd()
463 int iwl_mvm_power_update_device(struct iwl_mvm *mvm) in iwl_mvm_power_update_device() argument
470 mvm->ps_disabled = true; in iwl_mvm_power_update_device()
472 if (mvm->ps_disabled) in iwl_mvm_power_update_device()
476 if ((mvm->cur_ucode == IWL_UCODE_WOWLAN) ? mvm->disable_power_off_d3 : in iwl_mvm_power_update_device()
477 mvm->disable_power_off) in iwl_mvm_power_update_device()
481 IWL_DEBUG_POWER(mvm, in iwl_mvm_power_update_device()
485 return iwl_mvm_send_cmd_pdu(mvm, POWER_TABLE_CMD, 0, sizeof(cmd), in iwl_mvm_power_update_device()
489 void iwl_mvm_power_vif_assoc(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_power_vif_assoc() argument
512 int iwl_mvm_power_uapsd_misbehaving_ap_notif(struct iwl_mvm *mvm, in iwl_mvm_power_uapsd_misbehaving_ap_notif() argument
521 mvm->hw, IEEE80211_IFACE_ITER_NORMAL, in iwl_mvm_power_uapsd_misbehaving_ap_notif()
528 struct iwl_mvm *mvm; member
616 static void iwl_mvm_power_set_pm(struct iwl_mvm *mvm, in iwl_mvm_power_set_pm() argument
625 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_set_pm()
628 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_set_pm()
643 if (iwl_mvm_tdls_sta_count(mvm, NULL)) in iwl_mvm_power_set_pm()
654 if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PM) in iwl_mvm_power_set_pm()
668 (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_DCM)) { in iwl_mvm_power_set_pm()
672 (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PM)) in iwl_mvm_power_set_pm()
682 (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_SCM)) { in iwl_mvm_power_set_pm()
685 if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PM) in iwl_mvm_power_set_pm()
691 int iwl_mvm_power_mac_dbgfs_read(struct iwl_mvm *mvm, in iwl_mvm_power_mac_dbgfs_read() argument
699 mutex_lock(&mvm->mutex); in iwl_mvm_power_mac_dbgfs_read()
701 mutex_unlock(&mvm->mutex); in iwl_mvm_power_mac_dbgfs_read()
800 static int _iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, in _iwl_mvm_enable_beacon_filter() argument
809 if (mvmvif != mvm->bf_allowed_vif || !vif->bss_conf.dtim_period || in _iwl_mvm_enable_beacon_filter()
813 iwl_mvm_beacon_filter_set_cqm_params(mvm, vif, cmd); in _iwl_mvm_enable_beacon_filter()
816 ret = iwl_mvm_beacon_filter_send_cmd(mvm, cmd, cmd_flags); in _iwl_mvm_enable_beacon_filter()
825 int iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, in iwl_mvm_enable_beacon_filter() argument
834 return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd, flags, false); in iwl_mvm_enable_beacon_filter()
837 static int iwl_mvm_update_beacon_abort(struct iwl_mvm *mvm, in iwl_mvm_update_beacon_abort() argument
850 if (mvm->cur_ucode == IWL_UCODE_WOWLAN) in iwl_mvm_update_beacon_abort()
854 return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd, 0, false); in iwl_mvm_update_beacon_abort()
857 int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, in iwl_mvm_disable_beacon_filter() argument
868 ret = iwl_mvm_beacon_filter_send_cmd(mvm, &cmd, flags); in iwl_mvm_disable_beacon_filter()
876 static int iwl_mvm_power_set_ps(struct iwl_mvm *mvm) in iwl_mvm_power_set_ps() argument
884 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_set_ps()
890 if (mvm->ps_disabled != disable_ps) { in iwl_mvm_power_set_ps()
891 bool old_ps_disabled = mvm->ps_disabled; in iwl_mvm_power_set_ps()
893 mvm->ps_disabled = disable_ps; in iwl_mvm_power_set_ps()
894 ret = iwl_mvm_power_update_device(mvm); in iwl_mvm_power_set_ps()
896 mvm->ps_disabled = old_ps_disabled; in iwl_mvm_power_set_ps()
904 static int iwl_mvm_power_set_ba(struct iwl_mvm *mvm, in iwl_mvm_power_set_ba() argument
915 ba_enable = !(!mvmvif->pm_enabled || mvm->ps_disabled || in iwl_mvm_power_set_ba()
919 return iwl_mvm_update_beacon_abort(mvm, vifs->bf_vif, ba_enable); in iwl_mvm_power_set_ba()
922 int iwl_mvm_power_update_ps(struct iwl_mvm *mvm) in iwl_mvm_power_update_ps() argument
925 .mvm = mvm, in iwl_mvm_power_update_ps()
929 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_update_ps()
932 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_update_ps()
936 ret = iwl_mvm_power_set_ps(mvm); in iwl_mvm_power_update_ps()
940 return iwl_mvm_power_set_ba(mvm, &vifs); in iwl_mvm_power_update_ps()
943 int iwl_mvm_power_update_mac(struct iwl_mvm *mvm) in iwl_mvm_power_update_mac() argument
946 .mvm = mvm, in iwl_mvm_power_update_mac()
950 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_update_mac()
953 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_update_mac()
957 iwl_mvm_power_set_pm(mvm, &vifs); in iwl_mvm_power_update_mac()
959 ret = iwl_mvm_power_set_ps(mvm); in iwl_mvm_power_update_mac()
964 ret = iwl_mvm_power_send_cmd(mvm, vifs.bss_vif); in iwl_mvm_power_update_mac()
970 ret = iwl_mvm_power_send_cmd(mvm, vifs.p2p_vif); in iwl_mvm_power_update_mac()
975 return iwl_mvm_power_set_ba(mvm, &vifs); in iwl_mvm_power_update_mac()
978 int iwl_mvm_update_d0i3_power_mode(struct iwl_mvm *mvm, in iwl_mvm_update_d0i3_power_mode() argument
992 iwl_mvm_power_build_cmd(mvm, vif, &cmd); in iwl_mvm_update_d0i3_power_mode()
1011 iwl_mvm_power_log(mvm, &cmd); in iwl_mvm_update_d0i3_power_mode()
1015 ret = iwl_mvm_send_cmd_pdu(mvm, MAC_PM_POWER_TABLE, flags, in iwl_mvm_update_d0i3_power_mode()
1021 if (mvmvif != mvm->bf_allowed_vif) in iwl_mvm_update_d0i3_power_mode()
1029 ret = _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd_bf, in iwl_mvm_update_d0i3_power_mode()
1033 ret = iwl_mvm_enable_beacon_filter(mvm, vif, flags); in iwl_mvm_update_d0i3_power_mode()
1035 ret = iwl_mvm_disable_beacon_filter(mvm, vif, flags); in iwl_mvm_update_d0i3_power_mode()