forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-09 244b2c5ca8b14627e4a17755e5922221e121c771
kernel/drivers/net/usb/ax88172a.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * ASIX AX88172A based USB 2.0 Ethernet Devices
34 * Copyright (C) 2012 OMICRON electronics GmbH
....@@ -9,19 +10,6 @@
910 * Copyright (C) 2005 Phil Chang <pchang23@sbcglobal.net>
1011 * Copyright (C) 2006 James Painter <jamie.painter@iname.com>
1112 * Copyright (c) 2002-2003 TiVo Inc.
12
- *
13
- * This program is free software; you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation; either version 2 of the License, or
16
- * (at your option) any later version.
17
- *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
22
- *
23
- * You should have received a copy of the GNU General Public License
24
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
2513 */
2614
2715 #include "asix.h"
....@@ -49,17 +37,6 @@
4937 {
5038 asix_mdio_write(((struct usbnet *)bus->priv)->net, phy_id, regnum, val);
5139 return 0;
52
-}
53
-
54
-static int ax88172a_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
55
-{
56
- if (!netif_running(net))
57
- return -EINVAL;
58
-
59
- if (!net->phydev)
60
- return -ENODEV;
61
-
62
- return phy_mii_ioctl(net->phydev, rq, cmd);
6340 }
6441
6542 /* set MAC link settings according to information from phylib */
....@@ -146,7 +123,7 @@
146123 .ndo_get_stats64 = usbnet_get_stats64,
147124 .ndo_set_mac_address = asix_set_mac_address,
148125 .ndo_validate_addr = eth_validate_addr,
149
- .ndo_do_ioctl = ax88172a_ioctl,
126
+ .ndo_do_ioctl = phy_do_ioctl_running,
150127 .ndo_set_rx_mode = asix_set_multicast,
151128 };
152129