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

Commit eaebfca8 authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: ipa3: add support for WAN UL aggregation



Configure IPA HW to support receiving aggregated packets from APPS
on WAN uplink pipe. The enablement of WAN UL aggregation is based on
netmgr client configurations.

Change-Id: Icadb74f9913a0c02627a44ceea2e3d0f16480b8a
CRs-Fixed: 2105958
Acked-by: default avatarAdy Abraham <adya@qti.qualcomm.com>
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent f3fbc3a3
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -2683,6 +2683,21 @@ static int ipa3_assign_policy(struct ipa_sys_connect_params *in,
		return 0;
	}

	if (in->client == IPA_CLIENT_APPS_WAN_PROD) {
		sys->policy = IPA_POLICY_INTR_MODE;
		sys->use_comm_evt_ring = true;
		INIT_WORK(&sys->work, ipa3_send_nop_desc);

		/*
		 * enable source notification status for exception packets
		 * (i.e. QMAP commands) to be routed to modem.
		 */
		sys->ep->status.status_en = true;
		sys->ep->status.status_ep =
			ipa3_get_ep_mapping(IPA_CLIENT_Q6_WAN_CONS);
		return 0;
	}

	if (IPA_CLIENT_IS_MEMCPY_DMA_PROD(in->client)) {
		sys->policy = IPA_POLICY_NOINTR_MODE;
		return 0;
+6 −15
Original line number Diff line number Diff line
@@ -1086,7 +1086,6 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev)
	int ret = 0;
	bool qmap_check;
	struct ipa3_wwan_private *wwan_ptr = netdev_priv(dev);
	struct ipa_tx_meta meta;

	if (skb->protocol != htons(ETH_P_MAP)) {
		IPAWANDBG_LOW
@@ -1142,17 +1141,11 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev)
	}
	/* IPA_RM checking end */

	if (RMNET_MAP_GET_CD_BIT(skb)) {
		memset(&meta, 0, sizeof(meta));
		meta.pkt_init_dst_ep_valid = true;
		meta.pkt_init_dst_ep_remote = true;
		meta.pkt_init_dst_ep =
			ipa3_get_ep_mapping(IPA_CLIENT_Q6_WAN_CONS);
		ret = ipa3_tx_dp(IPA_CLIENT_APPS_WAN_PROD, skb, &meta);
	} else {
	/*
	 * both data packets and command will be routed to
	 * IPA_CLIENT_Q6_WAN_CONS based on status configuration
	 */
	ret = ipa3_tx_dp(IPA_CLIENT_APPS_WAN_PROD, skb, NULL);
	}

	if (ret) {
		ret = NETDEV_TX_BUSY;
		goto out;
@@ -1373,9 +1366,7 @@ static int handle3_egress_format(struct net_device *dev,
	}

	if ((e->u.data) & RMNET_IOCTL_EGRESS_FORMAT_AGGREGATION) {
		IPAWANERR("WAN UL Aggregation not supported!!\n");
		WARN_ON(1);
		return -EINVAL;
		IPAWANDBG("WAN UL Aggregation enabled\n");
		ipa_wan_ep_cfg->ipa_ep_cfg.aggr.aggr_en = IPA_ENABLE_DEAGGR;
		ipa_wan_ep_cfg->ipa_ep_cfg.aggr.aggr = IPA_QCMAP;