mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 12:03:54 +02:00
wifi: iwlwifi: mld: fix iwl_mld_emlsr_disallowed_with_link() return
The return type of iwl_mld_emlsr_disallowed_with_link() is a u32 bitmap of exit reasons, but in the data structure confusion case where the warning triggers, it returns false. Add a new reason bit for this case so it doesn't return that EMLSR is possible. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250424153620.d1f8465e2b5e.I58c463c70801231a79b04c1ff600f41afcbb04f5@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
8eac6b3347
commit
9f5332bafe
|
|
@ -59,6 +59,7 @@ enum iwl_mld_emlsr_blocked {
|
|||
* loaded enough to justify EMLSR.
|
||||
* @IWL_MLD_EMLSR_EXIT_RFI: Exit EMLSR due to RFI
|
||||
* @IWL_MLD_EMLSR_EXIT_FW_REQUEST: Exit EMLSR because the FW requested it
|
||||
* @IWL_MLD_EMLSR_EXIT_INVALID: internal exit reason due to invalid data
|
||||
*/
|
||||
enum iwl_mld_emlsr_exit {
|
||||
IWL_MLD_EMLSR_EXIT_BLOCK = 0x1,
|
||||
|
|
@ -72,6 +73,7 @@ enum iwl_mld_emlsr_exit {
|
|||
IWL_MLD_EMLSR_EXIT_CHAN_LOAD = 0x100,
|
||||
IWL_MLD_EMLSR_EXIT_RFI = 0x200,
|
||||
IWL_MLD_EMLSR_EXIT_FW_REQUEST = 0x400,
|
||||
IWL_MLD_EMLSR_EXIT_INVALID = 0x800,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@ static void iwl_mld_print_emlsr_blocked(struct iwl_mld *mld, u32 mask)
|
|||
HOW(BT_COEX) \
|
||||
HOW(CHAN_LOAD) \
|
||||
HOW(RFI) \
|
||||
HOW(FW_REQUEST)
|
||||
HOW(FW_REQUEST) \
|
||||
HOW(INVALID)
|
||||
|
||||
static const char *
|
||||
iwl_mld_get_emlsr_exit_string(enum iwl_mld_emlsr_exit exit)
|
||||
|
|
@ -647,7 +648,7 @@ iwl_mld_emlsr_disallowed_with_link(struct iwl_mld *mld,
|
|||
|
||||
conf = wiphy_dereference(wiphy, vif->link_conf[link->link_id]);
|
||||
if (WARN_ON_ONCE(!conf))
|
||||
return false;
|
||||
return IWL_MLD_EMLSR_EXIT_INVALID;
|
||||
|
||||
if (link->chandef->chan->band == NL80211_BAND_2GHZ && mld->bt_is_active)
|
||||
ret |= IWL_MLD_EMLSR_EXIT_BT_COEX;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user