Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation/networking/caif: Update documentation

Update drawing and remove description of old features.
Add HSI and USB link layers to the drawing.

Reported-by: Joerg Reisenweber <joerg.reisenweber@stericssion.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericssion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sjur Brændeland and committed by
David S. Miller
5051c94b b42f7b5c

+26 -63
+26 -63
Documentation/networking/caif/Linux-CAIF.txt
··· 19 19 Architecture: 20 20 ------------ 21 21 The implementation of CAIF is divided into: 22 - * CAIF Socket Layer, Kernel API, and Net Device. 22 + * CAIF Socket Layer and GPRS IP Interface. 23 23 * CAIF Core Protocol Implementation 24 24 * CAIF Link Layer, implemented as NET devices. 25 25 26 26 27 27 RTNL 28 28 ! 29 - ! +------+ +------+ +------+ 30 - ! +------+! +------+! +------+! 31 - ! ! Sock !! !Kernel!! ! Net !! 32 - ! ! API !+ ! API !+ ! Dev !+ <- CAIF Client APIs 33 - ! +------+ +------! +------+ 34 - ! ! ! ! 35 - ! +----------!----------+ 36 - ! +------+ <- CAIF Protocol Implementation 37 - +-------> ! CAIF ! 38 - ! Core ! 39 - +------+ 40 - +--------!--------+ 41 - ! ! 42 - +------+ +-----+ 43 - ! ! ! TTY ! <- Link Layer (Net Devices) 44 - +------+ +-----+ 29 + ! +------+ +------+ 30 + ! +------+! +------+! 31 + ! ! IP !! !Socket!! 32 + +-------> !interf!+ ! API !+ <- CAIF Client APIs 33 + ! +------+ +------! 34 + ! ! ! 35 + ! +-----------+ 36 + ! ! 37 + ! +------+ <- CAIF Core Protocol 38 + ! ! CAIF ! 39 + ! ! Core ! 40 + ! +------+ 41 + ! +----------!---------+ 42 + ! ! ! ! 43 + ! +------+ +-----+ +------+ 44 + +--> ! HSI ! ! TTY ! ! USB ! <- Link Layer (Net Devices) 45 + +------+ +-----+ +------+ 45 46 46 - 47 - Using the Kernel API 48 - ---------------------- 49 - The Kernel API is used for accessing CAIF channels from the 50 - kernel. 51 - The user of the API has to implement two callbacks for receive 52 - and control. 53 - The receive callback gives a CAIF packet as a SKB. The control 54 - callback will 55 - notify of channel initialization complete, and flow-on/flow- 56 - off. 57 - 58 - 59 - struct caif_device caif_dev = { 60 - .caif_config = { 61 - .name = "MYDEV" 62 - .type = CAIF_CHTY_AT 63 - } 64 - .receive_cb = my_receive, 65 - .control_cb = my_control, 66 - }; 67 - caif_add_device(&caif_dev); 68 - caif_transmit(&caif_dev, skb); 69 - 70 - See the caif_kernel.h for details about the CAIF kernel API. 71 47 72 48 73 49 I M P L E M E N T A T I O N 74 50 =========================== 75 - =========================== 51 + 76 52 77 53 CAIF Core Protocol Layer 78 54 ========================================= ··· 64 88 - Simple implementation of CAIF. 65 89 - Layered architecture (a la Streams), each layer in the CAIF 66 90 specification is implemented in a separate c-file. 67 - - Clients must implement PHY layer to access physical HW 68 - with receive and transmit functions. 69 91 - Clients must call configuration function to add PHY layer. 70 92 - Clients must implement CAIF layer to consume/produce 71 93 CAIF payload with receive and transmit functions. 72 94 - Clients must call configuration function to add and connect the 73 95 Client layer. 74 96 - When receiving / transmitting CAIF Packets (cfpkt), ownership is passed 75 - to the called function (except for framing layers' receive functions 76 - or if a transmit function returns an error, in which case the caller 77 - must free the packet). 97 + to the called function (except for framing layers' receive function) 78 98 79 99 Layered Architecture 80 100 -------------------- ··· 80 108 - CFPKT CAIF Packet. Implementation of CAIF Protocol Packet. The 81 109 CAIF Packet has functions for creating, destroying and adding content 82 110 and for adding/extracting header and trailers to protocol packets. 83 - 84 - - CFLST CAIF list implementation. 85 - 86 - - CFGLUE CAIF Glue. Contains OS Specifics, such as memory 87 - allocation, endianness, etc. 88 111 89 112 The CAIF Protocol implementation contains: 90 113 ··· 95 128 control and remote shutdown requests. 96 129 97 130 - CFVEI CAIF VEI layer. Handles CAIF AT Channels on VEI (Virtual 98 - External Interface). This layer encodes/decodes VEI frames. 131 + External Interface). This layer encodes/decodes VEI frames. 99 132 100 133 - CFDGML CAIF Datagram layer. Handles CAIF Datagram layer (IP 101 134 traffic), encodes/decodes Datagram frames. ··· 137 170 +---------+ +---------+ 138 171 ! ! 139 172 +---------+ +---------+ 140 - | | | Serial | 173 + | | | Serial | 141 174 | | | CFSERL | 142 175 +---------+ +---------+ 143 176 ··· 153 186 layer->dn->transmit(layer->dn, packet); 154 187 155 188 156 - Linux Driver Implementation 189 + CAIF Socket and IP interface 157 190 =========================== 158 191 159 - Linux GPRS Net Device and CAIF socket are implemented on top of the 160 - CAIF Core protocol. The Net device and CAIF socket have an instance of 192 + The IP interface and CAIF socket API are implemented on top of the 193 + CAIF Core protocol. The IP Interface and CAIF socket have an instance of 161 194 'struct cflayer', just like the CAIF Core protocol stack. 162 195 Net device and Socket implement the 'receive()' function defined by 163 196 'struct cflayer', just like the rest of the CAIF stack. In this way, transmit and 164 197 receive of packets is handled as by the rest of the layers: the 'dn->transmit()' 165 198 function is called in order to transmit data. 166 199 167 - The layer on top of the CAIF Core implementation is 168 - sometimes referred to as the "Client layer". 169 - 170 - 171 200 Configuration of Link Layer 172 201 --------------------------- 173 - The Link Layer is implemented as Linux net devices (struct net_device). 202 + The Link Layer is implemented as Linux network devices (struct net_device). 174 203 Payload handling and registration is done using standard Linux mechanisms. 175 204 176 205 The CAIF Protocol relies on a loss-less link layer without implementing