Lines Matching refs:mvm

22 int iwl_mvm_beacon_filter_send_cmd(struct iwl_mvm *mvm,  in iwl_mvm_beacon_filter_send_cmd()  argument
28 IWL_DEBUG_POWER(mvm, "ba_enable_beacon_abort is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
30 IWL_DEBUG_POWER(mvm, "ba_escape_timer is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
32 IWL_DEBUG_POWER(mvm, "bf_debug_flag is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
34 IWL_DEBUG_POWER(mvm, "bf_enable_beacon_filter is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
36 IWL_DEBUG_POWER(mvm, "bf_energy_delta is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
38 IWL_DEBUG_POWER(mvm, "bf_escape_timer is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
40 IWL_DEBUG_POWER(mvm, "bf_roaming_energy_delta is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
42 IWL_DEBUG_POWER(mvm, "bf_roaming_state is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
44 IWL_DEBUG_POWER(mvm, "bf_temp_threshold is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
46 IWL_DEBUG_POWER(mvm, "bf_temp_fast_filter is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
48 IWL_DEBUG_POWER(mvm, "bf_temp_slow_filter is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
50 IWL_DEBUG_POWER(mvm, "bf_threshold_absolute_low is: %d, %d\n", in iwl_mvm_beacon_filter_send_cmd()
54 IWL_DEBUG_POWER(mvm, "bf_threshold_absolute_high is: %d, %d\n", in iwl_mvm_beacon_filter_send_cmd()
58 if (fw_has_api(&mvm->fw->ucode_capa, in iwl_mvm_beacon_filter_send_cmd()
65 return iwl_mvm_send_cmd_pdu(mvm, REPLY_BEACON_FILTERING_CMD, flags, in iwl_mvm_beacon_filter_send_cmd()
70 void iwl_mvm_beacon_filter_set_cqm_params(struct iwl_mvm *mvm, in iwl_mvm_beacon_filter_set_cqm_params() argument
86 static void iwl_mvm_power_log(struct iwl_mvm *mvm, in iwl_mvm_power_log() argument
89 IWL_DEBUG_POWER(mvm, in iwl_mvm_power_log()
93 IWL_DEBUG_POWER(mvm, "Keep alive = %u sec\n", in iwl_mvm_power_log()
97 IWL_DEBUG_POWER(mvm, "Disable power management\n"); in iwl_mvm_power_log()
101 IWL_DEBUG_POWER(mvm, "Rx timeout = %u usec\n", in iwl_mvm_power_log()
103 IWL_DEBUG_POWER(mvm, "Tx timeout = %u usec\n", in iwl_mvm_power_log()
106 IWL_DEBUG_POWER(mvm, "DTIM periods to skip = %u\n", in iwl_mvm_power_log()
109 IWL_DEBUG_POWER(mvm, "LP RX RSSI threshold = %u\n", in iwl_mvm_power_log()
112 IWL_DEBUG_POWER(mvm, "uAPSD enabled\n"); in iwl_mvm_power_log()
113 IWL_DEBUG_POWER(mvm, "Rx timeout (uAPSD) = %u usec\n", in iwl_mvm_power_log()
115 IWL_DEBUG_POWER(mvm, "Tx timeout (uAPSD) = %u usec\n", in iwl_mvm_power_log()
117 IWL_DEBUG_POWER(mvm, "QNDP TID = %d\n", cmd->qndp_tid); in iwl_mvm_power_log()
118 IWL_DEBUG_POWER(mvm, "ACs flags = 0x%x\n", cmd->uapsd_ac_flags); in iwl_mvm_power_log()
119 IWL_DEBUG_POWER(mvm, "Max SP = %d\n", cmd->uapsd_max_sp); in iwl_mvm_power_log()
123 static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm, in iwl_mvm_power_configure_uapsd() argument
131 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status) || in iwl_mvm_power_configure_uapsd()
156 if (!test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) in iwl_mvm_power_configure_uapsd()
191 test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status) ? in iwl_mvm_power_configure_uapsd()
196 cmd->uapsd_max_sp = mvm->hw->uapsd_max_sp_len; in iwl_mvm_power_configure_uapsd()
235 static bool iwl_mvm_power_allow_uapsd(struct iwl_mvm *mvm, in iwl_mvm_power_allow_uapsd() argument
257 if (iwl_mvm_phy_ctx_count(mvm) >= 2) in iwl_mvm_power_allow_uapsd()
264 if (!iwl_mvm_is_p2p_scm_uapsd_supported(mvm)) in iwl_mvm_power_allow_uapsd()
267 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_allow_uapsd()
297 static void iwl_mvm_power_config_skip_dtim(struct iwl_mvm *mvm, in iwl_mvm_power_config_skip_dtim() argument
314 if (!test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) { in iwl_mvm_power_config_skip_dtim()
332 static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm, in iwl_mvm_power_build_cmd() argument
357 if (mvm->ps_disabled) in iwl_mvm_power_build_cmd()
366 (!fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_power_build_cmd()
380 iwl_mvm_power_config_skip_dtim(mvm, vif, cmd); in iwl_mvm_power_build_cmd()
382 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) { in iwl_mvm_power_build_cmd()
388 fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_power_build_cmd()
401 if (iwl_mvm_power_allow_uapsd(mvm, vif)) in iwl_mvm_power_build_cmd()
402 iwl_mvm_power_configure_uapsd(mvm, vif, cmd); in iwl_mvm_power_build_cmd()
450 static int iwl_mvm_power_send_cmd(struct iwl_mvm *mvm, in iwl_mvm_power_send_cmd() argument
455 iwl_mvm_power_build_cmd(mvm, vif, &cmd); in iwl_mvm_power_send_cmd()
456 iwl_mvm_power_log(mvm, &cmd); in iwl_mvm_power_send_cmd()
461 return iwl_mvm_send_cmd_pdu(mvm, MAC_PM_POWER_TABLE, 0, in iwl_mvm_power_send_cmd()
465 int iwl_mvm_power_update_device(struct iwl_mvm *mvm) in iwl_mvm_power_update_device() argument
472 mvm->ps_disabled = true; in iwl_mvm_power_update_device()
474 if (!mvm->ps_disabled) in iwl_mvm_power_update_device()
478 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status) ? in iwl_mvm_power_update_device()
479 mvm->disable_power_off_d3 : mvm->disable_power_off) in iwl_mvm_power_update_device()
483 if (mvm->ext_clock_valid) in iwl_mvm_power_update_device()
486 IWL_DEBUG_POWER(mvm, in iwl_mvm_power_update_device()
490 return iwl_mvm_send_cmd_pdu(mvm, POWER_TABLE_CMD, 0, sizeof(cmd), in iwl_mvm_power_update_device()
494 void iwl_mvm_power_vif_assoc(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_power_vif_assoc() argument
517 void iwl_mvm_power_uapsd_misbehaving_ap_notif(struct iwl_mvm *mvm, in iwl_mvm_power_uapsd_misbehaving_ap_notif() argument
525 mvm->hw, IEEE80211_IFACE_ITER_NORMAL, in iwl_mvm_power_uapsd_misbehaving_ap_notif()
530 struct iwl_mvm *mvm; member
609 static void iwl_mvm_power_set_pm(struct iwl_mvm *mvm, in iwl_mvm_power_set_pm() argument
618 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_set_pm()
621 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_set_pm()
636 if (iwl_mvm_tdls_sta_count(mvm, NULL)) in iwl_mvm_power_set_pm()
679 int iwl_mvm_power_mac_dbgfs_read(struct iwl_mvm *mvm, in iwl_mvm_power_mac_dbgfs_read() argument
687 mutex_lock(&mvm->mutex); in iwl_mvm_power_mac_dbgfs_read()
689 mutex_unlock(&mvm->mutex); in iwl_mvm_power_mac_dbgfs_read()
788 static int _iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, in _iwl_mvm_enable_beacon_filter() argument
796 if (mvmvif != mvm->bf_allowed_vif || !vif->bss_conf.dtim_period || in _iwl_mvm_enable_beacon_filter()
800 iwl_mvm_beacon_filter_set_cqm_params(mvm, vif, cmd); in _iwl_mvm_enable_beacon_filter()
802 ret = iwl_mvm_beacon_filter_send_cmd(mvm, cmd, cmd_flags); in _iwl_mvm_enable_beacon_filter()
810 int iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, in iwl_mvm_enable_beacon_filter() argument
819 return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd, flags); in iwl_mvm_enable_beacon_filter()
822 static int _iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, in _iwl_mvm_disable_beacon_filter() argument
833 ret = iwl_mvm_beacon_filter_send_cmd(mvm, &cmd, flags); in _iwl_mvm_disable_beacon_filter()
841 int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, in iwl_mvm_disable_beacon_filter() argument
845 return _iwl_mvm_disable_beacon_filter(mvm, vif, flags); in iwl_mvm_disable_beacon_filter()
848 static int iwl_mvm_power_set_ps(struct iwl_mvm *mvm) in iwl_mvm_power_set_ps() argument
856 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_set_ps()
862 if (mvm->ps_disabled != disable_ps) { in iwl_mvm_power_set_ps()
863 bool old_ps_disabled = mvm->ps_disabled; in iwl_mvm_power_set_ps()
865 mvm->ps_disabled = disable_ps; in iwl_mvm_power_set_ps()
866 ret = iwl_mvm_power_update_device(mvm); in iwl_mvm_power_set_ps()
868 mvm->ps_disabled = old_ps_disabled; in iwl_mvm_power_set_ps()
876 static int iwl_mvm_power_set_ba(struct iwl_mvm *mvm, in iwl_mvm_power_set_ba() argument
888 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) in iwl_mvm_power_set_ba()
892 mvm->ps_disabled || in iwl_mvm_power_set_ba()
896 return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd, 0); in iwl_mvm_power_set_ba()
899 int iwl_mvm_power_update_ps(struct iwl_mvm *mvm) in iwl_mvm_power_update_ps() argument
902 .mvm = mvm, in iwl_mvm_power_update_ps()
906 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_update_ps()
909 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_update_ps()
913 ret = iwl_mvm_power_set_ps(mvm); in iwl_mvm_power_update_ps()
918 return iwl_mvm_power_set_ba(mvm, vifs.bss_vif); in iwl_mvm_power_update_ps()
923 int iwl_mvm_power_update_mac(struct iwl_mvm *mvm) in iwl_mvm_power_update_mac() argument
926 .mvm = mvm, in iwl_mvm_power_update_mac()
930 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_update_mac()
933 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_update_mac()
937 iwl_mvm_power_set_pm(mvm, &vifs); in iwl_mvm_power_update_mac()
939 ret = iwl_mvm_power_set_ps(mvm); in iwl_mvm_power_update_mac()
944 ret = iwl_mvm_power_send_cmd(mvm, vifs.bss_vif); in iwl_mvm_power_update_mac()
950 ret = iwl_mvm_power_send_cmd(mvm, vifs.p2p_vif); in iwl_mvm_power_update_mac()
956 return iwl_mvm_power_set_ba(mvm, vifs.bss_vif); in iwl_mvm_power_update_mac()