From 30ed24b0a42d495af8df6ebbe205d2e69f639add Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 21 Feb 2010 18:33:56 +0100 Subject: sercomm_cons: allocate 252 bytes net data size plus 4 bytes headroom --- src/target/firmware/include/comm/sercomm.h | 2 +- src/target/firmware/include/comm/sercomm_cons.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/target/firmware') diff --git a/src/target/firmware/include/comm/sercomm.h b/src/target/firmware/include/comm/sercomm.h index 718e12ab..7836b552 100644 --- a/src/target/firmware/include/comm/sercomm.h +++ b/src/target/firmware/include/comm/sercomm.h @@ -51,7 +51,7 @@ int sercomm_drv_rx_char(uint8_t ch); static inline struct msgb *sercomm_alloc_msgb(unsigned int len) { - return msgb_alloc_headroom(len, 4, "sercomm_tx"); + return msgb_alloc_headroom(len+4, 4, "sercomm_tx"); } #endif /* _SERCOMM_H */ diff --git a/src/target/firmware/include/comm/sercomm_cons.h b/src/target/firmware/include/comm/sercomm_cons.h index 11f66545..9682a998 100644 --- a/src/target/firmware/include/comm/sercomm_cons.h +++ b/src/target/firmware/include/comm/sercomm_cons.h @@ -2,7 +2,7 @@ #define _SERCOMM_CONS_H /* how large buffers do we allocate? */ -#define SERCOMM_CONS_ALLOC 256 +#define SERCOMM_CONS_ALLOC (256-4) int sercomm_puts(const char *s); int sercomm_putchar(int c); -- cgit v1.2.3