aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda/iriap.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/irda/iriap.c')
-rw-r--r--net/irda/iriap.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/net/irda/iriap.c b/net/irda/iriap.c
index 2d2e2b1919f4..415cf4eec23b 100644
--- a/net/irda/iriap.c
+++ b/net/irda/iriap.c
@@ -24,7 +24,6 @@
24 * 24 *
25 ********************************************************************/ 25 ********************************************************************/
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/types.h> 28#include <linux/types.h>
30#include <linux/skbuff.h> 29#include <linux/skbuff.h>
@@ -346,10 +345,11 @@ static void iriap_disconnect_request(struct iriap_cb *self)
346 IRDA_ASSERT(self != NULL, return;); 345 IRDA_ASSERT(self != NULL, return;);
347 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 346 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
348 347
349 tx_skb = dev_alloc_skb(64); 348 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
350 if (tx_skb == NULL) { 349 if (tx_skb == NULL) {
351 IRDA_DEBUG(0, "%s(), Could not allocate an sk_buff of length %d\n", 350 IRDA_DEBUG(0,
352 __FUNCTION__, 64); 351 "%s(), Could not allocate an sk_buff of length %d\n",
352 __FUNCTION__, LMP_MAX_HEADER);
353 return; 353 return;
354 } 354 }
355 355
@@ -397,7 +397,7 @@ int iriap_getvaluebyclass_request(struct iriap_cb *self,
397 attr_len = strlen(attr); /* Up to IAS_MAX_ATTRIBNAME = 60 */ 397 attr_len = strlen(attr); /* Up to IAS_MAX_ATTRIBNAME = 60 */
398 398
399 skb_len = self->max_header_size+2+name_len+1+attr_len+4; 399 skb_len = self->max_header_size+2+name_len+1+attr_len+4;
400 tx_skb = dev_alloc_skb(skb_len); 400 tx_skb = alloc_skb(skb_len, GFP_ATOMIC);
401 if (!tx_skb) 401 if (!tx_skb)
402 return -ENOMEM; 402 return -ENOMEM;
403 403
@@ -563,7 +563,8 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self,
563 * value. We add 32 bytes because of the 6 bytes for the frame and 563 * value. We add 32 bytes because of the 6 bytes for the frame and
564 * max 5 bytes for the value coding. 564 * max 5 bytes for the value coding.
565 */ 565 */
566 tx_skb = dev_alloc_skb(value->len + self->max_header_size + 32); 566 tx_skb = alloc_skb(value->len + self->max_header_size + 32,
567 GFP_ATOMIC);
567 if (!tx_skb) 568 if (!tx_skb)
568 return; 569 return;
569 570
@@ -701,7 +702,7 @@ void iriap_send_ack(struct iriap_cb *self)
701 IRDA_ASSERT(self != NULL, return;); 702 IRDA_ASSERT(self != NULL, return;);
702 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 703 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
703 704
704 tx_skb = dev_alloc_skb(64); 705 tx_skb = alloc_skb(LMP_MAX_HEADER + 1, GFP_ATOMIC);
705 if (!tx_skb) 706 if (!tx_skb)
706 return; 707 return;
707 708