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()
74 memcpy(ring, &ns->ethtool.ring, sizeof(ns->ethtool.ring)); in nsim_get_ringparam()
84 ns->ethtool.ring.rx_pending = ring->rx_pending; in nsim_set_ringparam()
85 ns->ethtool.ring.rx_jumbo_pending = ring->rx_jumbo_pending; in nsim_set_ringparam()
86 ns->ethtool.ring.rx_mini_pending = ring->rx_mini_pending; in nsim_set_ringparam()
87 ns->ethtool.ring.tx_pending = ring->tx_pending; in nsim_set_ringparam()
97 ch->combined_count = ns->ethtool.channels; in nsim_get_channels()
111 ns->ethtool.channels = ch->combined_count; in nsim_set_channels()
120 if (ns->ethtool.get_err) in nsim_get_fecparam()
121 return -ns->ethtool.get_err; in nsim_get_fecparam()
122 memcpy(fecparam, &ns->ethtool.fec, sizeof(ns->ethtool.fec)); in nsim_get_fecparam()
132 if (ns->ethtool.set_err) in nsim_set_fecparam()
133 return -ns->ethtool.set_err; in nsim_set_fecparam()
134 memcpy(&ns->ethtool.fec, fecparam, sizeof(ns->ethtool.fec)); in nsim_set_fecparam()
139 ns->ethtool.fec.active_fec = 1 << (fls(fec) - 1); in nsim_set_fecparam()
171 ns->ethtool.ring.rx_max_pending = 4096; in nsim_ethtool_ring_init()
172 ns->ethtool.ring.rx_jumbo_max_pending = 4096; in nsim_ethtool_ring_init()
173 ns->ethtool.ring.rx_mini_max_pending = 4096; in nsim_ethtool_ring_init()
174 ns->ethtool.ring.tx_max_pending = 4096; in nsim_ethtool_ring_init()
179 struct dentry *ethtool, *dir; in nsim_ethtool_init() local
185 ns->ethtool.fec.fec = ETHTOOL_FEC_NONE; in nsim_ethtool_init()
186 ns->ethtool.fec.active_fec = ETHTOOL_FEC_NONE; in nsim_ethtool_init()
188 ns->ethtool.channels = ns->nsim_bus_dev->num_queues; in nsim_ethtool_init()
190 ethtool = debugfs_create_dir("ethtool", ns->nsim_dev_port->ddir); in nsim_ethtool_init()
192 debugfs_create_u32("get_err", 0600, ethtool, &ns->ethtool.get_err); in nsim_ethtool_init()
193 debugfs_create_u32("set_err", 0600, ethtool, &ns->ethtool.set_err); in nsim_ethtool_init()
195 dir = debugfs_create_dir("pause", ethtool); in nsim_ethtool_init()
197 &ns->ethtool.pauseparam.report_stats_rx); in nsim_ethtool_init()
199 &ns->ethtool.pauseparam.report_stats_tx); in nsim_ethtool_init()
201 dir = debugfs_create_dir("ring", ethtool); in nsim_ethtool_init()
203 &ns->ethtool.ring.rx_max_pending); in nsim_ethtool_init()
205 &ns->ethtool.ring.rx_jumbo_max_pending); in nsim_ethtool_init()
207 &ns->ethtool.ring.rx_mini_max_pending); in nsim_ethtool_init()
209 &ns->ethtool.ring.tx_max_pending); in nsim_ethtool_init()