Commit 204bfec9 authored by Johannes Berg's avatar Johannes Berg

wifi: iwlwifi: mvm: fix number of concurrent link checks

The concurrent link checks need to correctly differentiate
between AP and non-AP, fix that.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230514120631.992b2f981ef6.I7d386c19354e9be39c4822f436dd22c93422b660@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent c2d8b7f2
...@@ -123,11 +123,13 @@ int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif, ...@@ -123,11 +123,13 @@ int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
if (mvmvif->link[i]->phy_ctxt) if (mvmvif->link[i]->phy_ctxt)
count++; count++;
/* FIXME: IWL_MVM_FW_MAX_ACTIVE_LINKS_NUM should be if (vif->type == NL80211_IFTYPE_AP) {
* defined per HW if (count > mvm->fw->ucode_capa.num_beacons)
*/ return -EOPNOTSUPP;
if (count >= IWL_MVM_FW_MAX_ACTIVE_LINKS_NUM) /* this should be per HW or such */
return -EINVAL; } else if (count >= IWL_MVM_FW_MAX_ACTIVE_LINKS_NUM) {
return -EOPNOTSUPP;
}
} }
/* Catch early if driver tries to activate or deactivate a link /* Catch early if driver tries to activate or deactivate a link
......
...@@ -906,11 +906,12 @@ iwl_mvm_mld_change_vif_links(struct ieee80211_hw *hw, ...@@ -906,11 +906,12 @@ iwl_mvm_mld_change_vif_links(struct ieee80211_hw *hw,
n_active++; n_active++;
} }
if (vif->type == NL80211_IFTYPE_AP && if (vif->type == NL80211_IFTYPE_AP) {
n_active > mvm->fw->ucode_capa.num_beacons) if (n_active > mvm->fw->ucode_capa.num_beacons)
return -EOPNOTSUPP; return -EOPNOTSUPP;
else if (n_active > 1) } else if (n_active > 1) {
return -EOPNOTSUPP; return -EOPNOTSUPP;
}
} }
for (i = 0; i < IEEE80211_MLD_MAX_NUM_LINKS; i++) { for (i = 0; i < IEEE80211_MLD_MAX_NUM_LINKS; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment