Skip to content

Commit

Permalink
wilc1000: let wilc_mac_xmit() return NETDEV_TX_OK
Browse files Browse the repository at this point in the history
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type defining 'NETDEV_TX_OK' but this
driver returns '0' instead of 'NETDEV_TX_OK'.

Fix this by returning 'NETDEV_TX_OK' instead of '0'.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200629104009.84077-1-luc.vanoostenryck@gmail.com
  • Loading branch information
lucvoo authored and Kalle Valo committed Jul 14, 2020
1 parent b52b331 commit cce0e08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/wireless/microchip/wilc1000/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,14 +684,14 @@ netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)

if (skb->dev != ndev) {
netdev_err(ndev, "Packet not destined to this device\n");
return 0;
return NETDEV_TX_OK;
}

tx_data = kmalloc(sizeof(*tx_data), GFP_ATOMIC);
if (!tx_data) {
dev_kfree_skb(skb);
netif_wake_queue(ndev);
return 0;
return NETDEV_TX_OK;
}

tx_data->buff = skb->data;
Expand All @@ -716,7 +716,7 @@ netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
srcu_read_unlock(&wilc->srcu, srcu_idx);
}

return 0;
return NETDEV_TX_OK;
}

static int wilc_mac_close(struct net_device *ndev)
Expand Down

0 comments on commit cce0e08

Please sign in to comment.