net: wireless: bcm4329: Allocate skb with GFP_KERNEL flag if possible
authorDmitry Shmidt <dimitrysh@google.com>
Thu, 10 Mar 2011 18:18:39 +0000 (10:18 -0800)
committerDmitry Shmidt <dimitrysh@google.com>
Thu, 10 Mar 2011 18:18:39 +0000 (10:18 -0800)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcm4329/linux_osl.c

index d00bd1ca291b89868dfe77b8da7c33f2a464437a..3a026eed516ea3a4276b55f5f7c5c842ea99d3c8 100644 (file)
@@ -246,8 +246,10 @@ void*
 osl_pktget(osl_t *osh, uint len)
 {
        struct sk_buff *skb;
+       gfp_t flags;
 
-       if ((skb = dev_alloc_skb(len))) {
+       flags = (in_atomic()) ? GFP_ATOMIC : GFP_KERNEL;
+       if ((skb = __dev_alloc_skb(len, flags))) {
                skb_put(skb, len);
                skb->priority = 0;