aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/af_unix.h
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-04-05 02:14:15 -0400
committerLen Brown <len.brown@intel.com>2009-04-05 02:14:15 -0400
commit478c6a43fcbc6c11609f8cee7c7b57223907754f (patch)
treea7f7952099da60d33032aed6de9c0c56c9f8779e /include/net/af_unix.h
parent8a3f257c704e02aee9869decd069a806b45be3f1 (diff)
parent6bb597507f9839b13498781e481f5458aea33620 (diff)
Merge branch 'linus' into release
Conflicts: arch/x86/kernel/cpu/cpufreq/longhaul.c Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/net/af_unix.h')
0 files changed, 0 insertions, 0 deletions
r">"rx-1024-1518-byte-packets" }, { "rx-pause-frames" }, { "tx-bytes" }, { "tx-packets" }, { "tx-broadcast-packets" }, { "tx-multicast-packets" }, { "tx-collisions" }, { "tx-late-collisions" }, { "tx-excessive-collisions" }, { "tx-crc-errors" }, { "tx-undersize-errors" }, { "tx-oversize-errors" }, { "tx-64-byte-packets" }, { "tx-65-127-byte-packets" }, { "tx-128-255-byte-packets" }, { "tx-256-511-byte-packets" }, { "tx-512-1023-byte-packets" }, { "tx-1024-1518-byte-packets" }, }; static int pasemi_mac_ethtool_get_settings(struct net_device *netdev, struct ethtool_cmd *cmd) { struct pasemi_mac *mac = netdev_priv(netdev); struct phy_device *phydev = mac->phydev; return phy_ethtool_gset(phydev, cmd); } static void pasemi_mac_ethtool_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo) { struct pasemi_mac *mac; mac = netdev_priv(netdev); /* clear and fill out info */ memset(drvinfo, 0, sizeof(struct ethtool_drvinfo)); strncpy(drvinfo->driver, "pasemi_mac", 12); strcpy(drvinfo->version, "N/A"); strcpy(drvinfo->fw_version, "N/A"); strncpy(drvinfo->bus_info, pci_name(mac->pdev), 32); } static u32 pasemi_mac_ethtool_get_msglevel(struct net_device *netdev) { struct pasemi_mac *mac = netdev_priv(netdev); return mac->msg_enable; } static void pasemi_mac_ethtool_set_msglevel(struct net_device *netdev, u32 level) { struct pasemi_mac *mac = netdev_priv(netdev); mac->msg_enable = level; } static void pasemi_mac_ethtool_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ering) { struct pasemi_mac *mac = netdev_priv(netdev); ering->tx_max_pending = TX_RING_SIZE/2; ering->tx_pending = RING_USED(mac->tx)/2; ering->rx_max_pending = RX_RING_SIZE/4; ering->rx_pending = RING_USED(mac->rx)/4; } static int pasemi_mac_get_sset_count(struct net_device *netdev, int sset) { switch (sset) { case ETH_SS_STATS: return ARRAY_SIZE(ethtool_stats_keys); default: return -EOPNOTSUPP; } } static void pasemi_mac_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats, u64 *data) { struct pasemi_mac *mac = netdev_priv(netdev); int i; data[0] = pasemi_read_dma_reg(PAS_DMA_RXINT_RCMDSTA(mac->dma_if)) >> PAS_DMA_RXINT_RCMDSTA_DROPS_S; for (i = 0; i < 32; i++) data[1+i] = pasemi_read_mac_reg(mac->dma_if, PAS_MAC_RMON(i)); } static void pasemi_mac_get_strings(struct net_device *netdev, u32 stringset, u8 *data) { memcpy(data, ethtool_stats_keys, sizeof(ethtool_stats_keys)); } const struct ethtool_ops pasemi_mac_ethtool_ops = { .get_settings = pasemi_mac_ethtool_get_settings, .get_drvinfo = pasemi_mac_ethtool_get_drvinfo, .get_msglevel = pasemi_mac_ethtool_get_msglevel, .set_msglevel = pasemi_mac_ethtool_set_msglevel, .get_link = ethtool_op_get_link, .get_ringparam = pasemi_mac_ethtool_get_ringparam, .get_strings = pasemi_mac_get_strings, .get_sset_count = pasemi_mac_get_sset_count, .get_ethtool_stats = pasemi_mac_get_ethtool_stats, };