Lines Matching refs:channels
2185 struct ethtool_channels channels = { .cmd = ETHTOOL_GCHANNELS }; in ethtool_get_channels() local
2190 dev->ethtool_ops->get_channels(dev, &channels); in ethtool_get_channels()
2192 if (copy_to_user(useraddr, &channels, sizeof(channels))) in ethtool_get_channels()
2200 struct ethtool_channels channels, curr = { .cmd = ETHTOOL_GCHANNELS }; in ethtool_set_channels() local
2208 if (copy_from_user(&channels, useraddr, sizeof(channels))) in ethtool_set_channels()
2213 if (channels.rx_count == curr.rx_count && in ethtool_set_channels()
2214 channels.tx_count == curr.tx_count && in ethtool_set_channels()
2215 channels.combined_count == curr.combined_count && in ethtool_set_channels()
2216 channels.other_count == curr.other_count) in ethtool_set_channels()
2220 if (channels.rx_count > curr.max_rx || in ethtool_set_channels()
2221 channels.tx_count > curr.max_tx || in ethtool_set_channels()
2222 channels.combined_count > curr.max_combined || in ethtool_set_channels()
2223 channels.other_count > curr.max_other) in ethtool_set_channels()
2227 if (!channels.combined_count && in ethtool_set_channels()
2228 (!channels.rx_count || !channels.tx_count)) in ethtool_set_channels()
2231 ret = ethtool_check_max_channel(dev, channels, NULL); in ethtool_set_channels()
2236 from_channel = channels.combined_count + in ethtool_set_channels()
2237 min(channels.rx_count, channels.tx_count); in ethtool_set_channels()
2243 ret = dev->ethtool_ops->set_channels(dev, &channels); in ethtool_set_channels()