Lines Matching refs:mvm

15 #include "mvm.h"
22 int iwl_mvm_beacon_filter_send_cmd(struct iwl_mvm *mvm,
27 IWL_DEBUG_POWER(mvm, "ba_enable_beacon_abort is: %d\n",
29 IWL_DEBUG_POWER(mvm, "ba_escape_timer is: %d\n",
31 IWL_DEBUG_POWER(mvm, "bf_debug_flag is: %d\n",
33 IWL_DEBUG_POWER(mvm, "bf_enable_beacon_filter is: %d\n",
35 IWL_DEBUG_POWER(mvm, "bf_energy_delta is: %d\n",
37 IWL_DEBUG_POWER(mvm, "bf_escape_timer is: %d\n",
39 IWL_DEBUG_POWER(mvm, "bf_roaming_energy_delta is: %d\n",
41 IWL_DEBUG_POWER(mvm, "bf_roaming_state is: %d\n",
43 IWL_DEBUG_POWER(mvm, "bf_temp_threshold is: %d\n",
45 IWL_DEBUG_POWER(mvm, "bf_temp_fast_filter is: %d\n",
47 IWL_DEBUG_POWER(mvm, "bf_temp_slow_filter is: %d\n",
49 IWL_DEBUG_POWER(mvm, "bf_threshold_absolute_low is: %d, %d\n",
53 IWL_DEBUG_POWER(mvm, "bf_threshold_absolute_high is: %d, %d\n",
57 if (fw_has_api(&mvm->fw->ucode_capa,
64 return iwl_mvm_send_cmd_pdu(mvm, REPLY_BEACON_FILTERING_CMD, 0,
69 void iwl_mvm_beacon_filter_set_cqm_params(struct iwl_mvm *mvm,
85 static void iwl_mvm_power_log(struct iwl_mvm *mvm,
88 IWL_DEBUG_POWER(mvm,
92 IWL_DEBUG_POWER(mvm, "Keep alive = %u sec\n",
96 IWL_DEBUG_POWER(mvm, "Disable power management\n");
100 IWL_DEBUG_POWER(mvm, "Rx timeout = %u usec\n",
102 IWL_DEBUG_POWER(mvm, "Tx timeout = %u usec\n",
105 IWL_DEBUG_POWER(mvm, "DTIM periods to skip = %u\n",
108 IWL_DEBUG_POWER(mvm, "LP RX RSSI threshold = %u\n",
111 IWL_DEBUG_POWER(mvm, "uAPSD enabled\n");
112 IWL_DEBUG_POWER(mvm, "Rx timeout (uAPSD) = %u usec\n",
114 IWL_DEBUG_POWER(mvm, "Tx timeout (uAPSD) = %u usec\n",
116 IWL_DEBUG_POWER(mvm, "QNDP TID = %d\n", cmd->qndp_tid);
117 IWL_DEBUG_POWER(mvm, "ACs flags = 0x%x\n", cmd->uapsd_ac_flags);
118 IWL_DEBUG_POWER(mvm, "Max SP = %d\n", cmd->uapsd_max_sp);
122 static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm,
130 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status) ||
155 if (!test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status))
190 test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status) ?
195 cmd->uapsd_max_sp = mvm->hw->uapsd_max_sp_len;
252 static bool iwl_mvm_power_allow_uapsd(struct iwl_mvm *mvm,
274 if (vif->p2p && !iwl_mvm_is_p2p_scm_uapsd_supported(mvm))
277 ieee80211_iterate_active_interfaces_atomic(mvm->hw,
298 static void iwl_mvm_power_config_skip_dtim(struct iwl_mvm *mvm,
310 if (!test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) {
346 static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
371 if (mvm->ps_disabled)
380 (!fw_has_capa(&mvm->fw->ucode_capa,
394 iwl_mvm_power_config_skip_dtim(mvm, vif, cmd);
396 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) {
402 fw_has_capa(&mvm->fw->ucode_capa,
415 if (iwl_mvm_power_allow_uapsd(mvm, vif))
416 iwl_mvm_power_configure_uapsd(mvm, vif, cmd);
464 static int iwl_mvm_power_send_cmd(struct iwl_mvm *mvm,
469 iwl_mvm_power_build_cmd(mvm, vif, &cmd);
470 iwl_mvm_power_log(mvm, &cmd);
475 return iwl_mvm_send_cmd_pdu(mvm, MAC_PM_POWER_TABLE, 0,
479 int iwl_mvm_power_update_device(struct iwl_mvm *mvm)
486 mvm->ps_disabled = true;
488 if (!mvm->ps_disabled)
492 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status) ?
493 mvm->disable_power_off_d3 : mvm->disable_power_off)
497 if (mvm->ext_clock_valid)
500 if (iwl_fw_lookup_cmd_ver(mvm->fw, POWER_TABLE_CMD, 0) >= 7 &&
501 test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status))
505 IWL_DEBUG_POWER(mvm,
509 return iwl_mvm_send_cmd_pdu(mvm, POWER_TABLE_CMD, 0, sizeof(cmd),
513 void iwl_mvm_power_vif_assoc(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
546 void iwl_mvm_power_uapsd_misbehaving_ap_notif(struct iwl_mvm *mvm,
554 mvm->hw, IEEE80211_IFACE_ITER_NORMAL,
559 struct iwl_mvm *mvm;
640 static void iwl_mvm_power_set_pm(struct iwl_mvm *mvm,
649 lockdep_assert_held(&mvm->mutex);
652 ieee80211_iterate_active_interfaces_atomic(mvm->hw,
667 if (iwl_mvm_tdls_sta_count(mvm, NULL))
713 int iwl_mvm_power_mac_dbgfs_read(struct iwl_mvm *mvm,
721 mutex_lock(&mvm->mutex);
723 mutex_unlock(&mvm->mutex);
822 static int _iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm,
829 if (mvmvif != mvm->bf_allowed_vif || !vif->bss_conf.dtim_period ||
833 iwl_mvm_beacon_filter_set_cqm_params(mvm, vif, cmd);
835 ret = iwl_mvm_beacon_filter_send_cmd(mvm, cmd);
843 int iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm,
851 return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd);
854 static int _iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm,
864 ret = iwl_mvm_beacon_filter_send_cmd(mvm, &cmd);
872 int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm,
875 return _iwl_mvm_disable_beacon_filter(mvm, vif);
878 static int iwl_mvm_power_set_ps(struct iwl_mvm *mvm)
886 ieee80211_iterate_active_interfaces_atomic(mvm->hw,
892 if (mvm->ps_disabled != disable_ps) {
893 bool old_ps_disabled = mvm->ps_disabled;
895 mvm->ps_disabled = disable_ps;
896 ret = iwl_mvm_power_update_device(mvm);
898 mvm->ps_disabled = old_ps_disabled;
906 static int iwl_mvm_power_set_ba(struct iwl_mvm *mvm,
918 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status))
922 mvm->ps_disabled ||
926 return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd);
929 int iwl_mvm_power_update_ps(struct iwl_mvm *mvm)
932 .mvm = mvm,
936 lockdep_assert_held(&mvm->mutex);
939 ieee80211_iterate_active_interfaces_atomic(mvm->hw,
943 ret = iwl_mvm_power_set_ps(mvm);
948 return iwl_mvm_power_set_ba(mvm, vifs.bss_vif);
953 int iwl_mvm_power_update_mac(struct iwl_mvm *mvm)
956 .mvm = mvm,
960 lockdep_assert_held(&mvm->mutex);
963 ieee80211_iterate_active_interfaces_atomic(mvm->hw,
967 iwl_mvm_power_set_pm(mvm, &vifs);
969 ret = iwl_mvm_power_set_ps(mvm);
974 ret = iwl_mvm_power_send_cmd(mvm, vifs.bss_vif);
980 ret = iwl_mvm_power_send_cmd(mvm, vifs.p2p_vif);
986 return iwl_mvm_power_set_ba(mvm, vifs.bss_vif);