u32 id_n_color, csa_id;
        /* save mac_id or link_id to use later to cancel csa if needed */
        u32 id;
+       u32 mac_link_id = 0;
        u8 notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP,
                                               CHANNEL_SWITCH_START_NOTIF, 0);
        bool csa_active;
                        goto out_unlock;
 
                id = link_id;
+               mac_link_id = bss_conf->link_id;
                vif = bss_conf->vif;
                csa_active = bss_conf->csa_active;
        }
 
                iwl_mvm_csa_client_absent(mvm, vif);
                cancel_delayed_work(&mvmvif->csa_work);
-               ieee80211_chswitch_done(vif, true, 0);
+               ieee80211_chswitch_done(vif, true, mac_link_id);
                break;
        default:
                /* should never happen */
 
 
        if (vif->type == NL80211_IFTYPE_STATION) {
                struct iwl_mvm_sta *mvmsta;
+               unsigned int link_id = link_conf->link_id;
+               u8 ap_sta_id = mvmvif->link[link_id]->ap_sta_id;
 
                mvmvif->csa_bcn_pending = false;
-               mvmsta = iwl_mvm_sta_from_staid_protected(mvm,
-                                                         mvmvif->deflink.ap_sta_id);
+               mvmsta = iwl_mvm_sta_from_staid_protected(mvm, ap_sta_id);
 
                if (WARN_ON(!mvmsta)) {
                        ret = -EIO;