Skip to content

Commit 3231e5d

Browse files
hkallweitdavem330
authored andcommitted
net: phy: rename phy_do_ioctl to phy_do_ioctl_running
We just added phy_do_ioctl, but it turned out that we need another version of this function that doesn't check whether net_device is running. So rename phy_do_ioctl to phy_do_ioctl_running. Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bea5416 commit 3231e5d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5158,7 +5158,7 @@ static const struct net_device_ops rtl_netdev_ops = {
51585158
.ndo_fix_features = rtl8169_fix_features,
51595159
.ndo_set_features = rtl8169_set_features,
51605160
.ndo_set_mac_address = rtl_set_mac_address,
5161-
.ndo_do_ioctl = phy_do_ioctl,
5161+
.ndo_do_ioctl = phy_do_ioctl_running,
51625162
.ndo_set_rx_mode = rtl_set_rx_mode,
51635163
#ifdef CONFIG_NET_POLL_CONTROLLER
51645164
.ndo_poll_controller = rtl8169_netpoll,

drivers/net/phy/phy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,19 +433,19 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd)
433433
EXPORT_SYMBOL(phy_mii_ioctl);
434434

435435
/**
436-
* phy_do_ioctl - generic ndo_do_ioctl implementation
436+
* phy_do_ioctl_running - generic ndo_do_ioctl implementation
437437
* @dev: the net_device struct
438438
* @ifr: &struct ifreq for socket ioctl's
439439
* @cmd: ioctl cmd to execute
440440
*/
441-
int phy_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
441+
int phy_do_ioctl_running(struct net_device *dev, struct ifreq *ifr, int cmd)
442442
{
443443
if (!netif_running(dev) || !dev->phydev)
444444
return -ENODEV;
445445

446446
return phy_mii_ioctl(dev->phydev, ifr, cmd);
447447
}
448-
EXPORT_SYMBOL(phy_do_ioctl);
448+
EXPORT_SYMBOL(phy_do_ioctl_running);
449449

450450
void phy_queue_state_machine(struct phy_device *phydev, unsigned long jiffies)
451451
{

include/linux/phy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ void phy_ethtool_ksettings_get(struct phy_device *phydev,
12421242
int phy_ethtool_ksettings_set(struct phy_device *phydev,
12431243
const struct ethtool_link_ksettings *cmd);
12441244
int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);
1245-
int phy_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
1245+
int phy_do_ioctl_running(struct net_device *dev, struct ifreq *ifr, int cmd);
12461246
void phy_request_interrupt(struct phy_device *phydev);
12471247
void phy_free_interrupt(struct phy_device *phydev);
12481248
void phy_print_status(struct phy_device *phydev);

0 commit comments

Comments
 (0)