![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-only */ 0002 /* 0003 * Copyright (C) ST-Ericsson AB 2010 0004 * Author: Sjur Brendeland 0005 */ 0006 0007 #ifndef CFCNFG_H_ 0008 #define CFCNFG_H_ 0009 #include <linux/spinlock.h> 0010 #include <linux/netdevice.h> 0011 #include <net/caif/caif_layer.h> 0012 #include <net/caif/cfctrl.h> 0013 0014 struct cfcnfg; 0015 0016 /** 0017 * enum cfcnfg_phy_preference - Physical preference HW Abstraction 0018 * 0019 * @CFPHYPREF_UNSPECIFIED: Default physical interface 0020 * 0021 * @CFPHYPREF_LOW_LAT: Default physical interface for low-latency 0022 * traffic 0023 * @CFPHYPREF_HIGH_BW: Default physical interface for high-bandwidth 0024 * traffic 0025 * @CFPHYPREF_LOOP: TEST only Loopback interface simulating modem 0026 * responses. 0027 * 0028 */ 0029 enum cfcnfg_phy_preference { 0030 CFPHYPREF_UNSPECIFIED, 0031 CFPHYPREF_LOW_LAT, 0032 CFPHYPREF_HIGH_BW, 0033 CFPHYPREF_LOOP 0034 }; 0035 0036 /** 0037 * cfcnfg_create() - Get the CAIF configuration object given network. 0038 * @net: Network for the CAIF configuration object. 0039 */ 0040 struct cfcnfg *get_cfcnfg(struct net *net); 0041 0042 /** 0043 * cfcnfg_create() - Create the CAIF configuration object. 0044 */ 0045 struct cfcnfg *cfcnfg_create(void); 0046 0047 /** 0048 * cfcnfg_remove() - Remove the CFCNFG object 0049 * @cfg: config object 0050 */ 0051 void cfcnfg_remove(struct cfcnfg *cfg); 0052 0053 /** 0054 * cfcnfg_add_phy_layer() - Adds a physical layer to the CAIF stack. 0055 * @cnfg: Pointer to a CAIF configuration object, created by 0056 * cfcnfg_create(). 0057 * @dev: Pointer to link layer device 0058 * @phy_layer: Specify the physical layer. The transmit function 0059 * MUST be set in the structure. 0060 * @pref: The phy (link layer) preference. 0061 * @link_support: Protocol implementation for link layer specific protocol. 0062 * @fcs: Specify if checksum is used in CAIF Framing Layer. 0063 * @head_room: Head space needed by link specific protocol. 0064 */ 0065 int 0066 cfcnfg_add_phy_layer(struct cfcnfg *cnfg, 0067 struct net_device *dev, struct cflayer *phy_layer, 0068 enum cfcnfg_phy_preference pref, 0069 struct cflayer *link_support, 0070 bool fcs, int head_room); 0071 0072 /** 0073 * cfcnfg_del_phy_layer - Deletes an phy layer from the CAIF stack. 0074 * 0075 * @cnfg: Pointer to a CAIF configuration object, created by 0076 * cfcnfg_create(). 0077 * @phy_layer: Adaptation layer to be removed. 0078 */ 0079 int cfcnfg_del_phy_layer(struct cfcnfg *cnfg, struct cflayer *phy_layer); 0080 0081 /** 0082 * cfcnfg_set_phy_state() - Set the state of the physical interface device. 0083 * @cnfg: Configuration object 0084 * @phy_layer: Physical Layer representation 0085 * @up: State of device 0086 */ 0087 int cfcnfg_set_phy_state(struct cfcnfg *cnfg, struct cflayer *phy_layer, 0088 bool up); 0089 0090 #endif /* CFCNFG_H_ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |