b12295413c0d59ae2a6260e8f6787ae0ebd06908
[linux-2.6-microblaze.git] / drivers / net / ethernet / sfc / ef100_tx.c
1 // SPDX-License-Identifier: GPL-2.0-only
2 /****************************************************************************
3  * Driver for Solarflare network controllers and boards
4  * Copyright 2018 Solarflare Communications Inc.
5  * Copyright 2019-2020 Xilinx Inc.
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License version 2 as published
9  * by the Free Software Foundation, incorporated herein by reference.
10  */
11
12 #include "net_driver.h"
13 #include "tx_common.h"
14 #include "nic_common.h"
15 #include "ef100_tx.h"
16
17 /* Add a socket buffer to a TX queue
18  *
19  * You must hold netif_tx_lock() to call this function.
20  *
21  * Returns 0 on success, error code otherwise. In case of an error this
22  * function will free the SKB.
23  */
24 int ef100_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb)
25 {
26         /* Stub.  No TX path yet. */
27         struct efx_nic *efx = tx_queue->efx;
28
29         netif_stop_queue(efx->net_dev);
30         dev_kfree_skb_any(skb);
31         return -ENODEV;
32 }