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

1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
3 * Copyright (C) 2012-2014, 2018-2019 Intel Corporation
4 * Copyright (C) 2013-2014 Intel Mobile Communications GmbH
5 * Copyright (C) 2015-2017 Intel Deutschland GmbH
14 #include "iwl-debug.h"
16 #include "iwl-modparams.h"
29 le32_to_cpu(cmd->ba_enable_beacon_abort)); in iwl_mvm_beacon_filter_send_cmd()
31 le32_to_cpu(cmd->ba_escape_timer)); in iwl_mvm_beacon_filter_send_cmd()
33 le32_to_cpu(cmd->bf_debug_flag)); in iwl_mvm_beacon_filter_send_cmd()
35 le32_to_cpu(cmd->bf_enable_beacon_filter)); in iwl_mvm_beacon_filter_send_cmd()
37 le32_to_cpu(cmd->bf_energy_delta)); in iwl_mvm_beacon_filter_send_cmd()
39 le32_to_cpu(cmd->bf_escape_timer)); in iwl_mvm_beacon_filter_send_cmd()
41 le32_to_cpu(cmd->bf_roaming_energy_delta)); in iwl_mvm_beacon_filter_send_cmd()
43 le32_to_cpu(cmd->bf_roaming_state)); in iwl_mvm_beacon_filter_send_cmd()
45 le32_to_cpu(cmd->bf_temp_threshold)); in iwl_mvm_beacon_filter_send_cmd()
47 le32_to_cpu(cmd->bf_temp_fast_filter)); in iwl_mvm_beacon_filter_send_cmd()
49 le32_to_cpu(cmd->bf_temp_slow_filter)); in iwl_mvm_beacon_filter_send_cmd()
51 le32_to_cpu(cmd->bf_threshold_absolute_low[0]), in iwl_mvm_beacon_filter_send_cmd()
52 le32_to_cpu(cmd->bf_threshold_absolute_low[1])); in iwl_mvm_beacon_filter_send_cmd()
55 le32_to_cpu(cmd->bf_threshold_absolute_high[0]), in iwl_mvm_beacon_filter_send_cmd()
56 le32_to_cpu(cmd->bf_threshold_absolute_high[1])); in iwl_mvm_beacon_filter_send_cmd()
58 if (fw_has_api(&mvm->fw->ucode_capa, in iwl_mvm_beacon_filter_send_cmd()
76 if (vif->bss_conf.cqm_rssi_thold) { in iwl_mvm_beacon_filter_set_cqm_params()
77 cmd->bf_energy_delta = in iwl_mvm_beacon_filter_set_cqm_params()
78 cpu_to_le32(vif->bss_conf.cqm_rssi_hyst); in iwl_mvm_beacon_filter_set_cqm_params()
80 cmd->bf_roaming_state = in iwl_mvm_beacon_filter_set_cqm_params()
81 cpu_to_le32(-vif->bss_conf.cqm_rssi_thold); in iwl_mvm_beacon_filter_set_cqm_params()
83 cmd->ba_enable_beacon_abort = cpu_to_le32(mvmvif->bf_data.ba_enabled); in iwl_mvm_beacon_filter_set_cqm_params()
91 cmd->id_and_color, iwlmvm_mod_params.power_scheme, in iwl_mvm_power_log()
92 le16_to_cpu(cmd->flags)); in iwl_mvm_power_log()
94 le16_to_cpu(cmd->keep_alive_seconds)); in iwl_mvm_power_log()
96 if (!(cmd->flags & cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK))) { in iwl_mvm_power_log()
102 le32_to_cpu(cmd->rx_data_timeout)); in iwl_mvm_power_log()
104 le32_to_cpu(cmd->tx_data_timeout)); in iwl_mvm_power_log()
105 if (cmd->flags & cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK)) in iwl_mvm_power_log()
107 cmd->skip_dtim_periods); in iwl_mvm_power_log()
108 if (cmd->flags & cpu_to_le16(POWER_FLAGS_LPRX_ENA_MSK)) in iwl_mvm_power_log()
110 cmd->lprx_rssi_threshold); in iwl_mvm_power_log()
111 if (cmd->flags & cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK)) { in iwl_mvm_power_log()
114 le32_to_cpu(cmd->rx_data_timeout_uapsd)); in iwl_mvm_power_log()
116 le32_to_cpu(cmd->tx_data_timeout_uapsd)); 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()
132 /* set advanced pm flag with no uapsd ACs to enable ps-poll */ in iwl_mvm_power_configure_uapsd()
133 if (mvmvif->dbgfs_pm.use_ps_poll) { in iwl_mvm_power_configure_uapsd()
134 cmd->flags |= cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK); in iwl_mvm_power_configure_uapsd()
140 if (!mvmvif->queue_params[ac].uapsd) in iwl_mvm_power_configure_uapsd()
143 if (!test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) in iwl_mvm_power_configure_uapsd()
144 cmd->flags |= in iwl_mvm_power_configure_uapsd()
147 cmd->uapsd_ac_flags |= BIT(ac); in iwl_mvm_power_configure_uapsd()
149 /* QNDP TID - the highest TID with no admission control */ in iwl_mvm_power_configure_uapsd()
150 if (!tid_found && !mvmvif->queue_params[ac].acm) { in iwl_mvm_power_configure_uapsd()
154 cmd->qndp_tid = 6; in iwl_mvm_power_configure_uapsd()
157 cmd->qndp_tid = 5; in iwl_mvm_power_configure_uapsd()
160 cmd->qndp_tid = 0; in iwl_mvm_power_configure_uapsd()
163 cmd->qndp_tid = 1; in iwl_mvm_power_configure_uapsd()
169 cmd->flags |= cpu_to_le16(POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK); in iwl_mvm_power_configure_uapsd()
171 if (cmd->uapsd_ac_flags == (BIT(IEEE80211_AC_VO) | in iwl_mvm_power_configure_uapsd()
175 cmd->flags |= cpu_to_le16(POWER_FLAGS_SNOOZE_ENA_MSK); in iwl_mvm_power_configure_uapsd()
176 cmd->snooze_interval = cpu_to_le16(IWL_MVM_PS_SNOOZE_INTERVAL); in iwl_mvm_power_configure_uapsd()
177 cmd->snooze_window = in iwl_mvm_power_configure_uapsd()
178 test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status) ? in iwl_mvm_power_configure_uapsd()
183 cmd->uapsd_max_sp = mvm->hw->uapsd_max_sp_len; in iwl_mvm_power_configure_uapsd()
185 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status) || in iwl_mvm_power_configure_uapsd()
186 cmd->flags & cpu_to_le16(POWER_FLAGS_SNOOZE_ENA_MSK)) { in iwl_mvm_power_configure_uapsd()
187 cmd->rx_data_timeout_uapsd = in iwl_mvm_power_configure_uapsd()
189 cmd->tx_data_timeout_uapsd = in iwl_mvm_power_configure_uapsd()
192 cmd->rx_data_timeout_uapsd = in iwl_mvm_power_configure_uapsd()
194 cmd->tx_data_timeout_uapsd = in iwl_mvm_power_configure_uapsd()
198 if (cmd->flags & cpu_to_le16(POWER_FLAGS_SNOOZE_ENA_MSK)) { in iwl_mvm_power_configure_uapsd()
199 cmd->heavy_tx_thld_packets = in iwl_mvm_power_configure_uapsd()
201 cmd->heavy_rx_thld_packets = in iwl_mvm_power_configure_uapsd()
204 cmd->heavy_tx_thld_packets = in iwl_mvm_power_configure_uapsd()
206 cmd->heavy_rx_thld_packets = in iwl_mvm_power_configure_uapsd()
209 cmd->heavy_tx_thld_percentage = in iwl_mvm_power_configure_uapsd()
211 cmd->heavy_rx_thld_percentage = in iwl_mvm_power_configure_uapsd()
226 if (vif->bss_conf.assoc) in iwl_mvm_p2p_standalone_iterator()
240 if (!memcmp(mvmvif->uapsd_misbehaving_bssid, vif->bss_conf.bssid, in iwl_mvm_power_allow_uapsd()
248 if (vif->p2p && in iwl_mvm_power_allow_uapsd()
249 (vif->bss_conf.p2p_noa_attr.oppps_ctwindow & in iwl_mvm_power_allow_uapsd()
254 * Avoid using uAPSD if client is in DCM - in iwl_mvm_power_allow_uapsd()
260 if (vif->p2p) { in iwl_mvm_power_allow_uapsd()
261 /* Allow U-APSD only if p2p is stand alone */ in iwl_mvm_power_allow_uapsd()
267 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_allow_uapsd()
286 chanctx_conf = rcu_dereference(vif->chanctx_conf); in iwl_mvm_power_is_radar()
289 chan = chanctx_conf->def.chan; in iwl_mvm_power_is_radar()
290 radar_detect = chan->flags & IEEE80211_CHAN_RADAR; in iwl_mvm_power_is_radar()
301 int dtimper = vif->bss_conf.dtim_period ?: 1; in iwl_mvm_power_config_skip_dtim()
305 cmd->skip_dtim_periods = 0; in iwl_mvm_power_config_skip_dtim()
306 cmd->flags &= ~cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK); in iwl_mvm_power_config_skip_dtim()
314 if (!test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) { in iwl_mvm_power_config_skip_dtim()
319 int dtimper_tu = dtimper * vif->bss_conf.beacon_int; in iwl_mvm_power_config_skip_dtim()
323 /* configure skip over dtim up to 306TU - 314 msec */ in iwl_mvm_power_config_skip_dtim()
328 cmd->skip_dtim_periods = 1 + skip; in iwl_mvm_power_config_skip_dtim()
329 cmd->flags |= cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK); in iwl_mvm_power_config_skip_dtim()
341 cmd->id_and_color = cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id, in iwl_mvm_power_build_cmd()
342 mvmvif->color)); in iwl_mvm_power_build_cmd()
343 dtimper = vif->bss_conf.dtim_period; in iwl_mvm_power_build_cmd()
344 bi = vif->bss_conf.beacon_int; in iwl_mvm_power_build_cmd()
355 cmd->keep_alive_seconds = cpu_to_le16(keep_alive); in iwl_mvm_power_build_cmd()
357 if (mvm->ps_disabled) in iwl_mvm_power_build_cmd()
360 cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_SAVE_ENA_MSK); in iwl_mvm_power_build_cmd()
362 if (!vif->bss_conf.ps || !mvmvif->pm_enabled) in iwl_mvm_power_build_cmd()
365 if (iwl_mvm_vif_low_latency(mvmvif) && vif->p2p && in iwl_mvm_power_build_cmd()
366 (!fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_power_build_cmd()
371 cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK); in iwl_mvm_power_build_cmd()
373 if (vif->bss_conf.beacon_rate && in iwl_mvm_power_build_cmd()
374 (vif->bss_conf.beacon_rate->bitrate == 10 || in iwl_mvm_power_build_cmd()
375 vif->bss_conf.beacon_rate->bitrate == 60)) { in iwl_mvm_power_build_cmd()
376 cmd->flags |= cpu_to_le16(POWER_FLAGS_LPRX_ENA_MSK); in iwl_mvm_power_build_cmd()
377 cmd->lprx_rssi_threshold = POWER_LPRX_RSSI_THRESHOLD; in iwl_mvm_power_build_cmd()
382 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) { in iwl_mvm_power_build_cmd()
383 cmd->rx_data_timeout = in iwl_mvm_power_build_cmd()
385 cmd->tx_data_timeout = in iwl_mvm_power_build_cmd()
387 } else if (iwl_mvm_vif_low_latency(mvmvif) && vif->p2p && in iwl_mvm_power_build_cmd()
388 fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_power_build_cmd()
390 cmd->tx_data_timeout = in iwl_mvm_power_build_cmd()
392 cmd->rx_data_timeout = in iwl_mvm_power_build_cmd()
395 cmd->rx_data_timeout = in iwl_mvm_power_build_cmd()
397 cmd->tx_data_timeout = in iwl_mvm_power_build_cmd()
405 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_KEEP_ALIVE) in iwl_mvm_power_build_cmd()
406 cmd->keep_alive_seconds = in iwl_mvm_power_build_cmd()
407 cpu_to_le16(mvmvif->dbgfs_pm.keep_alive_seconds); in iwl_mvm_power_build_cmd()
408 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_SKIP_OVER_DTIM) { in iwl_mvm_power_build_cmd()
409 if (mvmvif->dbgfs_pm.skip_over_dtim) in iwl_mvm_power_build_cmd()
410 cmd->flags |= in iwl_mvm_power_build_cmd()
413 cmd->flags &= in iwl_mvm_power_build_cmd()
416 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_RX_DATA_TIMEOUT) in iwl_mvm_power_build_cmd()
417 cmd->rx_data_timeout = in iwl_mvm_power_build_cmd()
418 cpu_to_le32(mvmvif->dbgfs_pm.rx_data_timeout); in iwl_mvm_power_build_cmd()
419 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_TX_DATA_TIMEOUT) in iwl_mvm_power_build_cmd()
420 cmd->tx_data_timeout = in iwl_mvm_power_build_cmd()
421 cpu_to_le32(mvmvif->dbgfs_pm.tx_data_timeout); in iwl_mvm_power_build_cmd()
422 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_SKIP_DTIM_PERIODS) in iwl_mvm_power_build_cmd()
423 cmd->skip_dtim_periods = mvmvif->dbgfs_pm.skip_dtim_periods; in iwl_mvm_power_build_cmd()
424 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_LPRX_ENA) { in iwl_mvm_power_build_cmd()
425 if (mvmvif->dbgfs_pm.lprx_ena) in iwl_mvm_power_build_cmd()
426 cmd->flags |= cpu_to_le16(POWER_FLAGS_LPRX_ENA_MSK); in iwl_mvm_power_build_cmd()
428 cmd->flags &= cpu_to_le16(~POWER_FLAGS_LPRX_ENA_MSK); in iwl_mvm_power_build_cmd()
430 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_LPRX_RSSI_THRESHOLD) in iwl_mvm_power_build_cmd()
431 cmd->lprx_rssi_threshold = mvmvif->dbgfs_pm.lprx_rssi_threshold; in iwl_mvm_power_build_cmd()
432 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_SNOOZE_ENABLE) { in iwl_mvm_power_build_cmd()
433 if (mvmvif->dbgfs_pm.snooze_ena) in iwl_mvm_power_build_cmd()
434 cmd->flags |= in iwl_mvm_power_build_cmd()
437 cmd->flags &= in iwl_mvm_power_build_cmd()
440 if (mvmvif->dbgfs_pm.mask & MVM_DEBUGFS_PM_UAPSD_MISBEHAVING) { in iwl_mvm_power_build_cmd()
442 if (mvmvif->dbgfs_pm.uapsd_misbehaving) in iwl_mvm_power_build_cmd()
443 cmd->flags |= cpu_to_le16(flag); in iwl_mvm_power_build_cmd()
445 cmd->flags &= cpu_to_le16(flag); in iwl_mvm_power_build_cmd()
458 memcpy(&iwl_mvm_vif_from_mac80211(vif)->mac_pwr_cmd, &cmd, sizeof(cmd)); in iwl_mvm_power_send_cmd()
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()
498 if (memcmp(vif->bss_conf.bssid, mvmvif->uapsd_misbehaving_bssid, in iwl_mvm_power_vif_assoc()
500 eth_zero_addr(mvmvif->uapsd_misbehaving_bssid); in iwl_mvm_power_vif_assoc()
512 if (mvmvif->ap_sta_id == *ap_sta_id) in iwl_mvm_power_uapsd_misbehav_ap_iterator()
513 memcpy(mvmvif->uapsd_misbehaving_bssid, vif->bss_conf.bssid, in iwl_mvm_power_uapsd_misbehav_ap_iterator()
521 struct iwl_uapsd_misbehaving_ap_notif *notif = (void *)pkt->data; in iwl_mvm_power_uapsd_misbehaving_ap_notif()
522 u8 ap_sta_id = le32_to_cpu(notif->sta_id); in iwl_mvm_power_uapsd_misbehaving_ap_notif()
525 mvm->hw, IEEE80211_IFACE_ITER_NORMAL, in iwl_mvm_power_uapsd_misbehaving_ap_notif()
546 mvmvif->pm_enabled = false; in iwl_mvm_power_disable_pm_iterator()
555 if (mvmvif->phy_ctxt && mvmvif->phy_ctxt->id < NUM_PHY_CTX) in iwl_mvm_power_ps_disabled_iterator()
556 *disable_ps |= mvmvif->ps_disabled; in iwl_mvm_power_ps_disabled_iterator()
564 bool active = mvmvif->phy_ctxt && mvmvif->phy_ctxt->id < NUM_PHY_CTX; in iwl_mvm_power_get_vifs_iterator()
573 WARN_ON(power_iterator->ap_vif); in iwl_mvm_power_get_vifs_iterator()
574 power_iterator->ap_vif = vif; in iwl_mvm_power_get_vifs_iterator()
576 power_iterator->ap_active = true; in iwl_mvm_power_get_vifs_iterator()
581 WARN_ON(power_iterator->monitor_vif); in iwl_mvm_power_get_vifs_iterator()
582 power_iterator->monitor_vif = vif; in iwl_mvm_power_get_vifs_iterator()
584 power_iterator->monitor_active = true; in iwl_mvm_power_get_vifs_iterator()
589 WARN_ON(power_iterator->p2p_vif); in iwl_mvm_power_get_vifs_iterator()
590 power_iterator->p2p_vif = vif; in iwl_mvm_power_get_vifs_iterator()
592 power_iterator->p2p_active = true; in iwl_mvm_power_get_vifs_iterator()
596 power_iterator->bss_vif = vif; in iwl_mvm_power_get_vifs_iterator()
598 power_iterator->bss_active = true; in iwl_mvm_power_get_vifs_iterator()
615 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_set_pm()
618 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_set_pm()
623 if (vifs->bss_vif) in iwl_mvm_power_set_pm()
624 bss_mvmvif = iwl_mvm_vif_from_mac80211(vifs->bss_vif); in iwl_mvm_power_set_pm()
626 if (vifs->p2p_vif) in iwl_mvm_power_set_pm()
627 p2p_mvmvif = iwl_mvm_vif_from_mac80211(vifs->p2p_vif); in iwl_mvm_power_set_pm()
629 if (vifs->ap_vif) in iwl_mvm_power_set_pm()
630 ap_mvmvif = iwl_mvm_vif_from_mac80211(vifs->ap_vif); in iwl_mvm_power_set_pm()
636 /* enable PM on bss if bss stand alone */ in iwl_mvm_power_set_pm()
637 if (vifs->bss_active && !vifs->p2p_active && !vifs->ap_active) { in iwl_mvm_power_set_pm()
638 bss_mvmvif->pm_enabled = true; in iwl_mvm_power_set_pm()
642 /* enable PM on p2p if p2p stand alone */ in iwl_mvm_power_set_pm()
643 if (vifs->p2p_active && !vifs->bss_active && !vifs->ap_active) { in iwl_mvm_power_set_pm()
644 p2p_mvmvif->pm_enabled = true; in iwl_mvm_power_set_pm()
648 if (vifs->bss_active && vifs->p2p_active) in iwl_mvm_power_set_pm()
649 client_same_channel = (bss_mvmvif->phy_ctxt->id == in iwl_mvm_power_set_pm()
650 p2p_mvmvif->phy_ctxt->id); in iwl_mvm_power_set_pm()
651 if (vifs->bss_active && vifs->ap_active) in iwl_mvm_power_set_pm()
652 ap_same_channel = (bss_mvmvif->phy_ctxt->id == in iwl_mvm_power_set_pm()
653 ap_mvmvif->phy_ctxt->id); in iwl_mvm_power_set_pm()
655 /* clients are not stand alone: enable PM if DCM */ in iwl_mvm_power_set_pm()
657 if (vifs->bss_active) in iwl_mvm_power_set_pm()
658 bss_mvmvif->pm_enabled = true; in iwl_mvm_power_set_pm()
659 if (vifs->p2p_active) in iwl_mvm_power_set_pm()
660 p2p_mvmvif->pm_enabled = true; in iwl_mvm_power_set_pm()
668 if (client_same_channel && !vifs->ap_active) { in iwl_mvm_power_set_pm()
670 bss_mvmvif->pm_enabled = true; in iwl_mvm_power_set_pm()
671 p2p_mvmvif->pm_enabled = true; in iwl_mvm_power_set_pm()
684 mutex_lock(&mvm->mutex); in iwl_mvm_power_mac_dbgfs_read()
685 memcpy(&cmd, &mvmvif->mac_pwr_cmd, sizeof(cmd)); in iwl_mvm_power_mac_dbgfs_read()
686 mutex_unlock(&mvm->mutex); in iwl_mvm_power_mac_dbgfs_read()
688 pos += scnprintf(buf+pos, bufsz-pos, "power_scheme = %d\n", in iwl_mvm_power_mac_dbgfs_read()
690 pos += scnprintf(buf+pos, bufsz-pos, "flags = 0x%x\n", in iwl_mvm_power_mac_dbgfs_read()
692 pos += scnprintf(buf+pos, bufsz-pos, "keep_alive = %d\n", in iwl_mvm_power_mac_dbgfs_read()
698 pos += scnprintf(buf+pos, bufsz-pos, "skip_over_dtim = %d\n", in iwl_mvm_power_mac_dbgfs_read()
701 pos += scnprintf(buf+pos, bufsz-pos, "skip_dtim_periods = %d\n", in iwl_mvm_power_mac_dbgfs_read()
704 pos += scnprintf(buf+pos, bufsz-pos, "rx_data_timeout = %d\n", in iwl_mvm_power_mac_dbgfs_read()
706 pos += scnprintf(buf+pos, bufsz-pos, "tx_data_timeout = %d\n", in iwl_mvm_power_mac_dbgfs_read()
710 pos += scnprintf(buf+pos, bufsz-pos, in iwl_mvm_power_mac_dbgfs_read()
717 pos += scnprintf(buf+pos, bufsz-pos, "rx_data_timeout_uapsd = %d\n", in iwl_mvm_power_mac_dbgfs_read()
719 pos += scnprintf(buf+pos, bufsz-pos, "tx_data_timeout_uapsd = %d\n", in iwl_mvm_power_mac_dbgfs_read()
721 pos += scnprintf(buf+pos, bufsz-pos, "qndp_tid = %d\n", cmd.qndp_tid); in iwl_mvm_power_mac_dbgfs_read()
722 pos += scnprintf(buf+pos, bufsz-pos, "uapsd_ac_flags = 0x%x\n", in iwl_mvm_power_mac_dbgfs_read()
724 pos += scnprintf(buf+pos, bufsz-pos, "uapsd_max_sp = %d\n", in iwl_mvm_power_mac_dbgfs_read()
726 pos += scnprintf(buf+pos, bufsz-pos, "heavy_tx_thld_packets = %d\n", in iwl_mvm_power_mac_dbgfs_read()
728 pos += scnprintf(buf+pos, bufsz-pos, "heavy_rx_thld_packets = %d\n", in iwl_mvm_power_mac_dbgfs_read()
730 pos += scnprintf(buf+pos, bufsz-pos, "heavy_tx_thld_percentage = %d\n", in iwl_mvm_power_mac_dbgfs_read()
732 pos += scnprintf(buf+pos, bufsz-pos, "heavy_rx_thld_percentage = %d\n", in iwl_mvm_power_mac_dbgfs_read()
734 pos += scnprintf(buf+pos, bufsz-pos, "uapsd_misbehaving_enable = %d\n", in iwl_mvm_power_mac_dbgfs_read()
742 pos += scnprintf(buf+pos, bufsz-pos, "snooze_interval = %d\n", in iwl_mvm_power_mac_dbgfs_read()
744 pos += scnprintf(buf+pos, bufsz-pos, "snooze_window = %d\n", in iwl_mvm_power_mac_dbgfs_read()
755 struct iwl_dbgfs_bf *dbgfs_bf = &mvmvif->dbgfs_bf; in iwl_mvm_beacon_filter_debugfs_parameters()
757 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_ENERGY_DELTA) in iwl_mvm_beacon_filter_debugfs_parameters()
758 cmd->bf_energy_delta = cpu_to_le32(dbgfs_bf->bf_energy_delta); in iwl_mvm_beacon_filter_debugfs_parameters()
759 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_ROAMING_ENERGY_DELTA) in iwl_mvm_beacon_filter_debugfs_parameters()
760 cmd->bf_roaming_energy_delta = in iwl_mvm_beacon_filter_debugfs_parameters()
761 cpu_to_le32(dbgfs_bf->bf_roaming_energy_delta); in iwl_mvm_beacon_filter_debugfs_parameters()
762 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_ROAMING_STATE) in iwl_mvm_beacon_filter_debugfs_parameters()
763 cmd->bf_roaming_state = cpu_to_le32(dbgfs_bf->bf_roaming_state); in iwl_mvm_beacon_filter_debugfs_parameters()
764 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_TEMP_THRESHOLD) in iwl_mvm_beacon_filter_debugfs_parameters()
765 cmd->bf_temp_threshold = in iwl_mvm_beacon_filter_debugfs_parameters()
766 cpu_to_le32(dbgfs_bf->bf_temp_threshold); in iwl_mvm_beacon_filter_debugfs_parameters()
767 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_TEMP_FAST_FILTER) in iwl_mvm_beacon_filter_debugfs_parameters()
768 cmd->bf_temp_fast_filter = in iwl_mvm_beacon_filter_debugfs_parameters()
769 cpu_to_le32(dbgfs_bf->bf_temp_fast_filter); in iwl_mvm_beacon_filter_debugfs_parameters()
770 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_TEMP_SLOW_FILTER) in iwl_mvm_beacon_filter_debugfs_parameters()
771 cmd->bf_temp_slow_filter = in iwl_mvm_beacon_filter_debugfs_parameters()
772 cpu_to_le32(dbgfs_bf->bf_temp_slow_filter); in iwl_mvm_beacon_filter_debugfs_parameters()
773 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_DEBUG_FLAG) in iwl_mvm_beacon_filter_debugfs_parameters()
774 cmd->bf_debug_flag = cpu_to_le32(dbgfs_bf->bf_debug_flag); in iwl_mvm_beacon_filter_debugfs_parameters()
775 if (dbgfs_bf->mask & MVM_DEBUGFS_BF_ESCAPE_TIMER) in iwl_mvm_beacon_filter_debugfs_parameters()
776 cmd->bf_escape_timer = cpu_to_le32(dbgfs_bf->bf_escape_timer); in iwl_mvm_beacon_filter_debugfs_parameters()
777 if (dbgfs_bf->mask & MVM_DEBUGFS_BA_ESCAPE_TIMER) in iwl_mvm_beacon_filter_debugfs_parameters()
778 cmd->ba_escape_timer = cpu_to_le32(dbgfs_bf->ba_escape_timer); in iwl_mvm_beacon_filter_debugfs_parameters()
779 if (dbgfs_bf->mask & MVM_DEBUGFS_BA_ENABLE_BEACON_ABORT) in iwl_mvm_beacon_filter_debugfs_parameters()
780 cmd->ba_enable_beacon_abort = in iwl_mvm_beacon_filter_debugfs_parameters()
781 cpu_to_le32(dbgfs_bf->ba_enable_beacon_abort); in iwl_mvm_beacon_filter_debugfs_parameters()
793 if (mvmvif != mvm->bf_allowed_vif || !vif->bss_conf.dtim_period || in _iwl_mvm_enable_beacon_filter()
794 vif->type != NL80211_IFTYPE_STATION || vif->p2p) in _iwl_mvm_enable_beacon_filter()
802 mvmvif->bf_data.bf_enabled = true; in _iwl_mvm_enable_beacon_filter()
827 if (vif->type != NL80211_IFTYPE_STATION || vif->p2p) in _iwl_mvm_disable_beacon_filter()
833 mvmvif->bf_data.bf_enabled = false; in _iwl_mvm_disable_beacon_filter()
853 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_set_ps()
859 if (mvm->ps_disabled != disable_ps) { in iwl_mvm_power_set_ps()
860 bool old_ps_disabled = mvm->ps_disabled; in iwl_mvm_power_set_ps()
862 mvm->ps_disabled = disable_ps; in iwl_mvm_power_set_ps()
865 mvm->ps_disabled = old_ps_disabled; in iwl_mvm_power_set_ps()
882 if (!mvmvif->bf_data.bf_enabled) in iwl_mvm_power_set_ba()
885 if (test_bit(IWL_MVM_STATUS_IN_D3, &mvm->status)) in iwl_mvm_power_set_ba()
888 mvmvif->bf_data.ba_enabled = !(!mvmvif->pm_enabled || in iwl_mvm_power_set_ba()
889 mvm->ps_disabled || in iwl_mvm_power_set_ba()
890 !vif->bss_conf.ps || in iwl_mvm_power_set_ba()
903 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_update_ps()
906 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_update_ps()
927 lockdep_assert_held(&mvm->mutex); in iwl_mvm_power_update_mac()
930 ieee80211_iterate_active_interfaces_atomic(mvm->hw, in iwl_mvm_power_update_mac()