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

Commit c16ceb28 authored by Sivakanth vaka's avatar Sivakanth vaka
Browse files

ipa3: msm: Standalone CV2X changes



remove QMAP aggregation to Support Cv2X on WAN
pipe by for standalone usecases.

Change-Id: Iea68c9428ec653f192ec03e4a03da1556a77f5fe
Signed-off-by: default avatarsivakanth reddy vaka <svaka@codeaurora.org>
parent 9f1d30da
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -3748,6 +3748,9 @@ static int ipa3_assign_policy(struct ipa_sys_connect_params *in,
				IPA_GENERIC_RX_BUFF_BASE_SZ);
				IPA_GENERIC_RX_BUFF_BASE_SZ);
			sys->get_skb = ipa3_get_skb_ipa_rx;
			sys->get_skb = ipa3_get_skb_ipa_rx;
			sys->free_skb = ipa3_free_skb_rx;
			sys->free_skb = ipa3_free_skb_rx;
			if (in->bypass_agg)
				in->ipa_ep_cfg.aggr.aggr_en = IPA_BYPASS_AGGR;
			else
				in->ipa_ep_cfg.aggr.aggr_en = IPA_ENABLE_AGGR;
				in->ipa_ep_cfg.aggr.aggr_en = IPA_ENABLE_AGGR;
			if (in->client == IPA_CLIENT_APPS_WAN_COAL_CONS)
			if (in->client == IPA_CLIENT_APPS_WAN_COAL_CONS)
				in->ipa_ep_cfg.aggr.aggr = IPA_COALESCE;
				in->ipa_ep_cfg.aggr.aggr = IPA_COALESCE;
+37 −14
Original line number Original line Diff line number Diff line
/* Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * it under the terms of the GNU General Public License version 2 and
@@ -171,6 +171,7 @@ struct rmnet_ipa3_context {
	atomic_t ap_suspend;
	atomic_t ap_suspend;
	bool ipa_config_is_apq;
	bool ipa_config_is_apq;
	bool ipa_mhi_aggr_formet_set;
	bool ipa_mhi_aggr_formet_set;
	bool no_qmap_config;
};
};


static struct rmnet_ipa3_context *rmnet_ipa3_ctx;
static struct rmnet_ipa3_context *rmnet_ipa3_ctx;
@@ -1248,7 +1249,8 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev)
		return NETDEV_TX_OK;
		return NETDEV_TX_OK;
	}
	}


	if (skb->protocol != htons(ETH_P_MAP)) {
	if (skb->protocol != htons(ETH_P_MAP) &&
		(!rmnet_ipa3_ctx->no_qmap_config)) {
		IPAWANDBG_LOW
		IPAWANDBG_LOW
		("SW filtering out none QMAP packet received from %s",
		("SW filtering out none QMAP packet received from %s",
		current->comm);
		current->comm);
@@ -1269,6 +1271,10 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev)
		return NETDEV_TX_BUSY;
		return NETDEV_TX_BUSY;
	}
	}
	if (netif_queue_stopped(dev)) {
	if (netif_queue_stopped(dev)) {
		if (rmnet_ipa3_ctx->no_qmap_config) {
			spin_unlock_irqrestore(&wwan_ptr->lock, flags);
			return NETDEV_TX_BUSY;
		} else {
			if (qmap_check &&
			if (qmap_check &&
				atomic_read(&wwan_ptr->outstanding_pkts) <
				atomic_read(&wwan_ptr->outstanding_pkts) <
					outstanding_high_ctl) {
					outstanding_high_ctl) {
@@ -1282,6 +1288,7 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev)
				return NETDEV_TX_BUSY;
				return NETDEV_TX_BUSY;
			}
			}
		}
		}
	}


	/* checking High WM hit */
	/* checking High WM hit */
	if (atomic_read(&wwan_ptr->outstanding_pkts) >=
	if (atomic_read(&wwan_ptr->outstanding_pkts) >=
@@ -1450,6 +1457,7 @@ static void apps_ipa_packet_receive_notify(void *priv,


		IPAWANDBG_LOW("Rx packet was received");
		IPAWANDBG_LOW("Rx packet was received");
		skb->dev = IPA_NETDEV();
		skb->dev = IPA_NETDEV();
		if (!rmnet_ipa3_ctx->no_qmap_config)
			skb->protocol = htons(ETH_P_MAP);
			skb->protocol = htons(ETH_P_MAP);


		if (ipa3_rmnet_res.ipa_napi_enable) {
		if (ipa3_rmnet_res.ipa_napi_enable) {
@@ -1524,6 +1532,12 @@ static int handle3_ingress_format(struct net_device *dev,
		IPAWANDBG("DL chksum set\n");
		IPAWANDBG("DL chksum set\n");
	}
	}



	if ((in->u.data) & RMNET_IOCTL_INGRESS_FORMAT_IP_ROUTE) {
		rmnet_ipa3_ctx->no_qmap_config = true;
		ipa_wan_ep_cfg->bypass_agg = true;
	}

	if ((in->u.data) & RMNET_IOCTL_INGRESS_FORMAT_AGG_DATA) {
	if ((in->u.data) & RMNET_IOCTL_INGRESS_FORMAT_AGG_DATA) {
		IPAWANDBG("get AGG size %d count %d\n",
		IPAWANDBG("get AGG size %d count %d\n",
				  in->u.ingress_format.agg_size,
				  in->u.ingress_format.agg_size,
@@ -1546,8 +1560,11 @@ static int handle3_ingress_format(struct net_device *dev,
		ipa_wan_ep_cfg->ipa_ep_cfg.hdr.hdr_len = 8;
		ipa_wan_ep_cfg->ipa_ep_cfg.hdr.hdr_len = 8;
		rmnet_ipa3_ctx->dl_csum_offload_enabled = true;
		rmnet_ipa3_ctx->dl_csum_offload_enabled = true;
	} else {
	} else {
		ipa_wan_ep_cfg->ipa_ep_cfg.hdr.hdr_len = 4;
		rmnet_ipa3_ctx->dl_csum_offload_enabled = false;
		rmnet_ipa3_ctx->dl_csum_offload_enabled = false;
		if (rmnet_ipa3_ctx->no_qmap_config)
			ipa_wan_ep_cfg->ipa_ep_cfg.hdr.hdr_len = 0;
		else
			ipa_wan_ep_cfg->ipa_ep_cfg.hdr.hdr_len = 4;
	}
	}


	ipa_wan_ep_cfg->ipa_ep_cfg.hdr.hdr_ofst_metadata_valid = 1;
	ipa_wan_ep_cfg->ipa_ep_cfg.hdr.hdr_ofst_metadata_valid = 1;
@@ -1652,6 +1669,9 @@ static int handle3_egress_format(struct net_device *dev,
		return -EFAULT;
		return -EFAULT;
	}
	}


	if ((e->u.data) & RMNET_IOCTL_EGRESS_FORMAT_IP_ROUTE)
		rmnet_ipa3_ctx->no_qmap_config = true;

	ipa_wan_ep_cfg = &rmnet_ipa3_ctx->apps_to_ipa_ep_cfg;
	ipa_wan_ep_cfg = &rmnet_ipa3_ctx->apps_to_ipa_ep_cfg;
	if ((e->u.data) & RMNET_IOCTL_EGRESS_FORMAT_CHECKSUM) {
	if ((e->u.data) & RMNET_IOCTL_EGRESS_FORMAT_CHECKSUM) {
		IPAWANDBG("UL chksum set\n");
		IPAWANDBG("UL chksum set\n");
@@ -1660,6 +1680,9 @@ static int handle3_egress_format(struct net_device *dev,
			IPA_ENABLE_CS_OFFLOAD_UL;
			IPA_ENABLE_CS_OFFLOAD_UL;
		ipa_wan_ep_cfg->ipa_ep_cfg.cfg.cs_metadata_hdr_offset = 1;
		ipa_wan_ep_cfg->ipa_ep_cfg.cfg.cs_metadata_hdr_offset = 1;
	} else {
	} else {
		if (rmnet_ipa3_ctx->no_qmap_config)
			ipa_wan_ep_cfg->ipa_ep_cfg.hdr.hdr_len = 0;
		else
			ipa_wan_ep_cfg->ipa_ep_cfg.hdr.hdr_len = 4;
			ipa_wan_ep_cfg->ipa_ep_cfg.hdr.hdr_len = 4;
	}
	}


+2 −0
Original line number Original line Diff line number Diff line
@@ -682,6 +682,7 @@ struct ipa_ext_intf {
 *  by IPA driver
 *  by IPA driver
 * @keep_ipa_awake: when true, IPA will not be clock gated
 * @keep_ipa_awake: when true, IPA will not be clock gated
 * @napi_enabled: when true, IPA call client callback to start polling
 * @napi_enabled: when true, IPA call client callback to start polling
 * @bypass_agg: when true, IPA bypasses the aggregation
 */
 */
struct ipa_sys_connect_params {
struct ipa_sys_connect_params {
	struct ipa_ep_cfg ipa_ep_cfg;
	struct ipa_ep_cfg ipa_ep_cfg;
@@ -694,6 +695,7 @@ struct ipa_sys_connect_params {
	struct napi_struct *napi_obj;
	struct napi_struct *napi_obj;
	bool napi_enabled;
	bool napi_enabled;
	bool recycle_enabled;
	bool recycle_enabled;
	bool bypass_agg;
};
};


/**
/**