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

Commit 6edb7067 authored by Chris Lew's avatar Chris Lew
Browse files

net: qrtr: Align header and payload



Remote IPC Router drivers expect the received packet to be aligned.
This case is only exposed using the MHI transport because it does not
ensure the packet will be received as one chunk like RPMSG GLINK.

Change-Id: I0e5c27e3c5896e6721c8bbbfcda29551f0968626
Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent 881e2c32
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015, Sony Mobile Communications Inc.
 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013, 2018 The Linux Foundation. All rights reserved.
 */
#include <linux/module.h>
#include <linux/netlink.h>
@@ -358,7 +358,7 @@ static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb,
	hdr->size = cpu_to_le32(len);
	hdr->confirm_rx = !!confirm_rx;

	skb_put_padto(skb, ALIGN(len, 4));
	skb_put_padto(skb, ALIGN(len, 4) + sizeof(*hdr));

	mutex_lock(&node->ep_lock);
	if (node->ep)