mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-08-18 12:21:01 +00:00
bus: mhi: devices: netdev: Use netdev_tx_t for ndo_start_xmit
In order to ensure that a CFI error does not take place, use the appropriate return type for mhi_netdev_xmit(). Change-Id: Id31295fea61dabe32bdd2ea31c26f100831c1930 Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
This commit is contained in:
committed by
Nolen Johnson
parent
a23387f38d
commit
704de86096
@ -544,18 +544,19 @@ static int mhi_netdev_change_mtu(struct net_device *dev, int new_mtu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mhi_netdev_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
static netdev_tx_t mhi_netdev_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct mhi_netdev_priv *mhi_netdev_priv = netdev_priv(dev);
|
||||
struct mhi_netdev *mhi_netdev = mhi_netdev_priv->mhi_netdev;
|
||||
struct mhi_device *mhi_dev = mhi_netdev->mhi_dev;
|
||||
int res = 0;
|
||||
netdev_tx_t res = NETDEV_TX_OK;
|
||||
int ret;
|
||||
|
||||
MSG_VERB("Entered\n");
|
||||
|
||||
res = mhi_queue_transfer(mhi_dev, DMA_TO_DEVICE, skb, skb->len,
|
||||
ret = mhi_queue_transfer(mhi_dev, DMA_TO_DEVICE, skb, skb->len,
|
||||
MHI_EOT);
|
||||
if (res) {
|
||||
if (ret) {
|
||||
MSG_VERB("Failed to queue with reason:%d\n", res);
|
||||
netif_stop_queue(dev);
|
||||
res = NETDEV_TX_BUSY;
|
||||
|
||||
Reference in New Issue
Block a user