Lines Matching refs:ethtool
16 if (ns->ethtool.pauseparam.report_stats_rx) in nsim_get_pause_stats()
18 if (ns->ethtool.pauseparam.report_stats_tx) in nsim_get_pause_stats()
28 pause->rx_pause = ns->ethtool.pauseparam.rx; in nsim_get_pauseparam()
29 pause->tx_pause = ns->ethtool.pauseparam.tx; in nsim_get_pauseparam()
40 ns->ethtool.pauseparam.rx = pause->rx_pause; in nsim_set_pauseparam()
41 ns->ethtool.pauseparam.tx = pause->tx_pause; in nsim_set_pauseparam()
52 memcpy(coal, &ns->ethtool.coalesce, sizeof(ns->ethtool.coalesce)); in nsim_get_coalesce()
63 memcpy(&ns->ethtool.coalesce, coal, sizeof(ns->ethtool.coalesce)); in nsim_set_coalesce()
72 memcpy(ring, &ns->ethtool.ring, sizeof(ns->ethtool.ring)); in nsim_get_ringparam()
80 ns->ethtool.ring.rx_pending = ring->rx_pending; in nsim_set_ringparam()
81 ns->ethtool.ring.rx_jumbo_pending = ring->rx_jumbo_pending; in nsim_set_ringparam()
82 ns->ethtool.ring.rx_mini_pending = ring->rx_mini_pending; in nsim_set_ringparam()
83 ns->ethtool.ring.tx_pending = ring->tx_pending; in nsim_set_ringparam()
93 ch->combined_count = ns->ethtool.channels; in nsim_get_channels()
107 ns->ethtool.channels = ch->combined_count; in nsim_set_channels()
116 if (ns->ethtool.get_err) in nsim_get_fecparam()
117 return -ns->ethtool.get_err; in nsim_get_fecparam()
118 memcpy(fecparam, &ns->ethtool.fec, sizeof(ns->ethtool.fec)); in nsim_get_fecparam()
128 if (ns->ethtool.set_err) in nsim_set_fecparam()
129 return -ns->ethtool.set_err; in nsim_set_fecparam()
130 memcpy(&ns->ethtool.fec, fecparam, sizeof(ns->ethtool.fec)); in nsim_set_fecparam()
135 ns->ethtool.fec.active_fec = 1 << (fls(fec) - 1); in nsim_set_fecparam()
156 ns->ethtool.ring.rx_max_pending = 4096; in nsim_ethtool_ring_init()
157 ns->ethtool.ring.rx_jumbo_max_pending = 4096; in nsim_ethtool_ring_init()
158 ns->ethtool.ring.rx_mini_max_pending = 4096; in nsim_ethtool_ring_init()
159 ns->ethtool.ring.tx_max_pending = 4096; in nsim_ethtool_ring_init()
164 struct dentry *ethtool, *dir; in nsim_ethtool_init() local
170 ns->ethtool.fec.fec = ETHTOOL_FEC_NONE; in nsim_ethtool_init()
171 ns->ethtool.fec.active_fec = ETHTOOL_FEC_NONE; in nsim_ethtool_init()
173 ns->ethtool.channels = ns->nsim_bus_dev->num_queues; in nsim_ethtool_init()
175 ethtool = debugfs_create_dir("ethtool", ns->nsim_dev_port->ddir); in nsim_ethtool_init()
177 debugfs_create_u32("get_err", 0600, ethtool, &ns->ethtool.get_err); in nsim_ethtool_init()
178 debugfs_create_u32("set_err", 0600, ethtool, &ns->ethtool.set_err); in nsim_ethtool_init()
180 dir = debugfs_create_dir("pause", ethtool); in nsim_ethtool_init()
182 &ns->ethtool.pauseparam.report_stats_rx); in nsim_ethtool_init()
184 &ns->ethtool.pauseparam.report_stats_tx); in nsim_ethtool_init()
186 dir = debugfs_create_dir("ring", ethtool); in nsim_ethtool_init()
188 &ns->ethtool.ring.rx_max_pending); in nsim_ethtool_init()
190 &ns->ethtool.ring.rx_jumbo_max_pending); in nsim_ethtool_init()
192 &ns->ethtool.ring.rx_mini_max_pending); in nsim_ethtool_init()
194 &ns->ethtool.ring.tx_max_pending); in nsim_ethtool_init()