Skip to content

Commit 204bfec

Browse files
committed
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: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230514120631.992b2f981ef6.I7d386c19354e9be39c4822f436dd22c93422b660@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent c2d8b7f commit 204bfec

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,13 @@ int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
123123
if (mvmvif->link[i]->phy_ctxt)
124124
count++;
125125

126-
/* FIXME: IWL_MVM_FW_MAX_ACTIVE_LINKS_NUM should be
127-
* defined per HW
128-
*/
129-
if (count >= IWL_MVM_FW_MAX_ACTIVE_LINKS_NUM)
130-
return -EINVAL;
126+
if (vif->type == NL80211_IFTYPE_AP) {
127+
if (count > mvm->fw->ucode_capa.num_beacons)
128+
return -EOPNOTSUPP;
129+
/* this should be per HW or such */
130+
} else if (count >= IWL_MVM_FW_MAX_ACTIVE_LINKS_NUM) {
131+
return -EOPNOTSUPP;
132+
}
131133
}
132134

133135
/* Catch early if driver tries to activate or deactivate a link

drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -906,11 +906,12 @@ iwl_mvm_mld_change_vif_links(struct ieee80211_hw *hw,
906906
n_active++;
907907
}
908908

909-
if (vif->type == NL80211_IFTYPE_AP &&
910-
n_active > mvm->fw->ucode_capa.num_beacons)
911-
return -EOPNOTSUPP;
912-
else if (n_active > 1)
909+
if (vif->type == NL80211_IFTYPE_AP) {
910+
if (n_active > mvm->fw->ucode_capa.num_beacons)
911+
return -EOPNOTSUPP;
912+
} else if (n_active > 1) {
913913
return -EOPNOTSUPP;
914+
}
914915
}
915916

916917
for (i = 0; i < IEEE80211_MLD_MAX_NUM_LINKS; i++) {

0 commit comments

Comments
 (0)