aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/caif
diff options
context:
space:
mode:
authorDaniel Martensson <daniel.martensson@stericsson.com>2011-10-13 07:29:28 -0400
committerDavid S. Miller <davem@davemloft.net>2011-10-19 03:25:42 -0400
commit5bbed92d3d8dab1f28945eec9fb15b6f50bf8669 (patch)
tree158b09ec74eb3d4c7fa8e46de0576bad21f4d94c /include/net/caif
parent28bd2049428202cb3bc982536ed3de3c69ae120a (diff)
caif-hsi: Added sanity check for length of CAIF frames
Added sanity check for length of CAIF frames, and tear down of CAIF link-layer device upon protocol error. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/caif')
-rw-r--r--include/net/caif/caif_hsi.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net/caif/caif_hsi.h b/include/net/caif/caif_hsi.h
index 9b69d153c94a..3356769afaee 100644
--- a/include/net/caif/caif_hsi.h
+++ b/include/net/caif/caif_hsi.h
@@ -52,8 +52,9 @@ struct cfhsi_desc {
52/* 52/*
53 * Maximum bytes transferred in one transfer. 53 * Maximum bytes transferred in one transfer.
54 */ 54 */
55/* TODO: 4096 is temporary... */ 55#define CFHSI_MAX_CAIF_FRAME_SZ 4096
56#define CFHSI_MAX_PAYLOAD_SZ (CFHSI_MAX_PKTS * 4096) 56
57#define CFHSI_MAX_PAYLOAD_SZ (CFHSI_MAX_PKTS * CFHSI_MAX_CAIF_FRAME_SZ)
57 58
58/* Size of the complete HSI TX buffer. */ 59/* Size of the complete HSI TX buffer. */
59#define CFHSI_BUF_SZ_TX (CFHSI_DESC_SZ + CFHSI_MAX_PAYLOAD_SZ) 60#define CFHSI_BUF_SZ_TX (CFHSI_DESC_SZ + CFHSI_MAX_PAYLOAD_SZ)
@@ -143,6 +144,7 @@ struct cfhsi {
143 struct list_head list; 144 struct list_head list;
144 struct work_struct wake_up_work; 145 struct work_struct wake_up_work;
145 struct work_struct wake_down_work; 146 struct work_struct wake_down_work;
147 struct work_struct out_of_sync_work;
146 struct workqueue_struct *wq; 148 struct workqueue_struct *wq;
147 wait_queue_head_t wake_up_wait; 149 wait_queue_head_t wake_up_wait;
148 wait_queue_head_t wake_down_wait; 150 wait_queue_head_t wake_down_wait;