aboutsummaryrefslogtreecommitdiffstats
path: root/net/caif/cfserl.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/caif/cfserl.c')
-rw-r--r--net/caif/cfserl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/caif/cfserl.c b/net/caif/cfserl.c
index 965c5baace40..a11fbd68a13d 100644
--- a/net/caif/cfserl.c
+++ b/net/caif/cfserl.c
@@ -14,7 +14,8 @@
14#define container_obj(layr) ((struct cfserl *) layr) 14#define container_obj(layr) ((struct cfserl *) layr)
15 15
16#define CFSERL_STX 0x02 16#define CFSERL_STX 0x02
17#define CAIF_MINIUM_PACKET_SIZE 4 17#define SERIAL_MINIUM_PACKET_SIZE 4
18#define SERIAL_MAX_FRAMESIZE 4096
18struct cfserl { 19struct cfserl {
19 struct cflayer layer; 20 struct cflayer layer;
20 struct cfpkt *incomplete_frm; 21 struct cfpkt *incomplete_frm;
@@ -119,8 +120,8 @@ static int cfserl_receive(struct cflayer *l, struct cfpkt *newpkt)
119 /* 120 /*
120 * Frame error handling 121 * Frame error handling
121 */ 122 */
122 if (expectlen < CAIF_MINIUM_PACKET_SIZE 123 if (expectlen < SERIAL_MINIUM_PACKET_SIZE
123 || expectlen > CAIF_MAX_FRAMESIZE) { 124 || expectlen > SERIAL_MAX_FRAMESIZE) {
124 if (!layr->usestx) { 125 if (!layr->usestx) {
125 if (pkt != NULL) 126 if (pkt != NULL)
126 cfpkt_destroy(pkt); 127 cfpkt_destroy(pkt);