| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * ASIX AX88172A based USB 2.0 Ethernet Devices |
|---|
| 3 | 4 | * Copyright (C) 2012 OMICRON electronics GmbH |
|---|
| .. | .. |
|---|
| 9 | 10 | * Copyright (C) 2005 Phil Chang <pchang23@sbcglobal.net> |
|---|
| 10 | 11 | * Copyright (C) 2006 James Painter <jamie.painter@iname.com> |
|---|
| 11 | 12 | * 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/>. |
|---|
| 25 | 13 | */ |
|---|
| 26 | 14 | |
|---|
| 27 | 15 | #include "asix.h" |
|---|
| .. | .. |
|---|
| 49 | 37 | { |
|---|
| 50 | 38 | asix_mdio_write(((struct usbnet *)bus->priv)->net, phy_id, regnum, val); |
|---|
| 51 | 39 | 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); |
|---|
| 63 | 40 | } |
|---|
| 64 | 41 | |
|---|
| 65 | 42 | /* set MAC link settings according to information from phylib */ |
|---|
| .. | .. |
|---|
| 146 | 123 | .ndo_get_stats64 = usbnet_get_stats64, |
|---|
| 147 | 124 | .ndo_set_mac_address = asix_set_mac_address, |
|---|
| 148 | 125 | .ndo_validate_addr = eth_validate_addr, |
|---|
| 149 | | - .ndo_do_ioctl = ax88172a_ioctl, |
|---|
| 126 | + .ndo_do_ioctl = phy_do_ioctl_running, |
|---|
| 150 | 127 | .ndo_set_rx_mode = asix_set_multicast, |
|---|
| 151 | 128 | }; |
|---|
| 152 | 129 | |
|---|