/* SPDX-License-Identifier: GPL-2.0-only */1/*2* Copyright (C) ST-Ericsson AB 20103* Author: Sjur Brendeland4*/56#ifndef CAIF_DEVICE_H_7#define CAIF_DEVICE_H_8#include <linux/kernel.h>9#include <linux/net.h>10#include <linux/netdevice.h>11#include <linux/caif/caif_socket.h>12#include <net/caif/caif_device.h>1314/**15* struct caif_dev_common - data shared between CAIF drivers and stack.16* @flowctrl: Flow Control callback function. This function is17* supplied by CAIF Core Stack and is used by CAIF18* Link Layer to send flow-stop to CAIF Core.19* The flow information will be distributed to all20* clients of CAIF.21*22* @link_select: Profile of device, either high-bandwidth or23* low-latency. This member is set by CAIF Link24* Layer Device in order to indicate if this device25* is a high bandwidth or low latency device.26*27* @use_frag: CAIF Frames may be fragmented.28* Is set by CAIF Link Layer in order to indicate if the29* interface receives fragmented frames that must be30* assembled by CAIF Core Layer.31*32* @use_fcs: Indicate if Frame CheckSum (fcs) is used.33* Is set if the physical interface is34* using Frame Checksum on the CAIF Frames.35*36* @use_stx: Indicate STart of frame eXtension (stx) in use.37* Is set if the CAIF Link Layer expects38* CAIF Frames to start with the STX byte.39*40* This structure is shared between the CAIF drivers and the CAIF stack.41* It is used by the device to register its behavior.42* CAIF Core layer must set the member flowctrl in order to supply43* CAIF Link Layer with the flow control function.44*45*/46struct caif_dev_common {47void (*flowctrl)(struct net_device *net, int on);48enum caif_link_selector link_select;49int use_frag;50int use_fcs;51int use_stx;52};5354#endif /* CAIF_DEVICE_H_ */555657