qcacmn: QDF API for skb_clone_fraglist along with copy expand

Add API wrapper function for skb_clone_fraglist along
with skb_copy_expand.

Change-Id: Ib03e16566368d75a7a547fea6fd863e6411f98ef
Esse commit está contido em:
nobelj
2020-03-01 19:33:38 -08:00
commit de nshrivas
commit 7b76263659
2 arquivos alterados com 39 adições e 0 exclusões

Ver arquivo

@@ -1697,8 +1697,32 @@ static inline qdf_nbuf_t qdf_nbuf_copy_expand(qdf_nbuf_t buf, int headroom,
{
return __qdf_nbuf_copy_expand(buf, headroom, tailroom);
}
#endif /* NBUF_MEMORY_DEBUG */
/**
* qdf_nbuf_copy_expand_fraglist() - copy and expand nbuf and
* get reference of the fraglist.
* @buf: Network buf instance
* @headroom: Additional headroom to be added
* @tailroom: Additional tailroom to be added
*
* Return: New nbuf that is a copy of buf, with additional head and tailroom
* or NULL if there is no memory
*/
static inline qdf_nbuf_t
qdf_nbuf_copy_expand_fraglist(qdf_nbuf_t buf, int headroom,
int tailroom)
{
buf = qdf_nbuf_copy_expand(buf, headroom, tailroom);
/* get fraglist reference */
if (buf)
__qdf_nbuf_get_ref_fraglist(buf);
return buf;
}
#ifdef WLAN_FEATURE_FASTPATH
/**
* qdf_nbuf_init_fast() - before put buf into pool,turn it to init state

Ver arquivo

@@ -1927,6 +1927,21 @@ __qdf_nbuf_copy_expand(struct sk_buff *buf, int headroom, int tailroom)
return skb_copy_expand(buf, headroom, tailroom, GFP_ATOMIC);
}
/**
* __qdf_nbuf_get_ref_fraglist() - get reference to fragments
* @buf: Network buf instance
*
* Return: void
*/
static inline void
__qdf_nbuf_get_ref_fraglist(struct sk_buff *buf)
{
struct sk_buff *list;
skb_walk_frags(buf, list)
skb_get(list);
}
/**
* __qdf_nbuf_tx_cksum_info() - tx checksum info
*