From: Aditya Kumar Singh With stop_iface infra to handle the event on the passed link_id, for AP/P2P_GO interface types, there may be cases where finalizing the CSA fails. In those cases, a link alone can be stopped instead of stopping the whole interface. Add changes to send link_id if its AP/P2P_GO type and -1, otherwise. Signed-off-by: Aditya Kumar Singh Signed-off-by: Manish Dharanenthiran --- net/mac80211/cfg.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 9c951c1a2d6b00bc204d6f4097e9b1fe43c039f8..ad67d0c78e39cd4f57ee020912242d66fe85cc7c 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -4031,12 +4031,18 @@ static int __ieee80211_csa_finalize(struct ieee80211_link_data *link_data) static void ieee80211_csa_finalize(struct ieee80211_link_data *link_data) { struct ieee80211_sub_if_data *sdata = link_data->sdata; + u8 link_id = -1; if (__ieee80211_csa_finalize(link_data)) { sdata_info(sdata, "failed to finalize CSA on link %d, disconnecting\n", link_data->link_id); + /* link_id is expected only for AP/P2P_GO type currently */ + if (sdata->vif.type == NL80211_IFTYPE_AP || + sdata->vif.type == NL80211_IFTYPE_P2P_GO) + link_id = link_data->link_id; + cfg80211_stop_iface(sdata->local->hw.wiphy, &sdata->wdev, - -1, GFP_KERNEL); + link_id, GFP_KERNEL); } } -- 2.34.1