From 5bbed92d3d8dab1f28945eec9fb15b6f50bf8669 Mon Sep 17 00:00:00 2001 From: Daniel Martensson Date: Thu, 13 Oct 2011 11:29:28 +0000 Subject: caif-hsi: Added sanity check for length of CAIF frames MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: David S. Miller --- include/net/caif/caif_hsi.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/net') 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 { /* * Maximum bytes transferred in one transfer. */ -/* TODO: 4096 is temporary... */ -#define CFHSI_MAX_PAYLOAD_SZ (CFHSI_MAX_PKTS * 4096) +#define CFHSI_MAX_CAIF_FRAME_SZ 4096 + +#define CFHSI_MAX_PAYLOAD_SZ (CFHSI_MAX_PKTS * CFHSI_MAX_CAIF_FRAME_SZ) /* Size of the complete HSI TX buffer. */ #define CFHSI_BUF_SZ_TX (CFHSI_DESC_SZ + CFHSI_MAX_PAYLOAD_SZ) @@ -143,6 +144,7 @@ struct cfhsi { struct list_head list; struct work_struct wake_up_work; struct work_struct wake_down_work; + struct work_struct out_of_sync_work; struct workqueue_struct *wq; wait_queue_head_t wake_up_wait; wait_queue_head_t wake_down_wait; -- cgit v1.2.3