When a non-AP MLD requests ML association, an AP MLD will validate the
association request elements present in the parent profile as well as
the elements present in each STA profile of MLE to decide if link(s) can
be accepted. While doing so if some of the mandatory elements (say,
Capabilities, Basic rates, RSNEs, etc.) don't satisfy the necessary
conditions for the affiliated AP of the AP MLD to accept the link, the
link will be rejected.
In ieee80211_ml_process_links() this rejection happens even before the
link station entry is added to the driver and while trying to free this
sta object, __ap_free_sta() tries to delete the link station from the
driver which was never added at all and eventually this operation fails.
Currently if deletion of a link station fails hostapd deletes the whole
ML station from the driver but in the above scenario the other link(s)
are accepted. Such deletion results in complete association failure.
Fix this by not proceeding to delete the ML station completely if a
deletion of a link station fails. By design each link station entry of
hostapd should be scheduled for deletion and when the association link
station entry is scheduled for deletion, the ML station will be deleted
from the driver.
Fixes: a6d92da9aa44 ("AP MLD: Support removal of link station from AP")
Signed-off-by: Gautham Kumar Senthilkumaran <quic_gauthamk@quicinc.com>
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
static void __ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
{
#ifdef CONFIG_IEEE80211BE
- if (hostapd_sta_is_link_sta(hapd, sta) &&
- !hostapd_drv_link_sta_remove(hapd, sta->addr))
+ if (hostapd_sta_is_link_sta(hapd, sta)) {
+ hostapd_drv_link_sta_remove(hapd, sta->addr);
return;
+ }
#endif /* CONFIG_IEEE80211BE */
hostapd_drv_sta_remove(hapd, sta->addr);