Loading include/net/irda/irlan_common.h +9 −1 Original line number Diff line number Diff line Loading @@ -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 Loading include/net/irda/irlap_frame.h +29 −2 Original line number Diff line number Diff line Loading @@ -74,6 +74,19 @@ struct discovery_t; #define PF_BIT 0x10 /* Poll/final bit */ /* Some IrLAP field lengths */ /* * Only baud rate triplet is 4 bytes (PV can be 2 bytes). * All others params (7) are 3 bytes, so that's 7*3 + 1*4 bytes. */ #define IRLAP_NEGOCIATION_PARAMS_LEN 25 #define IRLAP_DISCOVERY_INFO_LEN 32 struct disc_frame { __u8 caddr; /* Connection address */ __u8 control; } IRDA_PACK; struct xid_frame { __u8 caddr; /* Connection address */ __u8 control; Loading @@ -95,11 +108,25 @@ struct test_frame { struct ua_frame { __u8 caddr; __u8 control; __u32 saddr; /* Source device address */ __u32 daddr; /* Dest device address */ } IRDA_PACK; struct dm_frame { __u8 caddr; /* Connection address */ __u8 control; } IRDA_PACK; struct rd_frame { __u8 caddr; /* Connection address */ __u8 control; } IRDA_PACK; struct rr_frame { __u8 caddr; /* Connection address */ __u8 control; } IRDA_PACK; struct i_frame { __u8 caddr; __u8 control; Loading include/net/irda/irlmp.h +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ #define DEV_ADDR_ANY 0xffffffff #define LMP_HEADER 2 /* Dest LSAP + Source LSAP */ #define LMP_CONTROL_HEADER 4 #define LMP_CONTROL_HEADER 4 /* LMP_HEADER + opcode + parameter */ #define LMP_PID_HEADER 1 /* Used by Ultra */ #define LMP_MAX_HEADER (LMP_CONTROL_HEADER+LAP_MAX_HEADER) Loading net/irda/af_irda.c +2 −1 Original line number Diff line number Diff line Loading @@ -309,7 +309,8 @@ static void irda_connect_response(struct irda_sock *self) IRDA_ASSERT(self != NULL, return;); skb = alloc_skb(64, GFP_ATOMIC); skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER, GFP_ATOMIC); if (skb == NULL) { IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n", __FUNCTION__); Loading net/irda/ircomm/ircomm_lmp.c +2 −2 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ static int ircomm_lmp_connect_response(struct ircomm_cb *self, /* Any userdata supplied? */ if (userdata == NULL) { tx_skb = alloc_skb(64, GFP_ATOMIC); tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); if (!tx_skb) return -ENOMEM; Loading Loading @@ -115,7 +115,7 @@ static int ircomm_lmp_disconnect_request(struct ircomm_cb *self, IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); if (!userdata) { tx_skb = alloc_skb(64, GFP_ATOMIC); tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); if (!tx_skb) return -ENOMEM; Loading Loading
include/net/irda/irlan_common.h +9 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
include/net/irda/irlap_frame.h +29 −2 Original line number Diff line number Diff line Loading @@ -74,6 +74,19 @@ struct discovery_t; #define PF_BIT 0x10 /* Poll/final bit */ /* Some IrLAP field lengths */ /* * Only baud rate triplet is 4 bytes (PV can be 2 bytes). * All others params (7) are 3 bytes, so that's 7*3 + 1*4 bytes. */ #define IRLAP_NEGOCIATION_PARAMS_LEN 25 #define IRLAP_DISCOVERY_INFO_LEN 32 struct disc_frame { __u8 caddr; /* Connection address */ __u8 control; } IRDA_PACK; struct xid_frame { __u8 caddr; /* Connection address */ __u8 control; Loading @@ -95,11 +108,25 @@ struct test_frame { struct ua_frame { __u8 caddr; __u8 control; __u32 saddr; /* Source device address */ __u32 daddr; /* Dest device address */ } IRDA_PACK; struct dm_frame { __u8 caddr; /* Connection address */ __u8 control; } IRDA_PACK; struct rd_frame { __u8 caddr; /* Connection address */ __u8 control; } IRDA_PACK; struct rr_frame { __u8 caddr; /* Connection address */ __u8 control; } IRDA_PACK; struct i_frame { __u8 caddr; __u8 control; Loading
include/net/irda/irlmp.h +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ #define DEV_ADDR_ANY 0xffffffff #define LMP_HEADER 2 /* Dest LSAP + Source LSAP */ #define LMP_CONTROL_HEADER 4 #define LMP_CONTROL_HEADER 4 /* LMP_HEADER + opcode + parameter */ #define LMP_PID_HEADER 1 /* Used by Ultra */ #define LMP_MAX_HEADER (LMP_CONTROL_HEADER+LAP_MAX_HEADER) Loading
net/irda/af_irda.c +2 −1 Original line number Diff line number Diff line Loading @@ -309,7 +309,8 @@ static void irda_connect_response(struct irda_sock *self) IRDA_ASSERT(self != NULL, return;); skb = alloc_skb(64, GFP_ATOMIC); skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER, GFP_ATOMIC); if (skb == NULL) { IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n", __FUNCTION__); Loading
net/irda/ircomm/ircomm_lmp.c +2 −2 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ static int ircomm_lmp_connect_response(struct ircomm_cb *self, /* Any userdata supplied? */ if (userdata == NULL) { tx_skb = alloc_skb(64, GFP_ATOMIC); tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); if (!tx_skb) return -ENOMEM; Loading Loading @@ -115,7 +115,7 @@ static int ircomm_lmp_disconnect_request(struct ircomm_cb *self, IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); if (!userdata) { tx_skb = alloc_skb(64, GFP_ATOMIC); tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); if (!tx_skb) return -ENOMEM; Loading