Lines Matching refs:cmd
136 struct ethtool_link_ksettings *cmd) in igb_get_link_ksettings() argument
166 cmd->base.port = PORT_TP; in igb_get_link_ksettings()
167 cmd->base.phy_address = hw->phy.addr; in igb_get_link_ksettings()
192 cmd->base.port = PORT_FIBRE; in igb_get_link_ksettings()
226 cmd->base.duplex = DUPLEX_FULL; in igb_get_link_ksettings()
228 cmd->base.duplex = DUPLEX_HALF; in igb_get_link_ksettings()
231 cmd->base.duplex = DUPLEX_UNKNOWN; in igb_get_link_ksettings()
233 cmd->base.speed = speed; in igb_get_link_ksettings()
236 cmd->base.autoneg = AUTONEG_ENABLE; in igb_get_link_ksettings()
238 cmd->base.autoneg = AUTONEG_DISABLE; in igb_get_link_ksettings()
242 cmd->base.eth_tp_mdix = hw->phy.is_mdix ? ETH_TP_MDI_X : in igb_get_link_ksettings()
245 cmd->base.eth_tp_mdix = ETH_TP_MDI_INVALID; in igb_get_link_ksettings()
248 cmd->base.eth_tp_mdix_ctrl = ETH_TP_MDI_AUTO; in igb_get_link_ksettings()
250 cmd->base.eth_tp_mdix_ctrl = hw->phy.mdix; in igb_get_link_ksettings()
252 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported, in igb_get_link_ksettings()
254 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising, in igb_get_link_ksettings()
261 const struct ethtool_link_ksettings *cmd) in igb_set_link_ksettings() argument
280 if (cmd->base.eth_tp_mdix_ctrl) { in igb_set_link_ksettings()
284 if ((cmd->base.eth_tp_mdix_ctrl != ETH_TP_MDI_AUTO) && in igb_set_link_ksettings()
285 (cmd->base.autoneg != AUTONEG_ENABLE)) { in igb_set_link_ksettings()
295 cmd->link_modes.advertising); in igb_set_link_ksettings()
297 if (cmd->base.autoneg == AUTONEG_ENABLE) { in igb_set_link_ksettings()
328 u32 speed = cmd->base.speed; in igb_set_link_ksettings()
330 if (igb_set_spd_dplx(adapter, speed, cmd->base.duplex)) { in igb_set_link_ksettings()
337 if (cmd->base.eth_tp_mdix_ctrl) { in igb_set_link_ksettings()
341 if (cmd->base.eth_tp_mdix_ctrl == ETH_TP_MDI_AUTO) in igb_set_link_ksettings()
344 hw->phy.mdix = cmd->base.eth_tp_mdix_ctrl; in igb_set_link_ksettings()
2439 struct ethtool_rxnfc *cmd) in igb_get_ethtool_nfc_entry() argument
2441 struct ethtool_rx_flow_spec *fsp = &cmd->fs; in igb_get_ethtool_nfc_entry()
2445 cmd->data = IGB_MAX_RXNFC_FILTERS; in igb_get_ethtool_nfc_entry()
2490 struct ethtool_rxnfc *cmd, in igb_get_ethtool_nfc_all() argument
2497 cmd->data = IGB_MAX_RXNFC_FILTERS; in igb_get_ethtool_nfc_all()
2500 if (cnt == cmd->rule_cnt) in igb_get_ethtool_nfc_all()
2506 cmd->rule_cnt = cnt; in igb_get_ethtool_nfc_all()
2512 struct ethtool_rxnfc *cmd) in igb_get_rss_hash_opts() argument
2514 cmd->data = 0; in igb_get_rss_hash_opts()
2517 switch (cmd->flow_type) { in igb_get_rss_hash_opts()
2519 cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in igb_get_rss_hash_opts()
2523 cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in igb_get_rss_hash_opts()
2530 cmd->data |= RXH_IP_SRC | RXH_IP_DST; in igb_get_rss_hash_opts()
2533 cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in igb_get_rss_hash_opts()
2537 cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in igb_get_rss_hash_opts()
2544 cmd->data |= RXH_IP_SRC | RXH_IP_DST; in igb_get_rss_hash_opts()
2553 static int igb_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, in igb_get_rxnfc() argument
2559 switch (cmd->cmd) { in igb_get_rxnfc()
2561 cmd->data = adapter->num_rx_queues; in igb_get_rxnfc()
2565 cmd->rule_cnt = adapter->nfc_filter_count; in igb_get_rxnfc()
2569 ret = igb_get_ethtool_nfc_entry(adapter, cmd); in igb_get_rxnfc()
2572 ret = igb_get_ethtool_nfc_all(adapter, cmd, rule_locs); in igb_get_rxnfc()
2575 ret = igb_get_rss_hash_opts(adapter, cmd); in igb_get_rxnfc()
2901 struct ethtool_rxnfc *cmd) in igb_add_ethtool_nfc_entry() argument
2905 (struct ethtool_rx_flow_spec *)&cmd->fs; in igb_add_ethtool_nfc_entry()
2998 struct ethtool_rxnfc *cmd) in igb_del_ethtool_nfc_entry() argument
3001 (struct ethtool_rx_flow_spec *)&cmd->fs; in igb_del_ethtool_nfc_entry()
3011 static int igb_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) in igb_set_rxnfc() argument
3016 switch (cmd->cmd) { in igb_set_rxnfc()
3018 ret = igb_set_rss_hash_opt(adapter, cmd); in igb_set_rxnfc()
3021 ret = igb_add_ethtool_nfc_entry(adapter, cmd); in igb_set_rxnfc()
3024 ret = igb_del_ethtool_nfc_entry(adapter, cmd); in igb_set_rxnfc()