aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00queue.c
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2012-04-19 07:24:10 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-23 15:35:29 -0400
commit88211021a67250fd65029d7400f41ee8f91cb25d (patch)
tree7dcb1dd566c559dfe6a4d903bfbf47acc0249286 /drivers/net/wireless/rt2x00/rt2x00queue.c
parent0c0fdf6c80d4abd879e8bfaf48a20fd2b37e6c67 (diff)
rt2x00: Use GFP_KERNEL for rx buffer allocation on USB devices
Since the RX path on USB devices is handled in process context we can use GFP_KERNEL for RX buffer allocation. This should reduce the likelihood of allocation failures. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Tested-By: Marc Dietrich <marvin24@gmx.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 8ecf409476cd..4c662eccf53c 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -33,7 +33,7 @@
33#include "rt2x00.h" 33#include "rt2x00.h"
34#include "rt2x00lib.h" 34#include "rt2x00lib.h"
35 35
36struct sk_buff *rt2x00queue_alloc_rxskb(struct queue_entry *entry) 36struct sk_buff *rt2x00queue_alloc_rxskb(struct queue_entry *entry, gfp_t gfp)
37{ 37{
38 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 38 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
39 struct sk_buff *skb; 39 struct sk_buff *skb;
@@ -68,7 +68,7 @@ struct sk_buff *rt2x00queue_alloc_rxskb(struct queue_entry *entry)
68 /* 68 /*
69 * Allocate skbuffer. 69 * Allocate skbuffer.
70 */ 70 */
71 skb = dev_alloc_skb(frame_size + head_size + tail_size); 71 skb = __dev_alloc_skb(frame_size + head_size + tail_size, gfp);
72 if (!skb) 72 if (!skb)
73 return NULL; 73 return NULL;
74 74
@@ -1163,7 +1163,7 @@ static int rt2x00queue_alloc_rxskbs(struct data_queue *queue)
1163 struct sk_buff *skb; 1163 struct sk_buff *skb;
1164 1164
1165 for (i = 0; i < queue->limit; i++) { 1165 for (i = 0; i < queue->limit; i++) {
1166 skb = rt2x00queue_alloc_rxskb(&queue->entries[i]); 1166 skb = rt2x00queue_alloc_rxskb(&queue->entries[i], GFP_KERNEL);
1167 if (!skb) 1167 if (!skb)
1168 return -ENOMEM; 1168 return -ENOMEM;
1169 queue->entries[i].skb = skb; 1169 queue->entries[i].skb = skb;