Skip to content

Commit 05f10da

Browse files
yedidyaBenshjmberg-intel
authored andcommitted
wifi: iwlwifi: mvm: Add active EMLSR blocking reasons prints
Upon adding/removing an EMLSR blocking reason add to the print the EMLSR disabling mask Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240506095953.1e34fe2c3e51.Ia7db0392d81818ceb70a7b199d3f5fa8a4ad198d@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent b5b0cb5 commit 05f10da

1 file changed

Lines changed: 24 additions & 12 deletions

File tree

  • drivers/net/wireless/intel/iwlwifi/mvm

drivers/net/wireless/intel/iwlwifi/mvm/link.c

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ static const char *iwl_get_esr_state_string(enum iwl_mvm_esr_state state)
3333
return iwl_mvm_esr_states_names[offs];
3434
}
3535

36+
static void iwl_mvm_print_esr_state(struct iwl_mvm *mvm, u32 mask)
37+
{
38+
#define NAME_FMT(x) "%s"
39+
#define NAME_PR(x) (mask & IWL_MVM_ESR_##x) ? "[" #x "]" : "",
40+
IWL_DEBUG_INFO(mvm,
41+
"EMLSR state = " HANDLE_ESR_REASONS(NAME_FMT)
42+
" (0x%x)\n",
43+
HANDLE_ESR_REASONS(NAME_PR)
44+
mask);
45+
#undef NAME_FMT
46+
#undef NAME_PR
47+
}
48+
3649
static u32 iwl_mvm_get_free_fw_link_id(struct iwl_mvm *mvm,
3750
struct iwl_mvm_vif *mvm_vif)
3851
{
@@ -708,16 +721,12 @@ iwl_mvm_esr_disallowed_with_link(struct ieee80211_vif *vif,
708721
if (conf->csa_active)
709722
ret |= IWL_MVM_ESR_EXIT_CSA;
710723

711-
#define NAME_FMT(x) "%s"
712-
#define NAME_PR(x) (ret & IWL_MVM_ESR_##x) ? "[" #x "]" : "",
713-
714-
if (ret)
724+
if (ret) {
715725
IWL_DEBUG_INFO(mvm,
716-
"Link %d is not allowed for esr. reason = "
717-
HANDLE_ESR_REASONS(NAME_FMT) " (0x%x)\n",
718-
link->link_id,
719-
HANDLE_ESR_REASONS(NAME_PR)
720-
ret);
726+
"Link %d is not allowed for esr\n",
727+
link->link_id);
728+
iwl_mvm_print_esr_state(mvm, ret);
729+
}
721730
return ret;
722731
}
723732

@@ -1010,10 +1019,12 @@ void iwl_mvm_block_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
10101019
if (WARN_ON(!(reason & IWL_MVM_BLOCK_ESR_REASONS)))
10111020
return;
10121021

1013-
if (!(mvmvif->esr_disable_reason & reason))
1022+
if (!(mvmvif->esr_disable_reason & reason)) {
10141023
IWL_DEBUG_INFO(mvm,
10151024
"Blocking EMLSR mode. reason = %s (0x%x)\n",
10161025
iwl_get_esr_state_string(reason), reason);
1026+
iwl_mvm_print_esr_state(mvm, mvmvif->esr_disable_reason);
1027+
}
10171028

10181029
mvmvif->esr_disable_reason |= reason;
10191030

@@ -1098,11 +1109,12 @@ void iwl_mvm_unblock_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
10981109
if (!(mvmvif->esr_disable_reason & reason))
10991110
return;
11001111

1112+
mvmvif->esr_disable_reason &= ~reason;
1113+
11011114
IWL_DEBUG_INFO(mvm,
11021115
"Unblocking EMLSR mode. reason = %s (0x%x)\n",
11031116
iwl_get_esr_state_string(reason), reason);
1104-
1105-
mvmvif->esr_disable_reason &= ~reason;
1117+
iwl_mvm_print_esr_state(mvm, mvmvif->esr_disable_reason);
11061118

11071119
if (!mvmvif->esr_disable_reason)
11081120
iwl_mvm_esr_unblocked(mvm, vif);

0 commit comments

Comments
 (0)