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

Commit 8bdd8b34 authored by Jay Jayanna's avatar Jay Jayanna Committed by Chris Lew
Browse files

net: qrtr: Use alloc_skb_with_frags for backup memory



Use alloc_skb_with_frags for skb allocation to keep it uniform
throughout the rx path.

Change-Id: Id38eeea0a7d422b50c1ad6a90b9b569f26c45917
Signed-off-by: default avatarJay Jayanna <jayanna@codeaurora.org>
parent 3e4aa12f
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -728,15 +728,20 @@ EXPORT_SYMBOL(qrtr_peek_pkt_size);
static void qrtr_alloc_backup(struct work_struct *work)
{
	struct sk_buff *skb;
	int errcode;

	while (skb_queue_len(&qrtr_backup_lo) < QRTR_BACKUP_LO_NUM) {
		skb = alloc_skb(QRTR_BACKUP_LO_SIZE, GFP_KERNEL);
		skb = alloc_skb_with_frags(sizeof(struct qrtr_hdr_v1),
					   QRTR_BACKUP_LO_SIZE, 0, &errcode,
					   GFP_KERNEL);
		if (!skb)
			break;
		skb_queue_tail(&qrtr_backup_lo, skb);
	}
	while (skb_queue_len(&qrtr_backup_hi) < QRTR_BACKUP_HI_NUM) {
		skb = alloc_skb(QRTR_BACKUP_HI_SIZE, GFP_KERNEL);
		skb = alloc_skb_with_frags(sizeof(struct qrtr_hdr_v1),
					   QRTR_BACKUP_HI_SIZE, 0, &errcode,
					   GFP_KERNEL);
		if (!skb)
			break;
		skb_queue_tail(&qrtr_backup_hi, skb);