summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/tests
diff options
context:
space:
mode:
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>2024-05-05 09:19:45 +0300
committerJohannes Berg <johannes.berg@intel.com>2024-05-06 16:33:23 +0200
commit72c19df24a3e352b5eefd6657cf8d4051ccf77c5 (patch)
treeb9441e9dcc81c6fa2a0a9252811034a616f6526c /drivers/net/wireless/intel/iwlwifi/mvm/tests
parent2f324144e075e135991ecad073653176a8dfd000 (diff)
wifi: iwlwifi: cleanup EMLSR when BT is active handling
BT Coex disables EMLSR only for a 2.4 GHz link, but doesn't block the vif from using EMLSR with a different link pair. In addition, storing it in mvmvif:disable_esr_reason requires extracting the BT Coex bit before checking if EMLSR is blocked or not for a specific vif. Therefore, change the BT Coex bit to be an exit reason and not a blocker. On link selection, EMLSR mode will be re-calculated for the 2.4 GHz link instead of checking that bit. While at it, move the relevant function declarations to the EMLSR functions area in mvm.h Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240505091420.a2e93b67c895.I183a0039ef076613144648cc46fbe9ab3d47c574@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/tests')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/tests/links.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tests/links.c b/drivers/net/wireless/intel/iwlwifi/mvm/tests/links.c
index 7446e0c168ee..217dbb823691 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tests/links.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tests/links.c
@@ -37,7 +37,20 @@ static struct cfg80211_bss bss = {};
static struct ieee80211_bss_conf link_conf = {.bss = &bss};
-static struct iwl_mvm mvm = {};
+static const struct iwl_fw_cmd_version entry = {
+ .group = LEGACY_GROUP,
+ .cmd = BT_PROFILE_NOTIFICATION,
+ .notif_ver = 4
+};
+
+static struct iwl_fw fw = {
+ .ucode_capa = {
+ .n_cmd_versions = 1,
+ .cmd_versions = &entry,
+ },
+};
+
+static struct iwl_mvm mvm = {.fw = &fw};
static const struct link_grading_case {
const char *desc;
@@ -217,7 +230,7 @@ kunit_test_suite(link_grading);
static const struct valid_link_pair_case {
const char *desc;
- u32 esr_disable_reason;
+ bool bt;
struct ieee80211_channel *chan_a;
struct ieee80211_channel *chan_b;
enum nl80211_chan_width cw_a;
@@ -240,7 +253,7 @@ static const struct valid_link_pair_case {
},
{
.desc = "LB + HB, with BT.",
- .esr_disable_reason = 0x1,
+ .bt = true,
.chan_a = &chan_2ghz,
.chan_b = &chan_5ghz,
.valid = false,
@@ -370,7 +383,7 @@ static void test_valid_link_pair(struct kunit *test)
#endif
mvm.trans = trans;
- mvmvif->esr_disable_reason = params->esr_disable_reason;
+ mvm.last_bt_notif.wifi_loss_low_rssi = params->bt;
mvmvif->mvm = &mvm;
result = iwl_mvm_mld_valid_link_pair(vif, &link_a, &link_b);