sercomm_cons: allocate 252 bytes net data size plus 4 bytes headroom
authorHarald Welte <laforge@gnumonks.org>
Sun, 21 Feb 2010 17:33:56 +0000 (18:33 +0100)
committerHarald Welte <laforge@gnumonks.org>
Sun, 21 Feb 2010 17:33:56 +0000 (18:33 +0100)
src/target/firmware/include/comm/sercomm.h
src/target/firmware/include/comm/sercomm_cons.h

index 718e12a..7836b55 100644 (file)
@@ -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 */
index 11f6654..9682a99 100644 (file)
@@ -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);