forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/net/wan/cosa.c
....@@ -1,22 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* $Id: cosa.c,v 1.31 2000/03/08 17:47:16 kas Exp $ */
23
34 /*
45 * Copyright (C) 1995-1997 Jan "Yenya" Kasprzak <kas@fi.muni.cz>
56 * Generic HDLC port Copyright (C) 2008 Krzysztof Halasa <khc@pm.waw.pl>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program; if not, write to the Free Software
19
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
207 */
218
229 /*
....@@ -25,7 +12,7 @@
2512 * HARDWARE INFO
2613 *
2714 * Both cards are developed at the Institute of Computer Science,
28
- * Masaryk University (http://www.ics.muni.cz/). The hardware is
15
+ * Masaryk University (https://www.ics.muni.cz/). The hardware is
2916 * developed by Jiri Novotny <novotny@ics.muni.cz>. More information
3017 * and the photo of both cards is available at
3118 * http://www.pavoucek.cz/cosa.html. The card documentation, firmwares
....@@ -48,7 +35,7 @@
4835 *
4936 * SOFTWARE INFO
5037 *
51
- * The homepage of the Linux driver is at http://www.fi.muni.cz/~kas/cosa/.
38
+ * The homepage of the Linux driver is at https://www.fi.muni.cz/~kas/cosa/.
5239 * The CVS tree of Linux driver can be viewed there, as well as the
5340 * firmware binaries and user-space utilities for downloading the firmware
5441 * into the card and setting up the card.
....@@ -281,7 +268,7 @@
281268 unsigned short parity);
282269 static int cosa_net_open(struct net_device *d);
283270 static int cosa_net_close(struct net_device *d);
284
-static void cosa_net_timeout(struct net_device *d);
271
+static void cosa_net_timeout(struct net_device *d, unsigned int txqueue);
285272 static netdev_tx_t cosa_net_tx(struct sk_buff *skb, struct net_device *d);
286273 static char *cosa_net_setup_rx(struct channel_data *channel, int size);
287274 static int cosa_net_rx_done(struct channel_data *channel);
....@@ -683,7 +670,7 @@
683670 return NETDEV_TX_OK;
684671 }
685672
686
-static void cosa_net_timeout(struct net_device *dev)
673
+static void cosa_net_timeout(struct net_device *dev, unsigned int txqueue)
687674 {
688675 struct channel_data *chan = dev_to_chan(dev);
689676
....@@ -769,7 +756,7 @@
769756 chan->netdev->stats.tx_aborted_errors++;
770757 return 1;
771758 }
772
- dev_kfree_skb_irq(chan->tx_skb);
759
+ dev_consume_skb_irq(chan->tx_skb);
773760 chan->tx_skb = NULL;
774761 chan->netdev->stats.tx_packets++;
775762 chan->netdev->stats.tx_bytes += size;