[IrDA]: Memory allocations cleanups

This patch replaces the bunch of arbitrary 64 and 128 bytes alloc_skb() calls
with more accurate allocation sizes.

Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Samuel Ortiz
2006-09-27 20:06:44 -07:00
committed by David S. Miller
parent 778e6398d3
commit 1b0fee7d68
12 changed files with 136 additions and 58 deletions

View File

@@ -98,7 +98,15 @@
#define IRLAN_SHORT 1
#define IRLAN_ARRAY 2
#define IRLAN_MAX_HEADER (TTP_HEADER+LMP_HEADER+LAP_MAX_HEADER)
/* IrLAN sits on top if IrTTP */
#define IRLAN_MAX_HEADER (TTP_HEADER+LMP_HEADER)
/* 1 byte for the command code and 1 byte for the parameter count */
#define IRLAN_CMD_HEADER 2
#define IRLAN_STRING_PARAMETER_LEN(name, value) (1 + strlen((name)) + 2 \
+ strlen ((value)))
#define IRLAN_BYTE_PARAMETER_LEN(name) (1 + strlen((name)) + 2 + 1)
#define IRLAN_SHORT_PARAMETER_LEN(name) (1 + strlen((name)) + 2 + 2)
/*
* IrLAN client