summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/include/comm
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-02-21 18:33:56 +0100
committerHarald Welte <laforge@gnumonks.org>2010-02-21 18:33:56 +0100
commit30ed24b0a42d495af8df6ebbe205d2e69f639add (patch)
tree76e4278f5bd0f37c17c9eb699eefaa9416ca1668 /src/target/firmware/include/comm
parent8570a2ccd887b0c382fb8bd11aed00c19a16e47d (diff)
sercomm_cons: allocate 252 bytes net data size plus 4 bytes headroom
Diffstat (limited to 'src/target/firmware/include/comm')
-rw-r--r--src/target/firmware/include/comm/sercomm.h2
-rw-r--r--src/target/firmware/include/comm/sercomm_cons.h2
2 files changed, 2 insertions, 2 deletions
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);