On Wed, 2024-11-13 at 21:50 +0530, Aditya Kumar Singh wrote: > > Because link ID is cleared from the bitmap well before link stop is > called. As mentioned in commit message, this is the flow - > > nl80211_remove_link > > cfg80211_remove_link -> link ID gets updated here > > ieee80211_del_intf_link > > ieee80211_vif_set_links > > ieee80211_vif_update_links > > ieee80211_link_stop -> this ultimately tries to stop > CAC if it is ongoing. > OK, but why does it have to be that way? It's all under wiphy mutex, so perhaps we could just clear it later? There's necessarily going to be some temporary inconsistency here, I'm not sure it matters too much if it isn't very visible? Alternatively, could do something like wdev->valid_links &= ~BIT(link_id); wdev->removing_link = link_id; ... wdev->removing_link = -1; and accept the wdev->removing_link in these APIs like CAC? johannes