mvm.h (2f876f910b34061b0c4bb744dee3174c9881da1f) mvm.h (a1efeb823084020c31412cc8f2b5d110ad3e58a3)
1/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2/*
3 * Copyright (C) 2012-2014, 2018-2024 Intel Corporation
4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5 * Copyright (C) 2016-2017 Intel Deutschland GmbH
6 */
7#ifndef __IWL_MVM_H__
8#define __IWL_MVM_H__

--- 344 unchanged lines hidden (view full) ---

353 * For the blocking reasons - use iwl_mvm_(un)block_esr(), and for the exit
354 * reasons - use iwl_mvm_exit_esr().
355 *
356 * @IWL_MVM_ESR_BLOCKED_PREVENTION: Prevent EMLSR to avoid entering and exiting
357 * in a loop.
358 * @IWL_MVM_ESR_BLOCKED_WOWLAN: WOWLAN is preventing the enablement of EMLSR
359 * @IWL_MVM_ESR_BLOCKED_TPT: block EMLSR when there is not enough traffic
360 * @IWL_MVM_ESR_BLOCKED_FW: FW didn't recommended/forced exit from EMLSR
1/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2/*
3 * Copyright (C) 2012-2014, 2018-2024 Intel Corporation
4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5 * Copyright (C) 2016-2017 Intel Deutschland GmbH
6 */
7#ifndef __IWL_MVM_H__
8#define __IWL_MVM_H__

--- 344 unchanged lines hidden (view full) ---

353 * For the blocking reasons - use iwl_mvm_(un)block_esr(), and for the exit
354 * reasons - use iwl_mvm_exit_esr().
355 *
356 * @IWL_MVM_ESR_BLOCKED_PREVENTION: Prevent EMLSR to avoid entering and exiting
357 * in a loop.
358 * @IWL_MVM_ESR_BLOCKED_WOWLAN: WOWLAN is preventing the enablement of EMLSR
359 * @IWL_MVM_ESR_BLOCKED_TPT: block EMLSR when there is not enough traffic
360 * @IWL_MVM_ESR_BLOCKED_FW: FW didn't recommended/forced exit from EMLSR
361 * @IWL_MVM_ESR_BLOCKED_NON_BSS: An active non-bssid link's preventing EMLSR
361 * @IWL_MVM_ESR_EXIT_MISSED_BEACON: exited EMLSR due to missed beacons
362 * @IWL_MVM_ESR_EXIT_LOW_RSSI: link is deactivated/not allowed for EMLSR
363 * due to low RSSI.
364 * @IWL_MVM_ESR_EXIT_COEX: link is deactivated/not allowed for EMLSR
365 * due to BT Coex.
366 * @IWL_MVM_ESR_EXIT_BANDWIDTH: Bandwidths of primary and secondry links
367 * preventing the enablement of EMLSR
368 * @IWL_MVM_ESR_EXIT_CSA: CSA happened, so exit EMLSR
369 */
370enum iwl_mvm_esr_state {
371 IWL_MVM_ESR_BLOCKED_PREVENTION = 0x1,
372 IWL_MVM_ESR_BLOCKED_WOWLAN = 0x2,
373 IWL_MVM_ESR_BLOCKED_TPT = 0x4,
374 IWL_MVM_ESR_BLOCKED_FW = 0x8,
362 * @IWL_MVM_ESR_EXIT_MISSED_BEACON: exited EMLSR due to missed beacons
363 * @IWL_MVM_ESR_EXIT_LOW_RSSI: link is deactivated/not allowed for EMLSR
364 * due to low RSSI.
365 * @IWL_MVM_ESR_EXIT_COEX: link is deactivated/not allowed for EMLSR
366 * due to BT Coex.
367 * @IWL_MVM_ESR_EXIT_BANDWIDTH: Bandwidths of primary and secondry links
368 * preventing the enablement of EMLSR
369 * @IWL_MVM_ESR_EXIT_CSA: CSA happened, so exit EMLSR
370 */
371enum iwl_mvm_esr_state {
372 IWL_MVM_ESR_BLOCKED_PREVENTION = 0x1,
373 IWL_MVM_ESR_BLOCKED_WOWLAN = 0x2,
374 IWL_MVM_ESR_BLOCKED_TPT = 0x4,
375 IWL_MVM_ESR_BLOCKED_FW = 0x8,
376 IWL_MVM_ESR_BLOCKED_NON_BSS = 0x10,
375 IWL_MVM_ESR_EXIT_MISSED_BEACON = 0x10000,
376 IWL_MVM_ESR_EXIT_LOW_RSSI = 0x20000,
377 IWL_MVM_ESR_EXIT_COEX = 0x40000,
378 IWL_MVM_ESR_EXIT_BANDWIDTH = 0x80000,
379 IWL_MVM_ESR_EXIT_CSA = 0x100000,
380};
381
382#define IWL_MVM_BLOCK_ESR_REASONS 0xffff

--- 2500 unchanged lines hidden (view full) ---

2883 struct ieee80211_vif *vif,
2884 int duration, u32 activity);
2885
2886/* EMLSR */
2887bool iwl_mvm_vif_has_esr_cap(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
2888void iwl_mvm_block_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
2889 enum iwl_mvm_esr_state reason,
2890 u8 link_to_keep);
377 IWL_MVM_ESR_EXIT_MISSED_BEACON = 0x10000,
378 IWL_MVM_ESR_EXIT_LOW_RSSI = 0x20000,
379 IWL_MVM_ESR_EXIT_COEX = 0x40000,
380 IWL_MVM_ESR_EXIT_BANDWIDTH = 0x80000,
381 IWL_MVM_ESR_EXIT_CSA = 0x100000,
382};
383
384#define IWL_MVM_BLOCK_ESR_REASONS 0xffff

--- 2500 unchanged lines hidden (view full) ---

2885 struct ieee80211_vif *vif,
2886 int duration, u32 activity);
2887
2888/* EMLSR */
2889bool iwl_mvm_vif_has_esr_cap(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
2890void iwl_mvm_block_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
2891 enum iwl_mvm_esr_state reason,
2892 u8 link_to_keep);
2893int iwl_mvm_block_esr_sync(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
2894 enum iwl_mvm_esr_state reason);
2891void iwl_mvm_unblock_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
2892 enum iwl_mvm_esr_state reason);
2893void iwl_mvm_exit_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
2894 enum iwl_mvm_esr_state reason,
2895 u8 link_to_keep);
2896s8 iwl_mvm_get_esr_rssi_thresh(struct iwl_mvm *mvm,
2897 const struct cfg80211_chan_def *chandef,
2898 bool low);
2899void iwl_mvm_bt_coex_update_link_esr(struct iwl_mvm *mvm,
2900 struct ieee80211_vif *vif,
2901 int link_id);
2902bool
2903iwl_mvm_bt_coex_calculate_esr_mode(struct iwl_mvm *mvm,
2904 struct ieee80211_vif *vif,
2905 s32 link_rssi,
2906 bool primary);
2895void iwl_mvm_unblock_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
2896 enum iwl_mvm_esr_state reason);
2897void iwl_mvm_exit_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
2898 enum iwl_mvm_esr_state reason,
2899 u8 link_to_keep);
2900s8 iwl_mvm_get_esr_rssi_thresh(struct iwl_mvm *mvm,
2901 const struct cfg80211_chan_def *chandef,
2902 bool low);
2903void iwl_mvm_bt_coex_update_link_esr(struct iwl_mvm *mvm,
2904 struct ieee80211_vif *vif,
2905 int link_id);
2906bool
2907iwl_mvm_bt_coex_calculate_esr_mode(struct iwl_mvm *mvm,
2908 struct ieee80211_vif *vif,
2909 s32 link_rssi,
2910 bool primary);
2911int iwl_mvm_esr_non_bss_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
2912 unsigned int link_id, bool active);
2907#endif /* __IWL_MVM_H__ */
2913#endif /* __IWL_MVM_H__ */