aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda/irttp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 02:03:42 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 02:03:42 -0400
commit3dcbbcda7c5b77c400791b26facd6593c5b176e0 (patch)
tree2e7b844c4d450cf43810a6ed0ddd5c702c245a88 /net/irda/irttp.c
parentc972398b7871d9fb58c6a317786065a7cc6ca4be (diff)
parent6fbe59b9569b2c8d5522d182263935c6c86fc40a (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (160 commits) [ETHTOOL]: Remove some entries from non-root command list. [Bluetooth]: Fix section mismatch of bt_sysfs_cleanup() [Bluetooth]: Don't update disconnect timer for incoming connections [ETHTOOL]: let mortals use ethtool [NetLabel]: add audit support for configuration changes [TCP]: Fix and simplify microsecond rtt sampling [TCP] tcp-lp: prevent chance for oops [SUNRPC]: Remove unnecessary check in net/sunrpc/svcsock.c [IPVS] bug: endianness breakage in ip_vs_ftp [IPVS]: ipvs annotations [NETFILTER]: h323 annotations [NETFILTER]: ipt annotations [NETFILTER]: NAT annotations [NETFILTER]: conntrack annotations [NETFILTER]: netfilter misc annotations [NET]: Annotate dst_ops protocol [NET]: is it Andy or Andi ?? [IPVS]: Make sure ip_vs_ftp ports are valid: module_param_array approach [IPVS]: Reverse valid ip_vs_ftp ports fix: port check approach [IrDA] stir4200: removing undocumented bits handling ...
Diffstat (limited to 'net/irda/irttp.c')
-rw-r--r--net/irda/irttp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index 42acf1cde737..3c2e70b77df1 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -804,12 +804,12 @@ static inline void irttp_give_credit(struct tsap_cb *self)
804 self->send_credit, self->avail_credit, self->remote_credit); 804 self->send_credit, self->avail_credit, self->remote_credit);
805 805
806 /* Give credit to peer */ 806 /* Give credit to peer */
807 tx_skb = alloc_skb(64, GFP_ATOMIC); 807 tx_skb = alloc_skb(TTP_MAX_HEADER, GFP_ATOMIC);
808 if (!tx_skb) 808 if (!tx_skb)
809 return; 809 return;
810 810
811 /* Reserve space for LMP, and LAP header */ 811 /* Reserve space for LMP, and LAP header */
812 skb_reserve(tx_skb, self->max_header_size); 812 skb_reserve(tx_skb, LMP_MAX_HEADER);
813 813
814 /* 814 /*
815 * Since we can transmit and receive frames concurrently, 815 * Since we can transmit and receive frames concurrently,
@@ -1093,7 +1093,8 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
1093 1093
1094 /* Any userdata supplied? */ 1094 /* Any userdata supplied? */
1095 if (userdata == NULL) { 1095 if (userdata == NULL) {
1096 tx_skb = alloc_skb(64, GFP_ATOMIC); 1096 tx_skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER,
1097 GFP_ATOMIC);
1097 if (!tx_skb) 1098 if (!tx_skb)
1098 return -ENOMEM; 1099 return -ENOMEM;
1099 1100
@@ -1341,7 +1342,8 @@ int irttp_connect_response(struct tsap_cb *self, __u32 max_sdu_size,
1341 1342
1342 /* Any userdata supplied? */ 1343 /* Any userdata supplied? */
1343 if (userdata == NULL) { 1344 if (userdata == NULL) {
1344 tx_skb = alloc_skb(64, GFP_ATOMIC); 1345 tx_skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER,
1346 GFP_ATOMIC);
1345 if (!tx_skb) 1347 if (!tx_skb)
1346 return -ENOMEM; 1348 return -ENOMEM;
1347 1349
@@ -1540,14 +1542,14 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata,
1540 1542
1541 if (!userdata) { 1543 if (!userdata) {
1542 struct sk_buff *tx_skb; 1544 struct sk_buff *tx_skb;
1543 tx_skb = alloc_skb(64, GFP_ATOMIC); 1545 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
1544 if (!tx_skb) 1546 if (!tx_skb)
1545 return -ENOMEM; 1547 return -ENOMEM;
1546 1548
1547 /* 1549 /*
1548 * Reserve space for MUX and LAP header 1550 * Reserve space for MUX and LAP header
1549 */ 1551 */
1550 skb_reserve(tx_skb, TTP_MAX_HEADER); 1552 skb_reserve(tx_skb, LMP_MAX_HEADER);
1551 1553
1552 userdata = tx_skb; 1554 userdata = tx_skb;
1553 } 1555 }