* dpseci_destroy() - Destroy the DPSECI object and release all its resources. * @mc_io: Pointer to MC portal's I/O object * @dprc_token: Parent container token; '0' for default container * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' * @object_id: The object id; it must be a valid id within the container that * created this object; * * The function accepts the authentication tok
| 152 | * Return: '0' on Success; error code otherwise. |
| 153 | */ |
| 154 | int dpseci_destroy(struct fsl_mc_io *mc_io, |
| 155 | uint16_t dprc_token, |
| 156 | uint32_t cmd_flags, |
| 157 | uint32_t object_id) |
| 158 | { |
| 159 | struct dpseci_cmd_destroy *cmd_params; |
| 160 | struct mc_command cmd = { 0 }; |
| 161 | |
| 162 | /* prepare command */ |
| 163 | cmd.header = mc_encode_cmd_header(DPSECI_CMDID_DESTROY, |
| 164 | cmd_flags, |
| 165 | dprc_token); |
| 166 | cmd_params = (struct dpseci_cmd_destroy *)cmd.params; |
| 167 | cmd_params->dpseci_id = cpu_to_le32(object_id); |
| 168 | |
| 169 | /* send command to mc*/ |
| 170 | return mc_send_command(mc_io, &cmd); |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * dpseci_enable() - Enable the DPSECI, allow sending and receiving frames. |
nothing calls this directly
no test coverage detected