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

Commit e4efd9d6 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 eee67459 deaa9369
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -1321,7 +1321,14 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev)
		spin_unlock_irqrestore(&wwan_ptr->lock, flags);
		return NETDEV_TX_OK;
	}
	/*
	 * increase the outstanding_pkts count first
	 * to avoid suspend happens in parallel
	 * after unlock
	 */
	atomic_inc(&wwan_ptr->outstanding_pkts);
	/* IPA_RM checking end */
	spin_unlock_irqrestore(&wwan_ptr->lock, flags);

	/*
	 * both data packets and command will be routed to
@@ -1329,19 +1336,18 @@ 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) {
		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;
@@ -1355,7 +1361,6 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev)
				IPA_RM_RESOURCE_WWAN_0_PROD);
		}
	}
	spin_unlock_irqrestore(&wwan_ptr->lock, flags);
	return ret;
}