Exemple #1
0
static int sipc4_hdlc_format_rx(struct sipc4_rx_data *data,
		const __be16 protocol)
{
	int err;

	switch (data->format) {
	case SIPC4_FMT:
		err = sipc4_fmt_rx(data);
		break;
	case SIPC4_RAW:
		err = sipc4_raw_rx(data, protocol);
		break;
	case SIPC4_RFS:
		err = sipc4_rfs_rx(data);
		break;
	default:
		err = -EINVAL;
		break;
	}

	return err;
}
Exemple #2
0
static int sipc4_hdlc_format_rx(struct sipc4_rx_data *data)
{
	int err;

	switch (data->format) {
	case SIPC4_FMT:
		/*print_buf(data->skb->data, 15, "IPC");*/
		err = sipc4_fmt_rx(data);
		break;
	case SIPC4_RAW:
		/*print_buf(data->skb->data, 31, "RAW");*/
		err = sipc4_raw_rx(data);
		break;
	case SIPC4_RFS:
		/*print_buf(data->skb->data, 15, "RFS");*/
		err = sipc4_rfs_rx(data);
		break;
	default:
		err = -EINVAL;
		break;
	}

	return err;
}