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

Commit 6a8f8106 authored by Tianyi Gou's avatar Tianyi Gou Committed by Subash Abhinov Kasiviswanathan
Browse files

msm_rmnet: add ioctl to enable/disable flow on prio qdisc



This ioctl provides a shorter route to enable/disable flow
on a given qdisc when compared to the traditional NETLINK
based communication. It is known to improve throughput when
data flow is throttled at a higher rate.

Change-Id: I8533887c8a7caffe3b17320dc044f28388ba8b83
Acked-by: default avatarJimi Shah <jimis@qualcomm.com>
Signed-off-by: default avatarTianyi Gou <tgou@codeaurora.org>
[subashab@codeaurora.org: add changes specific to msm_rmnet_bam.c]
Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
parent dcdbcacf
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include <linux/if_arp.h>
#include <linux/msm_rmnet.h>
#include <linux/platform_device.h>
#include <net/pkt_sched.h>

#ifdef CONFIG_HAS_EARLYSUSPEND
#include <linux/earlysuspend.h>
@@ -638,6 +639,16 @@ static int rmnet_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
			dev->name);
		break;

	case RMNET_IOCTL_FLOW_ENABLE:
		tc_qdisc_flow_control(dev, (u32)ifr->ifr_data, 1);
		DBG0("[%s] rmnet_ioctl(): enabled flow", dev->name);
		break;

	case RMNET_IOCTL_FLOW_DISABLE:
		tc_qdisc_flow_control(dev, (u32)ifr->ifr_data, 0);
		DBG0("[%s] rmnet_ioctl(): disabled flow", dev->name);
		break;

	case RMNET_IOCTL_GET_QOS:           /* Get QoS header state    */
		ifr->ifr_ifru.ifru_data =
			(void *)(p->operation_mode & RMNET_MODE_QOS);