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

Commit d816309f authored by Sujeev Dias's avatar Sujeev Dias Committed by Chris Lew
Browse files

mhi: dev: netdev: add debugfs hook to disable SKB chaining



Add debugfs entries to disable chaining of SKBs from MHI network
driver.

CRs-Fixed: 2482422
Change-Id: Ic8731fa293828a50245e5ea46d7770cd6703085c
Acked-by: default avatarBhaumik Vasav Bhatt <bbhatt@qti.qualcomm.com>
Signed-off-by: default avatarSujeev Dias <sdias@codeaurora.org>
parent 6d6aa1c9
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -866,6 +866,22 @@ static const struct file_operations debugfs_stats = {
	.read = seq_read,
};

int mhi_netdev_debugfs_chain(void *data, u64 val)
{
	struct mhi_netdev *mhi_netdev = data;
	struct mhi_netdev *rsc_dev = mhi_netdev->rsc_dev;

	mhi_netdev->chain = NULL;

	if (rsc_dev)
		rsc_dev->chain = NULL;

	return 0;
}

DEFINE_DEBUGFS_ATTRIBUTE(debugfs_chain, NULL,
			 mhi_netdev_debugfs_chain, "%llu\n");

static void mhi_netdev_create_debugfs(struct mhi_netdev *mhi_netdev)
{
	char node_name[32];
@@ -885,6 +901,8 @@ static void mhi_netdev_create_debugfs(struct mhi_netdev *mhi_netdev)

	debugfs_create_file_unsafe("stats", 0444, mhi_netdev->dentry,
				   mhi_netdev, &debugfs_stats);
	debugfs_create_file_unsafe("chain", 0444, mhi_netdev->dentry,
				   mhi_netdev, &debugfs_chain);
}

static void mhi_netdev_create_debugfs_dir(void)