Lines Matching refs:mvm

80 int iwl_mvm_beacon_filter_send_cmd(struct iwl_mvm *mvm,  in iwl_mvm_beacon_filter_send_cmd()  argument
86 IWL_DEBUG_POWER(mvm, "ba_enable_beacon_abort is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
88 IWL_DEBUG_POWER(mvm, "ba_escape_timer is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
90 IWL_DEBUG_POWER(mvm, "bf_debug_flag is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
92 IWL_DEBUG_POWER(mvm, "bf_enable_beacon_filter is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
94 IWL_DEBUG_POWER(mvm, "bf_energy_delta is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
96 IWL_DEBUG_POWER(mvm, "bf_escape_timer is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
98 IWL_DEBUG_POWER(mvm, "bf_roaming_energy_delta is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
100 IWL_DEBUG_POWER(mvm, "bf_roaming_state is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
102 IWL_DEBUG_POWER(mvm, "bf_temp_threshold is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
104 IWL_DEBUG_POWER(mvm, "bf_temp_fast_filter is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
106 IWL_DEBUG_POWER(mvm, "bf_temp_slow_filter is: %d\n", in iwl_mvm_beacon_filter_send_cmd()
108 IWL_DEBUG_POWER(mvm, "bf_threshold_absolute_low is: %d, %d\n", in iwl_mvm_beacon_filter_send_cmd()
112 IWL_DEBUG_POWER(mvm, "bf_threshold_absolute_high is: %d, %d\n", in iwl_mvm_beacon_filter_send_cmd()
116 if (fw_has_api(&mvm->fw->ucode_capa, in iwl_mvm_beacon_filter_send_cmd()
123 return iwl_mvm_send_cmd_pdu(mvm, REPLY_BEACON_FILTERING_CMD, flags, in iwl_mvm_beacon_filter_send_cmd()
128 void iwl_mvm_beacon_filter_set_cqm_params(struct iwl_mvm *mvm, in iwl_mvm_beacon_filter_set_cqm_params() argument
144 static void iwl_mvm_power_log(struct iwl_mvm *mvm, in iwl_mvm_power_log() argument
147 IWL_DEBUG_POWER(mvm, in iwl_mvm_power_log()
151 IWL_DEBUG_POWER(mvm, "Keep alive = %u sec\n", in iwl_mvm_power_log()
155 IWL_DEBUG_POWER(mvm, "Disable power management\n"); in iwl_mvm_power_log()
159 IWL_DEBUG_POWER(mvm, "Rx timeout = %u usec\n", in iwl_mvm_power_log()
161 IWL_DEBUG_POWER(mvm, "Tx timeout = %u usec\n", in iwl_mvm_power_log()
164 IWL_DEBUG_POWER(mvm, "DTIM periods to skip = %u\n", in iwl_mvm_power_log()
167 IWL_DEBUG_POWER(mvm, "LP RX RSSI threshold = %u\n", in iwl_mvm_power_log()
170 IWL_DEBUG_POWER(mvm, "uAPSD enabled\n"); in iwl_mvm_power_log()
171 IWL_DEBUG_POWER(mvm, "Rx timeout (uAPSD) = %u usec\n", in iwl_mvm_power_log()
173 IWL_DEBUG_POWER(mvm, "Tx timeout (uAPSD) = %u usec\n", in iwl_mvm_power_log()
175 IWL_DEBUG_POWER(mvm, "QNDP TID = %d\n", cmd->qndp_tid); in iwl_mvm_power_log()
176 IWL_DEBUG_POWER(mvm, "ACs flags = 0x%x\n", cmd->uapsd_ac_flags); in iwl_mvm_power_log()
177 IWL_DEBUG_POWER(mvm, "Max SP = %d\n", cmd->uapsd_max_sp); in iwl_mvm_power_log()
181 static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm, in iwl_mvm_power_configure_uapsd() argument
201 if (mvm->fwrt.cur_fw_img != IWL_UCODE_WOWLAN) in iwl_mvm_power_configure_uapsd()
236 (mvm->fwrt.cur_fw_img == IWL_UCODE_WOWLAN) ? in iwl_mvm_power_configure_uapsd()
241 cmd->uapsd_max_sp = mvm->hw->uapsd_max_sp_len; in iwl_mvm_power_configure_uapsd()
243 if (mvm->fwrt.cur_fw_img == IWL_UCODE_WOWLAN || cmd->flags & in iwl_mvm_power_configure_uapsd()
293 static bool iwl_mvm_power_allow_uapsd(struct iwl_mvm *mvm, in iwl_mvm_power_allow_uapsd() argument
315 if (iwl_mvm_phy_ctx_count(mvm) >= 2) in iwl_mvm_power_allow_uapsd()
322 if (!iwl_mvm_is_p2p_scm_uapsd_supported(mvm)) in iwl_mvm_power_allow_uapsd()
325 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_allow_uapsd()
355 static void iwl_mvm_power_config_skip_dtim(struct iwl_mvm *mvm, in iwl_mvm_power_config_skip_dtim() argument
393 static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm, in iwl_mvm_power_build_cmd() argument
419 if (mvm->ps_disabled) in iwl_mvm_power_build_cmd()
428 (!fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_power_build_cmd()
442 iwl_mvm_power_config_skip_dtim(mvm, vif, cmd, host_awake); in iwl_mvm_power_build_cmd()
450 fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_power_build_cmd()
463 if (iwl_mvm_power_allow_uapsd(mvm, vif)) in iwl_mvm_power_build_cmd()
464 iwl_mvm_power_configure_uapsd(mvm, vif, cmd); in iwl_mvm_power_build_cmd()
512 static int iwl_mvm_power_send_cmd(struct iwl_mvm *mvm, in iwl_mvm_power_send_cmd() argument
517 iwl_mvm_power_build_cmd(mvm, vif, &cmd, in iwl_mvm_power_send_cmd()
518 mvm->fwrt.cur_fw_img != IWL_UCODE_WOWLAN); in iwl_mvm_power_send_cmd()
519 iwl_mvm_power_log(mvm, &cmd); in iwl_mvm_power_send_cmd()
524 return iwl_mvm_send_cmd_pdu(mvm, MAC_PM_POWER_TABLE, 0, in iwl_mvm_power_send_cmd()
528 int iwl_mvm_power_update_device(struct iwl_mvm *mvm) in iwl_mvm_power_update_device() argument
535 mvm->ps_disabled = true; in iwl_mvm_power_update_device()
537 if (!mvm->ps_disabled) in iwl_mvm_power_update_device()
541 if ((mvm->fwrt.cur_fw_img == IWL_UCODE_WOWLAN) ? in iwl_mvm_power_update_device()
542 mvm->disable_power_off_d3 : mvm->disable_power_off) in iwl_mvm_power_update_device()
546 if (mvm->ext_clock_valid) in iwl_mvm_power_update_device()
549 IWL_DEBUG_POWER(mvm, in iwl_mvm_power_update_device()
553 return iwl_mvm_send_cmd_pdu(mvm, POWER_TABLE_CMD, 0, sizeof(cmd), in iwl_mvm_power_update_device()
557 void iwl_mvm_power_vif_assoc(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_power_vif_assoc() argument
580 void iwl_mvm_power_uapsd_misbehaving_ap_notif(struct iwl_mvm *mvm, in iwl_mvm_power_uapsd_misbehaving_ap_notif() argument
588 mvm->hw, IEEE80211_IFACE_ITER_NORMAL, in iwl_mvm_power_uapsd_misbehaving_ap_notif()
593 struct iwl_mvm *mvm; member
669 static void iwl_mvm_power_set_pm(struct iwl_mvm *mvm, in iwl_mvm_power_set_pm() argument
678 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_set_pm()
681 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_set_pm()
696 if (iwl_mvm_tdls_sta_count(mvm, NULL)) in iwl_mvm_power_set_pm()
739 int iwl_mvm_power_mac_dbgfs_read(struct iwl_mvm *mvm, in iwl_mvm_power_mac_dbgfs_read() argument
747 mutex_lock(&mvm->mutex); in iwl_mvm_power_mac_dbgfs_read()
749 mutex_unlock(&mvm->mutex); in iwl_mvm_power_mac_dbgfs_read()
848 static int _iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, in _iwl_mvm_enable_beacon_filter() argument
856 if (mvmvif != mvm->bf_allowed_vif || !vif->bss_conf.dtim_period || in _iwl_mvm_enable_beacon_filter()
860 iwl_mvm_beacon_filter_set_cqm_params(mvm, vif, cmd); in _iwl_mvm_enable_beacon_filter()
862 ret = iwl_mvm_beacon_filter_send_cmd(mvm, cmd, cmd_flags); in _iwl_mvm_enable_beacon_filter()
870 int iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, in iwl_mvm_enable_beacon_filter() argument
879 return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd, flags); in iwl_mvm_enable_beacon_filter()
882 static int _iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, in _iwl_mvm_disable_beacon_filter() argument
893 ret = iwl_mvm_beacon_filter_send_cmd(mvm, &cmd, flags); in _iwl_mvm_disable_beacon_filter()
901 int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, in iwl_mvm_disable_beacon_filter() argument
905 return _iwl_mvm_disable_beacon_filter(mvm, vif, flags); in iwl_mvm_disable_beacon_filter()
908 static int iwl_mvm_power_set_ps(struct iwl_mvm *mvm) in iwl_mvm_power_set_ps() argument
916 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_set_ps()
922 if (mvm->ps_disabled != disable_ps) { in iwl_mvm_power_set_ps()
923 bool old_ps_disabled = mvm->ps_disabled; in iwl_mvm_power_set_ps()
925 mvm->ps_disabled = disable_ps; in iwl_mvm_power_set_ps()
926 ret = iwl_mvm_power_update_device(mvm); in iwl_mvm_power_set_ps()
928 mvm->ps_disabled = old_ps_disabled; in iwl_mvm_power_set_ps()
936 static int iwl_mvm_power_set_ba(struct iwl_mvm *mvm, in iwl_mvm_power_set_ba() argument
948 if (mvm->fwrt.cur_fw_img == IWL_UCODE_WOWLAN) in iwl_mvm_power_set_ba()
952 mvm->ps_disabled || in iwl_mvm_power_set_ba()
956 return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd, 0); in iwl_mvm_power_set_ba()
959 int iwl_mvm_power_update_ps(struct iwl_mvm *mvm) in iwl_mvm_power_update_ps() argument
962 .mvm = mvm, in iwl_mvm_power_update_ps()
966 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_update_ps()
969 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_update_ps()
973 ret = iwl_mvm_power_set_ps(mvm); in iwl_mvm_power_update_ps()
978 return iwl_mvm_power_set_ba(mvm, vifs.bss_vif); in iwl_mvm_power_update_ps()
983 int iwl_mvm_power_update_mac(struct iwl_mvm *mvm) in iwl_mvm_power_update_mac() argument
986 .mvm = mvm, in iwl_mvm_power_update_mac()
990 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_update_mac()
993 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_update_mac()
997 iwl_mvm_power_set_pm(mvm, &vifs); in iwl_mvm_power_update_mac()
999 ret = iwl_mvm_power_set_ps(mvm); in iwl_mvm_power_update_mac()
1004 ret = iwl_mvm_power_send_cmd(mvm, vifs.bss_vif); in iwl_mvm_power_update_mac()
1010 ret = iwl_mvm_power_send_cmd(mvm, vifs.p2p_vif); in iwl_mvm_power_update_mac()
1016 return iwl_mvm_power_set_ba(mvm, vifs.bss_vif); in iwl_mvm_power_update_mac()