return 0;
}
+
+/**
+ * dpdmux_if_set_errors_behavior() - Set errors behavior
+ * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
+ * @token: Token of DPSW object
+ * @if_id: Interface Identifier
+ * @cfg: Errors configuration
+ *
+ * Provides a set of frame errors that will be rejected or accepted by the
+ * dpdmux interface. The frame with this errors will no longer be dropped by
+ * the dpdmux interface. When frame has parsing error the distribution to
+ * expected interface may fail. If the frame must be distributed using the
+ * information from a header that was not parsed due errors the frame may
+ * be discarded or end up on a default interface because needed data was not
+ * parsed properly.
+ * This function may be called numerous times with different error masks
+ *
+ * Return: '0' on Success; Error code otherwise.
+ */
+int dpdmux_if_set_errors_behavior(struct fsl_mc_io *mc_io, uint32_t cmd_flags,
+ uint16_t token, uint16_t if_id, struct dpdmux_error_cfg *cfg)
+{
+ struct mc_command cmd = { 0 };
+ struct dpdmux_cmd_set_errors_behavior *cmd_params;
+
+ /* prepare command */
+ cmd.header = mc_encode_cmd_header(DPDMUX_CMDID_SET_ERRORS_BEHAVIOR,
+ cmd_flags,
+ token);
+ cmd_params = (struct dpdmux_cmd_set_errors_behavior *)cmd.params;
+ cmd_params->errors = cpu_to_le32(cfg->errors);
+ dpdmux_set_field(cmd_params->flags, ERROR_ACTION, cfg->error_action);
+ cmd_params->if_id = cpu_to_le16(if_id);
+
+ /* send command to mc*/
+ return mc_send_command(mc_io, &cmd);
+}