diff options
Diffstat (limited to 'include/net/caif')
-rw-r--r-- | include/net/caif/caif_dev.h | 8 | ||||
-rw-r--r-- | include/net/caif/caif_layer.h | 6 | ||||
-rw-r--r-- | include/net/caif/cfcnfg.h | 16 |
3 files changed, 18 insertions, 12 deletions
diff --git a/include/net/caif/caif_dev.h b/include/net/caif/caif_dev.h index 318ab9478a44..6da573c75d54 100644 --- a/include/net/caif/caif_dev.h +++ b/include/net/caif/caif_dev.h | |||
@@ -50,6 +50,9 @@ struct caif_connect_request { | |||
50 | * @client_layer: User implementation of client layer. This layer | 50 | * @client_layer: User implementation of client layer. This layer |
51 | * MUST have receive and control callback functions | 51 | * MUST have receive and control callback functions |
52 | * implemented. | 52 | * implemented. |
53 | * @ifindex: Link layer interface index used for this connection. | ||
54 | * @headroom: Head room needed by CAIF protocol. | ||
55 | * @tailroom: Tail room needed by CAIF protocol. | ||
53 | * | 56 | * |
54 | * This function connects a CAIF channel. The Client must implement | 57 | * This function connects a CAIF channel. The Client must implement |
55 | * the struct cflayer. This layer represents the Client layer and holds | 58 | * the struct cflayer. This layer represents the Client layer and holds |
@@ -59,8 +62,9 @@ struct caif_connect_request { | |||
59 | * E.g. CAIF Socket will call this function for each socket it connects | 62 | * E.g. CAIF Socket will call this function for each socket it connects |
60 | * and have one client_layer instance for each socket. | 63 | * and have one client_layer instance for each socket. |
61 | */ | 64 | */ |
62 | int caif_connect_client(struct caif_connect_request *config, | 65 | int caif_connect_client(struct caif_connect_request *conn_req, |
63 | struct cflayer *client_layer); | 66 | struct cflayer *client_layer, int *ifindex, |
67 | int *headroom, int *tailroom); | ||
64 | 68 | ||
65 | /** | 69 | /** |
66 | * caif_disconnect_client - Disconnects a client from the CAIF stack. | 70 | * caif_disconnect_client - Disconnects a client from the CAIF stack. |
diff --git a/include/net/caif/caif_layer.h b/include/net/caif/caif_layer.h index 25c472f0e5b8..c8b07a904e78 100644 --- a/include/net/caif/caif_layer.h +++ b/include/net/caif/caif_layer.h | |||
@@ -15,14 +15,8 @@ struct cfpktq; | |||
15 | struct caif_payload_info; | 15 | struct caif_payload_info; |
16 | struct caif_packet_funcs; | 16 | struct caif_packet_funcs; |
17 | 17 | ||
18 | #define CAIF_MAX_FRAMESIZE 4096 | ||
19 | #define CAIF_MAX_PAYLOAD_SIZE (4096 - 64) | ||
20 | #define CAIF_NEEDED_HEADROOM (10) | ||
21 | #define CAIF_NEEDED_TAILROOM (2) | ||
22 | 18 | ||
23 | #define CAIF_LAYER_NAME_SZ 16 | 19 | #define CAIF_LAYER_NAME_SZ 16 |
24 | #define CAIF_SUCCESS 1 | ||
25 | #define CAIF_FAILURE 0 | ||
26 | 20 | ||
27 | /** | 21 | /** |
28 | * caif_assert() - Assert function for CAIF. | 22 | * caif_assert() - Assert function for CAIF. |
diff --git a/include/net/caif/cfcnfg.h b/include/net/caif/cfcnfg.h index 9fc2fc20b884..bd646faffa47 100644 --- a/include/net/caif/cfcnfg.h +++ b/include/net/caif/cfcnfg.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #ifndef CFCNFG_H_ | 7 | #ifndef CFCNFG_H_ |
8 | #define CFCNFG_H_ | 8 | #define CFCNFG_H_ |
9 | #include <linux/spinlock.h> | 9 | #include <linux/spinlock.h> |
10 | #include <linux/netdevice.h> | ||
10 | #include <net/caif/caif_layer.h> | 11 | #include <net/caif/caif_layer.h> |
11 | #include <net/caif/cfctrl.h> | 12 | #include <net/caif/cfctrl.h> |
12 | 13 | ||
@@ -73,8 +74,8 @@ void cfcnfg_remove(struct cfcnfg *cfg); | |||
73 | 74 | ||
74 | void | 75 | void |
75 | cfcnfg_add_phy_layer(struct cfcnfg *cnfg, enum cfcnfg_phy_type phy_type, | 76 | cfcnfg_add_phy_layer(struct cfcnfg *cnfg, enum cfcnfg_phy_type phy_type, |
76 | void *dev, struct cflayer *phy_layer, u16 *phyid, | 77 | struct net_device *dev, struct cflayer *phy_layer, |
77 | enum cfcnfg_phy_preference pref, | 78 | u16 *phyid, enum cfcnfg_phy_preference pref, |
78 | bool fcs, bool stx); | 79 | bool fcs, bool stx); |
79 | 80 | ||
80 | /** | 81 | /** |
@@ -114,11 +115,18 @@ void cfcnfg_release_adap_layer(struct cflayer *adap_layer); | |||
114 | * @param: Link setup parameters. | 115 | * @param: Link setup parameters. |
115 | * @adap_layer: Specify the adaptation layer; the receive and | 116 | * @adap_layer: Specify the adaptation layer; the receive and |
116 | * flow-control functions MUST be set in the structure. | 117 | * flow-control functions MUST be set in the structure. |
117 | * | 118 | * @ifindex: Link layer interface index used for this connection. |
119 | * @proto_head: Protocol head-space needed by CAIF protocol, | ||
120 | * excluding link layer. | ||
121 | * @proto_tail: Protocol tail-space needed by CAIF protocol, | ||
122 | * excluding link layer. | ||
118 | */ | 123 | */ |
119 | int cfcnfg_add_adaptation_layer(struct cfcnfg *cnfg, | 124 | int cfcnfg_add_adaptation_layer(struct cfcnfg *cnfg, |
120 | struct cfctrl_link_param *param, | 125 | struct cfctrl_link_param *param, |
121 | struct cflayer *adap_layer); | 126 | struct cflayer *adap_layer, |
127 | int *ifindex, | ||
128 | int *proto_head, | ||
129 | int *proto_tail); | ||
122 | 130 | ||
123 | /** | 131 | /** |
124 | * cfcnfg_get_phyid() - Get physical ID, given type. | 132 | * cfcnfg_get_phyid() - Get physical ID, given type. |