diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 11:39:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 11:39:24 -0400 |
commit | 53ee7569ce8beb3fd3fc0817116c29298d72353f (patch) | |
tree | f3dcce10508c2126347e40b468fd6d3c3cc7006a /include/net | |
parent | 4d9dec4db2efbd7edb549bd02373995b67496983 (diff) | |
parent | 1b6e2ceb4745b5838cb94463131d19dbea6cf0e3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (27 commits)
bnx2x: allow device properly initialize after hotplug
bnx2x: fix DMAE timeout according to hw specifications
bnx2x: properly handle CFC DEL in cnic flow
bnx2x: call dev_kfree_skb_any instead of dev_kfree_skb
net: filter: move forward declarations to avoid compile warnings
pktgen: refactor pg_init() code
pktgen: use vzalloc_node() instead of vmalloc_node() + memset()
net: skb_trim explicitely check the linearity instead of data_len
ipv4: Give backtrace in ip_rt_bug().
net: avoid synchronize_rcu() in dev_deactivate_many
net: remove synchronize_net() from netdev_set_master()
rtnetlink: ignore NETDEV_RELEASE and NETDEV_JOIN event
net: rename NETDEV_BONDING_DESLAVE to NETDEV_RELEASE
bridge: call NETDEV_JOIN notifiers when add a slave
netpoll: disable netpoll when enslave a device
macvlan: Forward unicast frames in bridge mode to lowerdev
net: Remove linux/prefetch.h include from linux/skbuff.h
ipv4: Include linux/prefetch.h in fib_trie.c
netlabel: Remove prefetches from list handlers.
drivers/net: add prefetch header for prefetch users
...
Fixed up prefetch parts: removed a few duplicate prefetch.h includes,
fixed the location of the igb prefetch.h, took my version of the
skbuff.h code without the extra parentheses etc.
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/caif/caif_layer.h | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/include/net/caif/caif_layer.h b/include/net/caif/caif_layer.h index c8b07a904e78..35bc7883cf97 100644 --- a/include/net/caif/caif_layer.h +++ b/include/net/caif/caif_layer.h | |||
@@ -15,7 +15,6 @@ 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 | |||
19 | #define CAIF_LAYER_NAME_SZ 16 | 18 | #define CAIF_LAYER_NAME_SZ 16 |
20 | 19 | ||
21 | /** | 20 | /** |
@@ -33,7 +32,6 @@ do { \ | |||
33 | } \ | 32 | } \ |
34 | } while (0) | 33 | } while (0) |
35 | 34 | ||
36 | |||
37 | /** | 35 | /** |
38 | * enum caif_ctrlcmd - CAIF Stack Control Signaling sent in layer.ctrlcmd(). | 36 | * enum caif_ctrlcmd - CAIF Stack Control Signaling sent in layer.ctrlcmd(). |
39 | * | 37 | * |
@@ -141,7 +139,7 @@ enum caif_direction { | |||
141 | * - All layers must use this structure. If embedding it, then place this | 139 | * - All layers must use this structure. If embedding it, then place this |
142 | * structure first in the layer specific structure. | 140 | * structure first in the layer specific structure. |
143 | * | 141 | * |
144 | * - Each layer should not depend on any others layer private data. | 142 | * - Each layer should not depend on any others layer's private data. |
145 | * | 143 | * |
146 | * - In order to send data upwards do | 144 | * - In order to send data upwards do |
147 | * layer->up->receive(layer->up, packet); | 145 | * layer->up->receive(layer->up, packet); |
@@ -155,16 +153,23 @@ struct cflayer { | |||
155 | struct list_head node; | 153 | struct list_head node; |
156 | 154 | ||
157 | /* | 155 | /* |
158 | * receive() - Receive Function. | 156 | * receive() - Receive Function (non-blocking). |
159 | * Contract: Each layer must implement a receive function passing the | 157 | * Contract: Each layer must implement a receive function passing the |
160 | * CAIF packets upwards in the stack. | 158 | * CAIF packets upwards in the stack. |
161 | * Packet handling rules: | 159 | * Packet handling rules: |
162 | * - The CAIF packet (cfpkt) cannot be accessed after | 160 | * - The CAIF packet (cfpkt) ownership is passed to the |
163 | * passing it to the next layer using up->receive(). | 161 | * called receive function. This means that the the |
162 | * packet cannot be accessed after passing it to the | ||
163 | * above layer using up->receive(). | ||
164 | * | ||
164 | * - If parsing of the packet fails, the packet must be | 165 | * - If parsing of the packet fails, the packet must be |
165 | * destroyed and -1 returned from the function. | 166 | * destroyed and negative error code returned |
167 | * from the function. | ||
168 | * EXCEPTION: If the framing layer (cffrml) returns | ||
169 | * -EILSEQ, the packet is not freed. | ||
170 | * | ||
166 | * - If parsing succeeds (and above layers return OK) then | 171 | * - If parsing succeeds (and above layers return OK) then |
167 | * the function must return a value > 0. | 172 | * the function must return a value >= 0. |
168 | * | 173 | * |
169 | * Returns result < 0 indicates an error, 0 or positive value | 174 | * Returns result < 0 indicates an error, 0 or positive value |
170 | * indicates success. | 175 | * indicates success. |
@@ -176,7 +181,7 @@ struct cflayer { | |||
176 | int (*receive)(struct cflayer *layr, struct cfpkt *cfpkt); | 181 | int (*receive)(struct cflayer *layr, struct cfpkt *cfpkt); |
177 | 182 | ||
178 | /* | 183 | /* |
179 | * transmit() - Transmit Function. | 184 | * transmit() - Transmit Function (non-blocking). |
180 | * Contract: Each layer must implement a transmit function passing the | 185 | * Contract: Each layer must implement a transmit function passing the |
181 | * CAIF packet downwards in the stack. | 186 | * CAIF packet downwards in the stack. |
182 | * Packet handling rules: | 187 | * Packet handling rules: |
@@ -185,15 +190,16 @@ struct cflayer { | |||
185 | * cannot be accessed after passing it to the below | 190 | * cannot be accessed after passing it to the below |
186 | * layer using dn->transmit(). | 191 | * layer using dn->transmit(). |
187 | * | 192 | * |
188 | * - If transmit fails, however, the ownership is returned | 193 | * - Upon error the packet ownership is still passed on, |
189 | * to thecaller. The caller of "dn->transmit()" must | 194 | * so the packet shall be freed where error is detected. |
190 | * destroy or resend packet. | 195 | * Callers of the transmit function shall not free packets, |
196 | * but errors shall be returned. | ||
191 | * | 197 | * |
192 | * - Return value less than zero means error, zero or | 198 | * - Return value less than zero means error, zero or |
193 | * greater than zero means OK. | 199 | * greater than zero means OK. |
194 | * | 200 | * |
195 | * result < 0 indicates an error, 0 or positive value | 201 | * Returns result < 0 indicates an error, 0 or positive value |
196 | * indicate success. | 202 | * indicates success. |
197 | * | 203 | * |
198 | * @layr: Pointer to the current layer the receive function | 204 | * @layr: Pointer to the current layer the receive function |
199 | * isimplemented for (this pointer). | 205 | * isimplemented for (this pointer). |
@@ -202,7 +208,7 @@ struct cflayer { | |||
202 | int (*transmit) (struct cflayer *layr, struct cfpkt *cfpkt); | 208 | int (*transmit) (struct cflayer *layr, struct cfpkt *cfpkt); |
203 | 209 | ||
204 | /* | 210 | /* |
205 | * cttrlcmd() - Control Function upwards in CAIF Stack. | 211 | * cttrlcmd() - Control Function upwards in CAIF Stack (non-blocking). |
206 | * Used for signaling responses (CAIF_CTRLCMD_*_RSP) | 212 | * Used for signaling responses (CAIF_CTRLCMD_*_RSP) |
207 | * and asynchronous events from the modem (CAIF_CTRLCMD_*_IND) | 213 | * and asynchronous events from the modem (CAIF_CTRLCMD_*_IND) |
208 | * | 214 | * |