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

Commit cf63d320 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa3: Drop WAN TX packets when pipe is down in ssr"

parents ea962984 f561a0eb
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1640,8 +1640,8 @@ int ipa3_tx_dp(enum ipa_client_type dst, struct sk_buff *skb,
	sys = ipa3_ctx->ep[src_ep_idx].sys;

	if (!sys || !sys->ep->valid) {
		IPAERR_RL("pipe not valid\n");
		goto fail_gen;
		IPAERR_RL("pipe %d not valid\n", src_ep_idx);
		goto fail_pipe_not_valid;
	}

	num_frags = skb_shinfo(skb)->nr_frags;
@@ -1809,6 +1809,8 @@ int ipa3_tx_dp(enum ipa_client_type dst, struct sk_buff *skb,
		kfree(desc);
fail_gen:
	return -EFAULT;
fail_pipe_not_valid:
	return -EPIPE;
}

static void ipa3_wq_handle_rx(struct work_struct *work)
+10 −1
Original line number Diff line number Diff line
@@ -1284,7 +1284,7 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev)
		dev_kfree_skb_any(skb);
		dev->stats.tx_dropped++;
		spin_unlock_irqrestore(&wwan_ptr->lock, flags);
		return -EFAULT;
		return NETDEV_TX_OK;
	}
	/* IPA_RM checking end */

@@ -1294,6 +1294,14 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev)
	 */
	ret = ipa3_tx_dp(IPA_CLIENT_APPS_WAN_PROD, skb, NULL);
	if (ret) {
		if (ret == -EPIPE) {
			IPAWANERR_RL("[%s] fatal: pipe is not valid\n",
				dev->name);
			dev_kfree_skb_any(skb);
			dev->stats.tx_dropped++;
			spin_unlock_irqrestore(&wwan_ptr->lock, flags);
			return NETDEV_TX_OK;
		}
		ret = NETDEV_TX_BUSY;
		goto out;
	}
@@ -2803,6 +2811,7 @@ static int ipa3_wwan_remove(struct platform_device *pdev)
	if (ipa3_rmnet_res.ipa_napi_enable)
		netif_napi_del(&(rmnet_ipa3_ctx->wwan_priv->napi));
	mutex_unlock(&rmnet_ipa3_ctx->pipe_handle_guard);
	IPAWANINFO("rmnet_ipa unregister_netdev\n");
	unregister_netdev(IPA_NETDEV());
	if (ipa3_ctx->use_ipa_pm)
		ipa3_wwan_deregister_netdev_pm_client();