Skip to content

Commit

Permalink
net: macb: use netdev_tx_t return type for ndo_start_xmit functions
Browse files Browse the repository at this point in the history
Use netdev_tx_t return type for ndo_start_xmit function of macb driver.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Claudiu Beznea authored and David S. Miller committed Aug 7, 2018
1 parent 334b126 commit d1c3895
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/ethernet/cadence/macb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,7 @@ static inline int macb_clear_csum(struct sk_buff *skb)
return 0;
}

static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
u16 queue_index = skb_get_queue_mapping(skb);
struct macb *bp = netdev_priv(dev);
Expand All @@ -1660,6 +1660,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
unsigned int desc_cnt, nr_frags, frag_size, f;
unsigned int hdrlen;
bool is_lso, is_udp = 0;
netdev_tx_t ret = NETDEV_TX_OK;

is_lso = (skb_shinfo(skb)->gso_size != 0);

Expand Down Expand Up @@ -1739,7 +1740,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
unlock:
spin_unlock_irqrestore(&bp->lock, flags);

return NETDEV_TX_OK;
return ret;
}

static void macb_init_rx_buffer_size(struct macb *bp, size_t size)
Expand Down Expand Up @@ -3549,7 +3550,8 @@ static int at91ether_close(struct net_device *dev)
}

/* Transmit packet */
static int at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t at91ether_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct macb *lp = netdev_priv(dev);

Expand Down

0 comments on commit d1c3895

Please sign in to comment.