// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause /* * Copyright (c) 2011, 2012, Atheros Communications Inc. * Copyright (c) 2014, I2SE GmbH */ /* Atheros ethernet framing. Every Ethernet frame is surrounded * by an atheros frame while transmitted over a serial channel; */ #include <linux/init.h> #include <linux/kernel.h> #include <linux/module.h> #include "qca_7k_common.h" u16 qcafrm_create_header(u8 *buf, u16 length) { … } EXPORT_SYMBOL_GPL(…); u16 qcafrm_create_footer(u8 *buf) { … } EXPORT_SYMBOL_GPL(…); /* Gather received bytes and try to extract a full ethernet frame by * following a simple state machine. * * Return: QCAFRM_GATHER No ethernet frame fully received yet. * QCAFRM_NOHEAD Header expected but not found. * QCAFRM_INVLEN Atheros frame length is invalid * QCAFRM_NOTAIL Footer expected but not found. * > 0 Number of byte in the fully received * Ethernet frame */ s32 qcafrm_fsm_decode(struct qcafrm_handle *handle, u8 *buf, u16 buf_len, u8 recv_byte) { … } EXPORT_SYMBOL_GPL(…); MODULE_DESCRIPTION(…) …; MODULE_AUTHOR(…) …; MODULE_AUTHOR(…) …; MODULE_LICENSE(…) …;