From d31005f0522b1d85cc96a39ea4c76e5f57399429 Mon Sep 17 00:00:00 2001 From: Dmitry Shmidt Date: Thu, 10 Mar 2011 10:18:39 -0800 Subject: [PATCH] net: wireless: bcm4329: Allocate skb with GFP_KERNEL flag if possible Signed-off-by: Dmitry Shmidt --- drivers/net/wireless/bcm4329/linux_osl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/bcm4329/linux_osl.c b/drivers/net/wireless/bcm4329/linux_osl.c index 980416baf918..cf72a077bd90 100644 --- a/drivers/net/wireless/bcm4329/linux_osl.c +++ b/drivers/net/wireless/bcm4329/linux_osl.c @@ -247,8 +247,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; -- 2.34.1