~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/net/caif/cfcnfg.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Copyright (C) ST-Ericsson AB 2010
  4  * Author:      Sjur Brendeland
  5  */
  6 
  7 #ifndef CFCNFG_H_
  8 #define CFCNFG_H_
  9 #include <linux/spinlock.h>
 10 #include <linux/netdevice.h>
 11 #include <net/caif/caif_layer.h>
 12 #include <net/caif/cfctrl.h>
 13 
 14 struct cfcnfg;
 15 
 16 /**
 17  * enum cfcnfg_phy_preference - Physical preference HW Abstraction
 18  *
 19  * @CFPHYPREF_UNSPECIFIED:      Default physical interface
 20  *
 21  * @CFPHYPREF_LOW_LAT:          Default physical interface for low-latency
 22  *                              traffic
 23  * @CFPHYPREF_HIGH_BW:          Default physical interface for high-bandwidth
 24  *                              traffic
 25  * @CFPHYPREF_LOOP:             TEST only Loopback interface simulating modem
 26  *                              responses.
 27  *
 28  */
 29 enum cfcnfg_phy_preference {
 30         CFPHYPREF_UNSPECIFIED,
 31         CFPHYPREF_LOW_LAT,
 32         CFPHYPREF_HIGH_BW,
 33         CFPHYPREF_LOOP
 34 };
 35 
 36 /**
 37  * cfcnfg_create() - Get the CAIF configuration object given network.
 38  * @net:        Network for the CAIF configuration object.
 39  */
 40 struct cfcnfg *get_cfcnfg(struct net *net);
 41 
 42 /**
 43  * cfcnfg_create() - Create the CAIF configuration object.
 44  */
 45 struct cfcnfg *cfcnfg_create(void);
 46 
 47 /**
 48  * cfcnfg_remove() -  Remove the CFCNFG object
 49  * @cfg: config object
 50  */
 51 void cfcnfg_remove(struct cfcnfg *cfg);
 52 
 53 /**
 54  * cfcnfg_add_phy_layer() - Adds a physical layer to the CAIF stack.
 55  * @cnfg:       Pointer to a CAIF configuration object, created by
 56  *              cfcnfg_create().
 57  * @dev:        Pointer to link layer device
 58  * @phy_layer:  Specify the physical layer. The transmit function
 59  *              MUST be set in the structure.
 60  * @pref:       The phy (link layer) preference.
 61  * @link_support: Protocol implementation for link layer specific protocol.
 62  * @fcs:        Specify if checksum is used in CAIF Framing Layer.
 63  * @head_room:  Head space needed by link specific protocol.
 64  */
 65 int
 66 cfcnfg_add_phy_layer(struct cfcnfg *cnfg,
 67                      struct net_device *dev, struct cflayer *phy_layer,
 68                      enum cfcnfg_phy_preference pref,
 69                      struct cflayer *link_support,
 70                      bool fcs, int head_room);
 71 
 72 /**
 73  * cfcnfg_del_phy_layer - Deletes an phy layer from the CAIF stack.
 74  *
 75  * @cnfg:       Pointer to a CAIF configuration object, created by
 76  *              cfcnfg_create().
 77  * @phy_layer:  Adaptation layer to be removed.
 78  */
 79 int cfcnfg_del_phy_layer(struct cfcnfg *cnfg, struct cflayer *phy_layer);
 80 
 81 /**
 82  * cfcnfg_set_phy_state() - Set the state of the physical interface device.
 83  * @cnfg:       Configuration object
 84  * @phy_layer:  Physical Layer representation
 85  * @up: State of device
 86  */
 87 int cfcnfg_set_phy_state(struct cfcnfg *cnfg, struct cflayer *phy_layer,
 88                                 bool up);
 89 
 90 #endif                          /* CFCNFG_H_ */
 91 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php