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

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

Merge "msm: ipa3: Fix spin_unlock_bh warning in wan driver"

parents dcd150d9 9cfd7024
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -1305,25 +1305,32 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev)
	}
	/* IPA_PM checking end */

	/*
	 * increase the outstanding_pkts count first
	 * to avoid suspend happens in parallel
	 * after unlock
	 */
	atomic_inc(&wwan_ptr->outstanding_pkts);
	spin_unlock_irqrestore(&wwan_ptr->lock, flags);

	/*
	 * 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) {
		atomic_dec(&wwan_ptr->outstanding_pkts);
		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;
	}

	atomic_inc(&wwan_ptr->outstanding_pkts);
	dev->stats.tx_packets++;
	dev->stats.tx_bytes += skb->len;
	ret = NETDEV_TX_OK;
@@ -1333,7 +1340,6 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev)
		ipa_pm_deferred_deactivate(rmnet_ipa3_ctx->q6_pm_hdl);

	}
	spin_unlock_irqrestore(&wwan_ptr->lock, flags);
	return ret;
}