efx.c (1ac731c529cd4d6adbce134754b51ff7d822b145) | efx.c (d82afc800c1e385205da9618f75369843e856e7a) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/**************************************************************************** 3 * Driver for Solarflare network controllers and boards 4 * Copyright 2005-2006 Fen Systems Ltd. 5 * Copyright 2005-2013 Solarflare Communications Inc. 6 */ 7 8#include <linux/filter.h> --- 481 unchanged lines hidden (view full) --- 490/* Net device ioctl 491 * Context: process, rtnl_lock() held. 492 */ 493static int efx_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd) 494{ 495 struct efx_nic *efx = netdev_priv(net_dev); 496 struct mii_ioctl_data *data = if_mii(ifr); 497 | 1// SPDX-License-Identifier: GPL-2.0-only 2/**************************************************************************** 3 * Driver for Solarflare network controllers and boards 4 * Copyright 2005-2006 Fen Systems Ltd. 5 * Copyright 2005-2013 Solarflare Communications Inc. 6 */ 7 8#include <linux/filter.h> --- 481 unchanged lines hidden (view full) --- 490/* Net device ioctl 491 * Context: process, rtnl_lock() held. 492 */ 493static int efx_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd) 494{ 495 struct efx_nic *efx = netdev_priv(net_dev); 496 struct mii_ioctl_data *data = if_mii(ifr); 497 |
498 if (cmd == SIOCSHWTSTAMP) 499 return efx_siena_ptp_set_ts_config(efx, ifr); 500 if (cmd == SIOCGHWTSTAMP) 501 return efx_siena_ptp_get_ts_config(efx, ifr); 502 | |
503 /* Convert phy_id from older PRTAD/DEVAD format */ 504 if ((cmd == SIOCGMIIREG || cmd == SIOCSMIIREG) && 505 (data->phy_id & 0xfc00) == 0x0400) 506 data->phy_id ^= MDIO_PHY_ID_C45 | 0x0400; 507 508 return mdio_mii_ioctl(&efx->mdio, data, cmd); 509} 510 --- 63 unchanged lines hidden (view full) --- 574 struct efx_nic *efx = netdev_priv(net_dev); 575 576 if (efx->type->vlan_rx_kill_vid) 577 return efx->type->vlan_rx_kill_vid(efx, proto, vid); 578 else 579 return -EOPNOTSUPP; 580} 581 | 498 /* Convert phy_id from older PRTAD/DEVAD format */ 499 if ((cmd == SIOCGMIIREG || cmd == SIOCSMIIREG) && 500 (data->phy_id & 0xfc00) == 0x0400) 501 data->phy_id ^= MDIO_PHY_ID_C45 | 0x0400; 502 503 return mdio_mii_ioctl(&efx->mdio, data, cmd); 504} 505 --- 63 unchanged lines hidden (view full) --- 569 struct efx_nic *efx = netdev_priv(net_dev); 570 571 if (efx->type->vlan_rx_kill_vid) 572 return efx->type->vlan_rx_kill_vid(efx, proto, vid); 573 else 574 return -EOPNOTSUPP; 575} 576 |
577static int efx_siena_hwtstamp_set(struct net_device *net_dev, 578 struct kernel_hwtstamp_config *config, 579 struct netlink_ext_ack *extack) 580{ 581 struct efx_nic *efx = netdev_priv(net_dev); 582 583 return efx_siena_ptp_set_ts_config(efx, config, extack); 584} 585 586static int efx_siena_hwtstamp_get(struct net_device *net_dev, 587 struct kernel_hwtstamp_config *config) 588{ 589 struct efx_nic *efx = netdev_priv(net_dev); 590 591 return efx_siena_ptp_get_ts_config(efx, config); 592} 593 |
|
582static const struct net_device_ops efx_netdev_ops = { 583 .ndo_open = efx_net_open, 584 .ndo_stop = efx_net_stop, 585 .ndo_get_stats64 = efx_siena_net_stats, 586 .ndo_tx_timeout = efx_siena_watchdog, 587 .ndo_start_xmit = efx_siena_hard_start_xmit, 588 .ndo_validate_addr = eth_validate_addr, 589 .ndo_eth_ioctl = efx_ioctl, 590 .ndo_change_mtu = efx_siena_change_mtu, 591 .ndo_set_mac_address = efx_siena_set_mac_address, 592 .ndo_set_rx_mode = efx_siena_set_rx_mode, 593 .ndo_set_features = efx_siena_set_features, 594 .ndo_features_check = efx_siena_features_check, 595 .ndo_vlan_rx_add_vid = efx_vlan_rx_add_vid, 596 .ndo_vlan_rx_kill_vid = efx_vlan_rx_kill_vid, | 594static const struct net_device_ops efx_netdev_ops = { 595 .ndo_open = efx_net_open, 596 .ndo_stop = efx_net_stop, 597 .ndo_get_stats64 = efx_siena_net_stats, 598 .ndo_tx_timeout = efx_siena_watchdog, 599 .ndo_start_xmit = efx_siena_hard_start_xmit, 600 .ndo_validate_addr = eth_validate_addr, 601 .ndo_eth_ioctl = efx_ioctl, 602 .ndo_change_mtu = efx_siena_change_mtu, 603 .ndo_set_mac_address = efx_siena_set_mac_address, 604 .ndo_set_rx_mode = efx_siena_set_rx_mode, 605 .ndo_set_features = efx_siena_set_features, 606 .ndo_features_check = efx_siena_features_check, 607 .ndo_vlan_rx_add_vid = efx_vlan_rx_add_vid, 608 .ndo_vlan_rx_kill_vid = efx_vlan_rx_kill_vid, |
609 .ndo_hwtstamp_set = efx_siena_hwtstamp_set, 610 .ndo_hwtstamp_get = efx_siena_hwtstamp_get, |
|
597#ifdef CONFIG_SFC_SIENA_SRIOV 598 .ndo_set_vf_mac = efx_sriov_set_vf_mac, 599 .ndo_set_vf_vlan = efx_sriov_set_vf_vlan, 600 .ndo_set_vf_spoofchk = efx_sriov_set_vf_spoofchk, 601 .ndo_get_vf_config = efx_sriov_get_vf_config, 602 .ndo_set_vf_link_state = efx_sriov_set_vf_link_state, 603#endif 604 .ndo_get_phys_port_id = efx_siena_get_phys_port_id, --- 732 unchanged lines hidden --- | 611#ifdef CONFIG_SFC_SIENA_SRIOV 612 .ndo_set_vf_mac = efx_sriov_set_vf_mac, 613 .ndo_set_vf_vlan = efx_sriov_set_vf_vlan, 614 .ndo_set_vf_spoofchk = efx_sriov_set_vf_spoofchk, 615 .ndo_get_vf_config = efx_sriov_get_vf_config, 616 .ndo_set_vf_link_state = efx_sriov_set_vf_link_state, 617#endif 618 .ndo_get_phys_port_id = efx_siena_get_phys_port_id, --- 732 unchanged lines hidden --- |