Lines Matching +full:stand +full:- +full:alone

8  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
9 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
10 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
11 * Copyright (C) 2018 - 2019 Intel Corporation
27 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
31 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
32 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
33 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
34 * Copyright (C) 2018 - 2019 Intel Corporation
72 #include "iwl-debug.h"
74 #include "iwl-modparams.h"
87 le32_to_cpu(cmd->ba_enable_beacon_abort)); in iwl_mvm_beacon_filter_send_cmd()
89 le32_to_cpu(cmd->ba_escape_timer)); in iwl_mvm_beacon_filter_send_cmd()
91 le32_to_cpu(cmd->bf_debug_flag)); in iwl_mvm_beacon_filter_send_cmd()
93 le32_to_cpu(cmd->bf_enable_beacon_filter)); in iwl_mvm_beacon_filter_send_cmd()
95 le32_to_cpu(cmd->bf_energy_delta)); in iwl_mvm_beacon_filter_send_cmd()
97 le32_to_cpu(cmd->bf_escape_timer)); in iwl_mvm_beacon_filter_send_cmd()
99 le32_to_cpu(cmd->bf_roaming_energy_delta)); in iwl_mvm_beacon_filter_send_cmd()
101 le32_to_cpu(cmd->bf_roaming_state)); in iwl_mvm_beacon_filter_send_cmd()
103 le32_to_cpu(cmd->bf_temp_threshold)); in iwl_mvm_beacon_filter_send_cmd()
105 le32_to_cpu(cmd->bf_temp_fast_filter)); in iwl_mvm_beacon_filter_send_cmd()
107 le32_to_cpu(cmd->bf_temp_slow_filter)); in iwl_mvm_beacon_filter_send_cmd()
109 le32_to_cpu(cmd->bf_threshold_absolute_low[0]), in iwl_mvm_beacon_filter_send_cmd()
110 le32_to_cpu(cmd->bf_threshold_absolute_low[1])); in iwl_mvm_beacon_filter_send_cmd()
113 le32_to_cpu(cmd->bf_threshold_absolute_high[0]), in iwl_mvm_beacon_filter_send_cmd()
114 le32_to_cpu(cmd->bf_threshold_absolute_high[1])); in iwl_mvm_beacon_filter_send_cmd()
116 if (fw_has_api(&mvm->fw->ucode_capa, in iwl_mvm_beacon_filter_send_cmd()
134 if (vif->bss_conf.cqm_rssi_thold) { in iwl_mvm_beacon_filter_set_cqm_params()
135 cmd->bf_energy_delta = in iwl_mvm_beacon_filter_set_cqm_params()
136 cpu_to_le32(vif->bss_conf.cqm_rssi_hyst); in iwl_mvm_beacon_filter_set_cqm_params()
138 cmd->bf_roaming_state = in iwl_mvm_beacon_filter_set_cqm_params()
139 cpu_to_le32(-vif->bss_conf.cqm_rssi_thold); in iwl_mvm_beacon_filter_set_cqm_params()
141 cmd->ba_enable_beacon_abort = cpu_to_le32(mvmvif->bf_data.ba_enabled); in iwl_mvm_beacon_filter_set_cqm_params()
149 cmd->id_and_color, iwlmvm_mod_params.power_scheme, in iwl_mvm_power_log()
150 le16_to_cpu(cmd->flags)); in iwl_mvm_power_log()
152 le16_to_cpu(cmd->keep_alive_seconds)); in iwl_mvm_power_log()
154 if (!(cmd->flags & cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK))) { in iwl_mvm_power_log()
160 le32_to_cpu(cmd->rx_data_timeout)); in iwl_mvm_power_log()
162 le32_to_cpu(cmd->tx_data_timeout)); in iwl_mvm_power_log()
163 if (cmd->flags & cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK)) in iwl_mvm_power_log()
165 cmd->skip_dtim_periods); in iwl_mvm_power_log()
166 if (cmd->flags & cpu_to_le16(POWER_FLAGS_LPRX_ENA_MSK)) in iwl_mvm_power_log()
168 cmd->lprx_rssi_threshold); in iwl_mvm_power_log()
169 if (cmd->flags & cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK)) { in iwl_mvm_power_log()
172 le32_to_cpu(cmd->rx_data_timeout_uapsd)); in iwl_mvm_power_log()
174 le32_to_cpu(cmd->tx_data_timeout_uapsd)); 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()
190 /* set advanced pm flag with no uapsd ACs to enable ps-poll */ in iwl_mvm_power_configure_uapsd()
191 if (mvmvif->dbgfs_pm.use_ps_poll) { in iwl_mvm_power_configure_uapsd()
192 cmd->flags |= cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK); in iwl_mvm_power_configure_uapsd()
198 if (!mvmvif->queue_params[ac].uapsd) in iwl_mvm_power_configure_uapsd()
201 if (!test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) in iwl_mvm_power_configure_uapsd()
202 cmd->flags |= in iwl_mvm_power_configure_uapsd()
205 cmd->uapsd_ac_flags |= BIT(ac); in iwl_mvm_power_configure_uapsd()
207 /* QNDP TID - the highest TID with no admission control */ in iwl_mvm_power_configure_uapsd()
208 if (!tid_found && !mvmvif->queue_params[ac].acm) { in iwl_mvm_power_configure_uapsd()
212 cmd->qndp_tid = 6; in iwl_mvm_power_configure_uapsd()
215 cmd->qndp_tid = 5; in iwl_mvm_power_configure_uapsd()
218 cmd->qndp_tid = 0; in iwl_mvm_power_configure_uapsd()
221 cmd->qndp_tid = 1; in iwl_mvm_power_configure_uapsd()
227 cmd->flags |= cpu_to_le16(POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK); in iwl_mvm_power_configure_uapsd()
229 if (cmd->uapsd_ac_flags == (BIT(IEEE80211_AC_VO) | in iwl_mvm_power_configure_uapsd()
233 cmd->flags |= cpu_to_le16(POWER_FLAGS_SNOOZE_ENA_MSK); in iwl_mvm_power_configure_uapsd()
234 cmd->snooze_interval = cpu_to_le16(IWL_MVM_PS_SNOOZE_INTERVAL); in iwl_mvm_power_configure_uapsd()
235 cmd->snooze_window = in iwl_mvm_power_configure_uapsd()
236 test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status) ? 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 (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status) || in iwl_mvm_power_configure_uapsd()
244 cmd->flags & cpu_to_le16(POWER_FLAGS_SNOOZE_ENA_MSK)) { in iwl_mvm_power_configure_uapsd()
245 cmd->rx_data_timeout_uapsd = in iwl_mvm_power_configure_uapsd()
247 cmd->tx_data_timeout_uapsd = in iwl_mvm_power_configure_uapsd()
250 cmd->rx_data_timeout_uapsd = in iwl_mvm_power_configure_uapsd()
252 cmd->tx_data_timeout_uapsd = in iwl_mvm_power_configure_uapsd()
256 if (cmd->flags & cpu_to_le16(POWER_FLAGS_SNOOZE_ENA_MSK)) { in iwl_mvm_power_configure_uapsd()
257 cmd->heavy_tx_thld_packets = in iwl_mvm_power_configure_uapsd()
259 cmd->heavy_rx_thld_packets = in iwl_mvm_power_configure_uapsd()
262 cmd->heavy_tx_thld_packets = in iwl_mvm_power_configure_uapsd()
264 cmd->heavy_rx_thld_packets = in iwl_mvm_power_configure_uapsd()
267 cmd->heavy_tx_thld_percentage = in iwl_mvm_power_configure_uapsd()
269 cmd->heavy_rx_thld_percentage = in iwl_mvm_power_configure_uapsd()
284 if (vif->bss_conf.assoc) in iwl_mvm_p2p_standalone_iterator()
298 if (!memcmp(mvmvif->uapsd_misbehaving_bssid, vif->bss_conf.bssid, in iwl_mvm_power_allow_uapsd()
306 if (vif->p2p && in iwl_mvm_power_allow_uapsd()
307 (vif->bss_conf.p2p_noa_attr.oppps_ctwindow & in iwl_mvm_power_allow_uapsd()
312 * Avoid using uAPSD if client is in DCM - in iwl_mvm_power_allow_uapsd()
318 if (vif->p2p) { in iwl_mvm_power_allow_uapsd()
319 /* Allow U-APSD only if p2p is stand alone */ in iwl_mvm_power_allow_uapsd()
325 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_allow_uapsd()
344 chanctx_conf = rcu_dereference(vif->chanctx_conf); in iwl_mvm_power_is_radar()
347 chan = chanctx_conf->def.chan; in iwl_mvm_power_is_radar()
348 radar_detect = chan->flags & IEEE80211_CHAN_RADAR; in iwl_mvm_power_is_radar()
359 int dtimper = vif->bss_conf.dtim_period ?: 1; in iwl_mvm_power_config_skip_dtim()
363 cmd->skip_dtim_periods = 0; in iwl_mvm_power_config_skip_dtim()
364 cmd->flags &= ~cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK); in iwl_mvm_power_config_skip_dtim()
372 if (!test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) { in iwl_mvm_power_config_skip_dtim()
377 int dtimper_tu = dtimper * vif->bss_conf.beacon_int; in iwl_mvm_power_config_skip_dtim()
381 /* configure skip over dtim up to 306TU - 314 msec */ in iwl_mvm_power_config_skip_dtim()
386 cmd->skip_dtim_periods = 1 + skip; in iwl_mvm_power_config_skip_dtim()
387 cmd->flags |= cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK); in iwl_mvm_power_config_skip_dtim()
399 cmd->id_and_color = cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id, in iwl_mvm_power_build_cmd()
400 mvmvif->color)); in iwl_mvm_power_build_cmd()
401 dtimper = vif->bss_conf.dtim_period; in iwl_mvm_power_build_cmd()
402 bi = vif->bss_conf.beacon_int; in iwl_mvm_power_build_cmd()
413 cmd->keep_alive_seconds = cpu_to_le16(keep_alive); in iwl_mvm_power_build_cmd()
415 if (mvm->ps_disabled) in iwl_mvm_power_build_cmd()
418 cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_SAVE_ENA_MSK); in iwl_mvm_power_build_cmd()
420 if (!vif->bss_conf.ps || !mvmvif->pm_enabled) in iwl_mvm_power_build_cmd()
423 if (iwl_mvm_vif_low_latency(mvmvif) && vif->p2p && in iwl_mvm_power_build_cmd()
424 (!fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_power_build_cmd()
429 cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK); in iwl_mvm_power_build_cmd()
431 if (vif->bss_conf.beacon_rate && in iwl_mvm_power_build_cmd()
432 (vif->bss_conf.beacon_rate->bitrate == 10 || in iwl_mvm_power_build_cmd()
433 vif->bss_conf.beacon_rate->bitrate == 60)) { in iwl_mvm_power_build_cmd()
434 cmd->flags |= cpu_to_le16(POWER_FLAGS_LPRX_ENA_MSK); in iwl_mvm_power_build_cmd()
435 cmd->lprx_rssi_threshold = POWER_LPRX_RSSI_THRESHOLD; in iwl_mvm_power_build_cmd()
440 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) { in iwl_mvm_power_build_cmd()
441 cmd->rx_data_timeout = in iwl_mvm_power_build_cmd()
443 cmd->tx_data_timeout = in iwl_mvm_power_build_cmd()
445 } else if (iwl_mvm_vif_low_latency(mvmvif) && vif->p2p && in iwl_mvm_power_build_cmd()
446 fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_power_build_cmd()
448 cmd->tx_data_timeout = in iwl_mvm_power_build_cmd()
450 cmd->rx_data_timeout = in iwl_mvm_power_build_cmd()
453 cmd->rx_data_timeout = in iwl_mvm_power_build_cmd()
455 cmd->tx_data_timeout = in iwl_mvm_power_build_cmd()
463 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_KEEP_ALIVE) in iwl_mvm_power_build_cmd()
464 cmd->keep_alive_seconds = in iwl_mvm_power_build_cmd()
465 cpu_to_le16(mvmvif->dbgfs_pm.keep_alive_seconds); in iwl_mvm_power_build_cmd()
466 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_SKIP_OVER_DTIM) { in iwl_mvm_power_build_cmd()
467 if (mvmvif->dbgfs_pm.skip_over_dtim) in iwl_mvm_power_build_cmd()
468 cmd->flags |= in iwl_mvm_power_build_cmd()
471 cmd->flags &= in iwl_mvm_power_build_cmd()
474 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_RX_DATA_TIMEOUT) in iwl_mvm_power_build_cmd()
475 cmd->rx_data_timeout = in iwl_mvm_power_build_cmd()
476 cpu_to_le32(mvmvif->dbgfs_pm.rx_data_timeout); in iwl_mvm_power_build_cmd()
477 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_TX_DATA_TIMEOUT) in iwl_mvm_power_build_cmd()
478 cmd->tx_data_timeout = in iwl_mvm_power_build_cmd()
479 cpu_to_le32(mvmvif->dbgfs_pm.tx_data_timeout); in iwl_mvm_power_build_cmd()
480 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_SKIP_DTIM_PERIODS) in iwl_mvm_power_build_cmd()
481 cmd->skip_dtim_periods = mvmvif->dbgfs_pm.skip_dtim_periods; in iwl_mvm_power_build_cmd()
482 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_LPRX_ENA) { in iwl_mvm_power_build_cmd()
483 if (mvmvif->dbgfs_pm.lprx_ena) in iwl_mvm_power_build_cmd()
484 cmd->flags |= cpu_to_le16(POWER_FLAGS_LPRX_ENA_MSK); in iwl_mvm_power_build_cmd()
486 cmd->flags &= cpu_to_le16(~POWER_FLAGS_LPRX_ENA_MSK); in iwl_mvm_power_build_cmd()
488 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_LPRX_RSSI_THRESHOLD) in iwl_mvm_power_build_cmd()
489 cmd->lprx_rssi_threshold = mvmvif->dbgfs_pm.lprx_rssi_threshold; in iwl_mvm_power_build_cmd()
490 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_SNOOZE_ENABLE) { in iwl_mvm_power_build_cmd()
491 if (mvmvif->dbgfs_pm.snooze_ena) in iwl_mvm_power_build_cmd()
492 cmd->flags |= in iwl_mvm_power_build_cmd()
495 cmd->flags &= in iwl_mvm_power_build_cmd()
498 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_UAPSD_MISBEHAVING) { in iwl_mvm_power_build_cmd()
500 if (mvmvif->dbgfs_pm.uapsd_misbehaving) in iwl_mvm_power_build_cmd()
501 cmd->flags |= cpu_to_le16(flag); in iwl_mvm_power_build_cmd()
503 cmd->flags &= cpu_to_le16(flag); in iwl_mvm_power_build_cmd()
516 memcpy(&iwl_mvm_vif_from_mac80211(vif)->mac_pwr_cmd, &cmd, sizeof(cmd)); in iwl_mvm_power_send_cmd()
530 mvm->ps_disabled = true; in iwl_mvm_power_update_device()
532 if (!mvm->ps_disabled) in iwl_mvm_power_update_device()
536 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status) ? in iwl_mvm_power_update_device()
537 mvm->disable_power_off_d3 : mvm->disable_power_off) in iwl_mvm_power_update_device()
541 if (mvm->ext_clock_valid) in iwl_mvm_power_update_device()
556 if (memcmp(vif->bss_conf.bssid, mvmvif->uapsd_misbehaving_bssid, in iwl_mvm_power_vif_assoc()
558 eth_zero_addr(mvmvif->uapsd_misbehaving_bssid); in iwl_mvm_power_vif_assoc()
570 if (mvmvif->ap_sta_id == *ap_sta_id) in iwl_mvm_power_uapsd_misbehav_ap_iterator()
571 memcpy(mvmvif->uapsd_misbehaving_bssid, vif->bss_conf.bssid, in iwl_mvm_power_uapsd_misbehav_ap_iterator()
579 struct iwl_uapsd_misbehaving_ap_notif *notif = (void *)pkt->data; in iwl_mvm_power_uapsd_misbehaving_ap_notif()
580 u8 ap_sta_id = le32_to_cpu(notif->sta_id); in iwl_mvm_power_uapsd_misbehaving_ap_notif()
583 mvm->hw, IEEE80211_IFACE_ITER_NORMAL, in iwl_mvm_power_uapsd_misbehaving_ap_notif()
604 mvmvif->pm_enabled = false; in iwl_mvm_power_disable_pm_iterator()
613 if (mvmvif->phy_ctxt && mvmvif->phy_ctxt->id < NUM_PHY_CTX) in iwl_mvm_power_ps_disabled_iterator()
614 *disable_ps |= mvmvif->ps_disabled; in iwl_mvm_power_ps_disabled_iterator()
622 bool active = mvmvif->phy_ctxt && mvmvif->phy_ctxt->id < NUM_PHY_CTX; in iwl_mvm_power_get_vifs_iterator()
631 WARN_ON(power_iterator->ap_vif); in iwl_mvm_power_get_vifs_iterator()
632 power_iterator->ap_vif = vif; in iwl_mvm_power_get_vifs_iterator()
634 power_iterator->ap_active = true; in iwl_mvm_power_get_vifs_iterator()
639 WARN_ON(power_iterator->monitor_vif); in iwl_mvm_power_get_vifs_iterator()
640 power_iterator->monitor_vif = vif; in iwl_mvm_power_get_vifs_iterator()
642 power_iterator->monitor_active = true; in iwl_mvm_power_get_vifs_iterator()
647 WARN_ON(power_iterator->p2p_vif); in iwl_mvm_power_get_vifs_iterator()
648 power_iterator->p2p_vif = vif; in iwl_mvm_power_get_vifs_iterator()
650 power_iterator->p2p_active = true; in iwl_mvm_power_get_vifs_iterator()
654 power_iterator->bss_vif = vif; in iwl_mvm_power_get_vifs_iterator()
656 power_iterator->bss_active = true; in iwl_mvm_power_get_vifs_iterator()
673 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_set_pm()
676 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_set_pm()
681 if (vifs->bss_vif) in iwl_mvm_power_set_pm()
682 bss_mvmvif = iwl_mvm_vif_from_mac80211(vifs->bss_vif); in iwl_mvm_power_set_pm()
684 if (vifs->p2p_vif) in iwl_mvm_power_set_pm()
685 p2p_mvmvif = iwl_mvm_vif_from_mac80211(vifs->p2p_vif); in iwl_mvm_power_set_pm()
687 if (vifs->ap_vif) in iwl_mvm_power_set_pm()
688 ap_mvmvif = iwl_mvm_vif_from_mac80211(vifs->ap_vif); in iwl_mvm_power_set_pm()
694 /* enable PM on bss if bss stand alone */ in iwl_mvm_power_set_pm()
695 if (vifs->bss_active && !vifs->p2p_active && !vifs->ap_active) { in iwl_mvm_power_set_pm()
696 bss_mvmvif->pm_enabled = true; in iwl_mvm_power_set_pm()
700 /* enable PM on p2p if p2p stand alone */ in iwl_mvm_power_set_pm()
701 if (vifs->p2p_active && !vifs->bss_active && !vifs->ap_active) { in iwl_mvm_power_set_pm()
702 p2p_mvmvif->pm_enabled = true; in iwl_mvm_power_set_pm()
706 if (vifs->bss_active && vifs->p2p_active) in iwl_mvm_power_set_pm()
707 client_same_channel = (bss_mvmvif->phy_ctxt->id == in iwl_mvm_power_set_pm()
708 p2p_mvmvif->phy_ctxt->id); in iwl_mvm_power_set_pm()
709 if (vifs->bss_active && vifs->ap_active) in iwl_mvm_power_set_pm()
710 ap_same_channel = (bss_mvmvif->phy_ctxt->id == in iwl_mvm_power_set_pm()
711 ap_mvmvif->phy_ctxt->id); in iwl_mvm_power_set_pm()
713 /* clients are not stand alone: enable PM if DCM */ in iwl_mvm_power_set_pm()
715 if (vifs->bss_active) in iwl_mvm_power_set_pm()
716 bss_mvmvif->pm_enabled = true; in iwl_mvm_power_set_pm()
717 if (vifs->p2p_active) in iwl_mvm_power_set_pm()
718 p2p_mvmvif->pm_enabled = true; in iwl_mvm_power_set_pm()
726 if (client_same_channel && !vifs->ap_active) { in iwl_mvm_power_set_pm()
728 bss_mvmvif->pm_enabled = true; in iwl_mvm_power_set_pm()
729 p2p_mvmvif->pm_enabled = true; in iwl_mvm_power_set_pm()
742 mutex_lock(&mvm->mutex); in iwl_mvm_power_mac_dbgfs_read()
743 memcpy(&cmd, &mvmvif->mac_pwr_cmd, sizeof(cmd)); in iwl_mvm_power_mac_dbgfs_read()
744 mutex_unlock(&mvm->mutex); in iwl_mvm_power_mac_dbgfs_read()
746 pos += scnprintf(buf+pos, bufsz-pos, "power_scheme = %d\n", in iwl_mvm_power_mac_dbgfs_read()
748 pos += scnprintf(buf+pos, bufsz-pos, "flags = 0x%x\n", in iwl_mvm_power_mac_dbgfs_read()
750 pos += scnprintf(buf+pos, bufsz-pos, "keep_alive = %d\n", in iwl_mvm_power_mac_dbgfs_read()
756 pos += scnprintf(buf+pos, bufsz-pos, "skip_over_dtim = %d\n", in iwl_mvm_power_mac_dbgfs_read()
759 pos += scnprintf(buf+pos, bufsz-pos, "skip_dtim_periods = %d\n", in iwl_mvm_power_mac_dbgfs_read()
762 pos += scnprintf(buf+pos, bufsz-pos, "rx_data_timeout = %d\n", in iwl_mvm_power_mac_dbgfs_read()
764 pos += scnprintf(buf+pos, bufsz-pos, "tx_data_timeout = %d\n", in iwl_mvm_power_mac_dbgfs_read()
768 pos += scnprintf(buf+pos, bufsz-pos, in iwl_mvm_power_mac_dbgfs_read()
775 pos += scnprintf(buf+pos, bufsz-pos, "rx_data_timeout_uapsd = %d\n", in iwl_mvm_power_mac_dbgfs_read()
777 pos += scnprintf(buf+pos, bufsz-pos, "tx_data_timeout_uapsd = %d\n", in iwl_mvm_power_mac_dbgfs_read()
779 pos += scnprintf(buf+pos, bufsz-pos, "qndp_tid = %d\n", cmd.qndp_tid); in iwl_mvm_power_mac_dbgfs_read()
780 pos += scnprintf(buf+pos, bufsz-pos, "uapsd_ac_flags = 0x%x\n", in iwl_mvm_power_mac_dbgfs_read()
782 pos += scnprintf(buf+pos, bufsz-pos, "uapsd_max_sp = %d\n", in iwl_mvm_power_mac_dbgfs_read()
784 pos += scnprintf(buf+pos, bufsz-pos, "heavy_tx_thld_packets = %d\n", in iwl_mvm_power_mac_dbgfs_read()
786 pos += scnprintf(buf+pos, bufsz-pos, "heavy_rx_thld_packets = %d\n", in iwl_mvm_power_mac_dbgfs_read()
788 pos += scnprintf(buf+pos, bufsz-pos, "heavy_tx_thld_percentage = %d\n", in iwl_mvm_power_mac_dbgfs_read()
790 pos += scnprintf(buf+pos, bufsz-pos, "heavy_rx_thld_percentage = %d\n", in iwl_mvm_power_mac_dbgfs_read()
792 pos += scnprintf(buf+pos, bufsz-pos, "uapsd_misbehaving_enable = %d\n", in iwl_mvm_power_mac_dbgfs_read()
800 pos += scnprintf(buf+pos, bufsz-pos, "snooze_interval = %d\n", in iwl_mvm_power_mac_dbgfs_read()
802 pos += scnprintf(buf+pos, bufsz-pos, "snooze_window = %d\n", in iwl_mvm_power_mac_dbgfs_read()
813 struct iwl_dbgfs_bf *dbgfs_bf = &mvmvif->dbgfs_bf; in iwl_mvm_beacon_filter_debugfs_parameters()
815 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_ENERGY_DELTA) in iwl_mvm_beacon_filter_debugfs_parameters()
816 cmd->bf_energy_delta = cpu_to_le32(dbgfs_bf->bf_energy_delta); in iwl_mvm_beacon_filter_debugfs_parameters()
817 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_ROAMING_ENERGY_DELTA) in iwl_mvm_beacon_filter_debugfs_parameters()
818 cmd->bf_roaming_energy_delta = in iwl_mvm_beacon_filter_debugfs_parameters()
819 cpu_to_le32(dbgfs_bf->bf_roaming_energy_delta); in iwl_mvm_beacon_filter_debugfs_parameters()
820 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_ROAMING_STATE) in iwl_mvm_beacon_filter_debugfs_parameters()
821 cmd->bf_roaming_state = cpu_to_le32(dbgfs_bf->bf_roaming_state); in iwl_mvm_beacon_filter_debugfs_parameters()
822 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_TEMP_THRESHOLD) in iwl_mvm_beacon_filter_debugfs_parameters()
823 cmd->bf_temp_threshold = in iwl_mvm_beacon_filter_debugfs_parameters()
824 cpu_to_le32(dbgfs_bf->bf_temp_threshold); in iwl_mvm_beacon_filter_debugfs_parameters()
825 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_TEMP_FAST_FILTER) in iwl_mvm_beacon_filter_debugfs_parameters()
826 cmd->bf_temp_fast_filter = in iwl_mvm_beacon_filter_debugfs_parameters()
827 cpu_to_le32(dbgfs_bf->bf_temp_fast_filter); in iwl_mvm_beacon_filter_debugfs_parameters()
828 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_TEMP_SLOW_FILTER) in iwl_mvm_beacon_filter_debugfs_parameters()
829 cmd->bf_temp_slow_filter = in iwl_mvm_beacon_filter_debugfs_parameters()
830 cpu_to_le32(dbgfs_bf->bf_temp_slow_filter); in iwl_mvm_beacon_filter_debugfs_parameters()
831 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_DEBUG_FLAG) in iwl_mvm_beacon_filter_debugfs_parameters()
832 cmd->bf_debug_flag = cpu_to_le32(dbgfs_bf->bf_debug_flag); in iwl_mvm_beacon_filter_debugfs_parameters()
833 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_ESCAPE_TIMER) in iwl_mvm_beacon_filter_debugfs_parameters()
834 cmd->bf_escape_timer = cpu_to_le32(dbgfs_bf->bf_escape_timer); in iwl_mvm_beacon_filter_debugfs_parameters()
835 if (dbgfs_bf->mask & MVM_DEBUGFS_BA_ESCAPE_TIMER) in iwl_mvm_beacon_filter_debugfs_parameters()
836 cmd->ba_escape_timer = cpu_to_le32(dbgfs_bf->ba_escape_timer); in iwl_mvm_beacon_filter_debugfs_parameters()
837 if (dbgfs_bf->mask & MVM_DEBUGFS_BA_ENABLE_BEACON_ABORT) in iwl_mvm_beacon_filter_debugfs_parameters()
838 cmd->ba_enable_beacon_abort = in iwl_mvm_beacon_filter_debugfs_parameters()
839 cpu_to_le32(dbgfs_bf->ba_enable_beacon_abort); in iwl_mvm_beacon_filter_debugfs_parameters()
851 if (mvmvif != mvm->bf_allowed_vif || !vif->bss_conf.dtim_period || in _iwl_mvm_enable_beacon_filter()
852 vif->type != NL80211_IFTYPE_STATION || vif->p2p) in _iwl_mvm_enable_beacon_filter()
860 mvmvif->bf_data.bf_enabled = true; in _iwl_mvm_enable_beacon_filter()
885 if (vif->type != NL80211_IFTYPE_STATION || vif->p2p) in _iwl_mvm_disable_beacon_filter()
891 mvmvif->bf_data.bf_enabled = false; in _iwl_mvm_disable_beacon_filter()
911 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_set_ps()
917 if (mvm->ps_disabled != disable_ps) { in iwl_mvm_power_set_ps()
918 bool old_ps_disabled = mvm->ps_disabled; in iwl_mvm_power_set_ps()
920 mvm->ps_disabled = disable_ps; in iwl_mvm_power_set_ps()
923 mvm->ps_disabled = old_ps_disabled; in iwl_mvm_power_set_ps()
940 if (!mvmvif->bf_data.bf_enabled) in iwl_mvm_power_set_ba()
943 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) in iwl_mvm_power_set_ba()
946 mvmvif->bf_data.ba_enabled = !(!mvmvif->pm_enabled || in iwl_mvm_power_set_ba()
947 mvm->ps_disabled || in iwl_mvm_power_set_ba()
948 !vif->bss_conf.ps || in iwl_mvm_power_set_ba()
961 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_update_ps()
964 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_update_ps()
985 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_update_mac()
988 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_update_mac()