Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 578c9a9e authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 24a25cf9 on remote branch

Change-Id: I91afbfd7888dd05bf05da56b5cc143685a4c8ad3
parents 27910c51 24a25cf9
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -2428,17 +2428,6 @@ static inline void qdf_nbuf_reset_ctxt(__qdf_nbuf_t nbuf)
	__qdf_nbuf_reset_ctxt(nbuf);
}

static inline void
qdf_nbuf_set_rx_info(__qdf_nbuf_t nbuf, void *info, uint32_t len)
{
	__qdf_nbuf_set_rx_info(nbuf, info, len);
}

static inline void *qdf_nbuf_get_rx_info(__qdf_nbuf_t nbuf)
{
	return __qdf_nbuf_get_rx_info(nbuf);
}

static inline void qdf_nbuf_init(qdf_nbuf_t buf)
{
	__qdf_nbuf_init(buf);
+0 −37
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@
#include <qdf_mem.h>
#include <linux/tcp.h>
#include <qdf_util.h>
#include <qdf_nbuf.h>

/*
 * Use socket buffer as the underlying implentation as skbuf .
@@ -1513,42 +1512,6 @@ static inline void __qdf_nbuf_init(__qdf_nbuf_t nbuf)
	skb_reset_tail_pointer(nbuf);
}

/**
 * __qdf_nbuf_set_rx_info() - set rx info
 * @nbuf: sk buffer
 * @info: rx info
 * @len: length
 *
 * Return: none
 */
static inline void
__qdf_nbuf_set_rx_info(__qdf_nbuf_t nbuf, void *info, uint32_t len)
{
	/* Customer may have skb->cb size increased, e.g. to 96 bytes,
	 * then len's large enough to save the rs status info struct
	 */
	uint8_t offset = sizeof(struct qdf_nbuf_cb);
	uint32_t max = sizeof(((struct sk_buff *)0)->cb)-offset;

	len = (len > max ? max : len);

	memcpy(((uint8_t *)(nbuf->cb) + offset), info, len);
}

/**
 * __qdf_nbuf_get_rx_info() - get rx info
 * @nbuf: sk buffer
 *
 * Return: rx_info
 */
static inline void *
__qdf_nbuf_get_rx_info(__qdf_nbuf_t nbuf)
{
	uint8_t offset = sizeof(struct qdf_nbuf_cb);

	return (void *)((uint8_t *)(nbuf->cb) + offset);
}

/*
 *  __qdf_nbuf_get_cb() - returns a pointer to skb->cb
 * @nbuf: sk buff
+11 −1
Original line number Diff line number Diff line
@@ -286,8 +286,18 @@ struct sk_buff *__qdf_nbuf_alloc(qdf_device_t osdev, size_t size, int reserve,
	if (align)
		size += (align - 1);

	if (in_interrupt() || irqs_disabled() || in_atomic())
	if (in_interrupt() || irqs_disabled() || in_atomic()) {
		flags = GFP_ATOMIC;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
		/*
		 * Observed that kcompactd burns out CPU to make order-3 page.
		 *__netdev_alloc_skb has 4k page fallback option just in case of
		 * failing high order page allocation so we don't need to be
		 * hard. Make kcompactd rest in piece.
		 */
		flags = flags & ~__GFP_KSWAPD_RECLAIM;
#endif
	}

	skb = __netdev_alloc_skb(NULL, size, flags);