Skip to content

Commit

Permalink
fjes: net_device_ops.ndo_tx_timeout
Browse files Browse the repository at this point in the history
This patch adds net_device_ops.ndo_tx_timeout callback.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Taku Izumi authored and David S. Miller committed Aug 24, 2015
1 parent b9e23a6 commit 4393e76
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/fjes/fjes_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ static irqreturn_t fjes_intr(int, void*);
static struct rtnl_link_stats64 *
fjes_get_stats64(struct net_device *, struct rtnl_link_stats64 *);
static int fjes_change_mtu(struct net_device *, int);
static void fjes_tx_retry(struct net_device *);

static int fjes_acpi_add(struct acpi_device *);
static int fjes_acpi_remove(struct acpi_device *);
Expand Down Expand Up @@ -224,6 +225,7 @@ static const struct net_device_ops fjes_netdev_ops = {
.ndo_start_xmit = fjes_xmit_frame,
.ndo_get_stats64 = fjes_get_stats64,
.ndo_change_mtu = fjes_change_mtu,
.ndo_tx_timeout = fjes_tx_retry,
};

/* fjes_open - Called when a network interface is made active */
Expand Down Expand Up @@ -705,6 +707,13 @@ fjes_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
return ret;
}

static void fjes_tx_retry(struct net_device *netdev)
{
struct netdev_queue *queue = netdev_get_tx_queue(netdev, 0);

netif_tx_wake_queue(queue);
}

static struct rtnl_link_stats64 *
fjes_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats)
{
Expand Down

0 comments on commit 4393e76

Please sign in to comment.