qcacmn: Support non atomic skb allocation
Improve reliability of skb allocations from non atomic callers by letting them sleep. Change-Id: If5a594519902ebe549fbc1ebd8c0eb97679cdcae CRs-Fixed: 2127770
This commit is contained in:

committed by
snandini

parent
b9a7b5ac0d
commit
c6d785d033
@@ -384,11 +384,15 @@ struct sk_buff *__qdf_nbuf_alloc(qdf_device_t osdev, size_t size, int reserve,
|
|||||||
{
|
{
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
unsigned long offset;
|
unsigned long offset;
|
||||||
|
int flags = GFP_KERNEL;
|
||||||
|
|
||||||
if (align)
|
if (align)
|
||||||
size += (align - 1);
|
size += (align - 1);
|
||||||
|
|
||||||
skb = dev_alloc_skb(size);
|
if (in_interrupt() || irqs_disabled() || in_atomic())
|
||||||
|
flags = GFP_ATOMIC;
|
||||||
|
|
||||||
|
skb = __netdev_alloc_skb(NULL, size, flags);
|
||||||
|
|
||||||
if (skb)
|
if (skb)
|
||||||
goto skb_alloc;
|
goto skb_alloc;
|
||||||
|
Reference in New Issue
Block a user