Lines Matching refs:cmd

745 			       struct ethtool_link_ksettings *cmd)  in hns3_get_ksettings()  argument
752 &cmd->base.autoneg, in hns3_get_ksettings()
753 &cmd->base.speed, in hns3_get_ksettings()
754 &cmd->base.duplex, in hns3_get_ksettings()
755 &cmd->lanes); in hns3_get_ksettings()
760 cmd->link_modes.supported, in hns3_get_ksettings()
761 cmd->link_modes.advertising); in hns3_get_ksettings()
765 ops->get_mdix_mode(h, &cmd->base.eth_tp_mdix_ctrl, in hns3_get_ksettings()
766 &cmd->base.eth_tp_mdix); in hns3_get_ksettings()
770 struct ethtool_link_ksettings *cmd) in hns3_get_link_ksettings() argument
787 cmd->base.port = PORT_NONE; in hns3_get_link_ksettings()
788 hns3_get_ksettings(h, cmd); in hns3_get_link_ksettings()
792 cmd->base.port = PORT_OTHER; in hns3_get_link_ksettings()
794 cmd->base.port = PORT_DA; in hns3_get_link_ksettings()
796 cmd->base.port = PORT_FIBRE; in hns3_get_link_ksettings()
798 hns3_get_ksettings(h, cmd); in hns3_get_link_ksettings()
801 cmd->base.port = PORT_NONE; in hns3_get_link_ksettings()
802 hns3_get_ksettings(h, cmd); in hns3_get_link_ksettings()
805 cmd->base.port = PORT_TP; in hns3_get_link_ksettings()
808 ops->get_phy_link_ksettings(h, cmd); in hns3_get_link_ksettings()
810 hns3_get_ksettings(h, cmd); in hns3_get_link_ksettings()
812 phy_ethtool_ksettings_get(netdev->phydev, cmd); in hns3_get_link_ksettings()
821 cmd->base.mdio_support = ETH_MDIO_SUPPORTS_C22; in hns3_get_link_ksettings()
825 cmd->base.speed = SPEED_UNKNOWN; in hns3_get_link_ksettings()
826 cmd->base.duplex = DUPLEX_UNKNOWN; in hns3_get_link_ksettings()
833 const struct ethtool_link_ksettings *cmd) in hns3_check_ksettings_param() argument
848 if (cmd->base.autoneg) in hns3_check_ksettings_param()
853 if (cmd->base.autoneg == autoneg && cmd->base.speed == speed && in hns3_check_ksettings_param()
854 cmd->base.duplex == duplex && cmd->lanes == lane_num) in hns3_check_ksettings_param()
861 if (cmd->base.duplex == DUPLEX_HALF && in hns3_check_ksettings_param()
869 ret = ops->check_port_speed(handle, cmd->base.speed); in hns3_check_ksettings_param()
880 const struct ethtool_link_ksettings *cmd) in hns3_set_link_ksettings() argument
888 if (cmd->base.speed == SPEED_1000 && cmd->base.duplex == DUPLEX_HALF) in hns3_set_link_ksettings()
891 if (cmd->lanes && !hnae3_ae_dev_lane_num_supported(ae_dev)) in hns3_set_link_ksettings()
897 cmd->base.autoneg, cmd->base.speed, cmd->base.duplex, in hns3_set_link_ksettings()
898 cmd->lanes); in hns3_set_link_ksettings()
902 if (cmd->base.speed == SPEED_1000 && in hns3_set_link_ksettings()
903 cmd->base.autoneg == AUTONEG_DISABLE) in hns3_set_link_ksettings()
906 return phy_ethtool_ksettings_set(netdev->phydev, cmd); in hns3_set_link_ksettings()
909 return ops->set_phy_link_ksettings(handle, cmd); in hns3_set_link_ksettings()
915 ret = hns3_check_ksettings_param(netdev, cmd); in hns3_set_link_ksettings()
920 ret = ops->set_autoneg(handle, cmd->base.autoneg); in hns3_set_link_ksettings()
928 if (cmd->base.autoneg) { in hns3_set_link_ksettings()
935 ret = ops->cfg_mac_speed_dup_h(handle, cmd->base.speed, in hns3_set_link_ksettings()
936 cmd->base.duplex, (u8)(cmd->lanes)); in hns3_set_link_ksettings()
996 struct ethtool_rxnfc *cmd, in hns3_get_rxnfc() argument
1001 switch (cmd->cmd) { in hns3_get_rxnfc()
1003 cmd->data = h->kinfo.num_tqps; in hns3_get_rxnfc()
1007 return h->ae_algo->ops->get_rss_tuple(h, cmd); in hns3_get_rxnfc()
1011 return h->ae_algo->ops->get_fd_rule_cnt(h, cmd); in hns3_get_rxnfc()
1015 return h->ae_algo->ops->get_fd_rule_info(h, cmd); in hns3_get_rxnfc()
1019 return h->ae_algo->ops->get_fd_all_rules(h, cmd, in hns3_get_rxnfc()
1292 static int hns3_set_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd) in hns3_set_rxnfc() argument
1296 switch (cmd->cmd) { in hns3_set_rxnfc()
1299 return h->ae_algo->ops->set_rss_tuple(h, cmd); in hns3_set_rxnfc()
1303 return h->ae_algo->ops->add_fd_entry(h, cmd); in hns3_set_rxnfc()
1307 return h->ae_algo->ops->del_fd_entry(h, cmd); in hns3_set_rxnfc()
1358 struct ethtool_coalesce *cmd, in hns3_get_coalesce() argument
1370 cmd->use_adaptive_tx_coalesce = tx_coal->adapt_enable; in hns3_get_coalesce()
1371 cmd->use_adaptive_rx_coalesce = rx_coal->adapt_enable; in hns3_get_coalesce()
1373 cmd->tx_coalesce_usecs = tx_coal->int_gl; in hns3_get_coalesce()
1374 cmd->rx_coalesce_usecs = rx_coal->int_gl; in hns3_get_coalesce()
1376 cmd->tx_coalesce_usecs_high = h->kinfo.int_rl_setting; in hns3_get_coalesce()
1377 cmd->rx_coalesce_usecs_high = h->kinfo.int_rl_setting; in hns3_get_coalesce()
1379 cmd->tx_max_coalesced_frames = tx_coal->int_ql; in hns3_get_coalesce()
1380 cmd->rx_max_coalesced_frames = rx_coal->int_ql; in hns3_get_coalesce()
1391 struct ethtool_coalesce *cmd) in hns3_check_gl_coalesce_para() argument
1397 if (cmd->rx_coalesce_usecs > ae_dev->dev_specs.max_int_gl) { in hns3_check_gl_coalesce_para()
1404 if (cmd->tx_coalesce_usecs > ae_dev->dev_specs.max_int_gl) { in hns3_check_gl_coalesce_para()
1417 rx_gl = hns3_gl_round_down(cmd->rx_coalesce_usecs); in hns3_check_gl_coalesce_para()
1418 if (rx_gl != cmd->rx_coalesce_usecs) { in hns3_check_gl_coalesce_para()
1421 cmd->rx_coalesce_usecs, rx_gl); in hns3_check_gl_coalesce_para()
1424 tx_gl = hns3_gl_round_down(cmd->tx_coalesce_usecs); in hns3_check_gl_coalesce_para()
1425 if (tx_gl != cmd->tx_coalesce_usecs) { in hns3_check_gl_coalesce_para()
1428 cmd->tx_coalesce_usecs, tx_gl); in hns3_check_gl_coalesce_para()
1435 struct ethtool_coalesce *cmd) in hns3_check_rl_coalesce_para() argument
1439 if (cmd->tx_coalesce_usecs_high != cmd->rx_coalesce_usecs_high) { in hns3_check_rl_coalesce_para()
1445 if (cmd->rx_coalesce_usecs_high > HNS3_INT_RL_MAX) { in hns3_check_rl_coalesce_para()
1452 rl = hns3_rl_round_down(cmd->rx_coalesce_usecs_high); in hns3_check_rl_coalesce_para()
1453 if (rl != cmd->rx_coalesce_usecs_high) { in hns3_check_rl_coalesce_para()
1456 cmd->rx_coalesce_usecs_high, rl); in hns3_check_rl_coalesce_para()
1463 struct ethtool_coalesce *cmd) in hns3_check_ql_coalesce_param() argument
1468 if ((cmd->tx_max_coalesced_frames || cmd->rx_max_coalesced_frames) && in hns3_check_ql_coalesce_param()
1474 if (cmd->tx_max_coalesced_frames > ae_dev->dev_specs.int_ql_max || in hns3_check_ql_coalesce_param()
1475 cmd->rx_max_coalesced_frames > ae_dev->dev_specs.int_ql_max) { in hns3_check_ql_coalesce_param()
1503 struct ethtool_coalesce *cmd, in hns3_check_coalesce_para() argument
1512 ret = hns3_check_gl_coalesce_para(netdev, cmd); in hns3_check_coalesce_para()
1519 ret = hns3_check_rl_coalesce_para(netdev, cmd); in hns3_check_coalesce_para()
1526 return hns3_check_ql_coalesce_param(netdev, cmd); in hns3_check_coalesce_para()
1530 struct ethtool_coalesce *cmd, in hns3_set_coalesce_per_queue() argument
1542 cmd->use_adaptive_tx_coalesce; in hns3_set_coalesce_per_queue()
1544 cmd->use_adaptive_rx_coalesce; in hns3_set_coalesce_per_queue()
1546 tx_vector->tx_group.coal.int_gl = cmd->tx_coalesce_usecs; in hns3_set_coalesce_per_queue()
1547 rx_vector->rx_group.coal.int_gl = cmd->rx_coalesce_usecs; in hns3_set_coalesce_per_queue()
1549 tx_vector->tx_group.coal.int_ql = cmd->tx_max_coalesced_frames; in hns3_set_coalesce_per_queue()
1550 rx_vector->rx_group.coal.int_ql = cmd->rx_max_coalesced_frames; in hns3_set_coalesce_per_queue()
1569 struct ethtool_coalesce *cmd, in hns3_set_coalesce() argument
1586 ret = hns3_check_coalesce_para(netdev, cmd, kernel_coal); in hns3_set_coalesce()
1591 hns3_rl_round_down(cmd->rx_coalesce_usecs_high); in hns3_set_coalesce()
1593 tx_coal->adapt_enable = cmd->use_adaptive_tx_coalesce; in hns3_set_coalesce()
1594 rx_coal->adapt_enable = cmd->use_adaptive_rx_coalesce; in hns3_set_coalesce()
1596 tx_coal->int_gl = cmd->tx_coalesce_usecs; in hns3_set_coalesce()
1597 rx_coal->int_gl = cmd->rx_coalesce_usecs; in hns3_set_coalesce()
1599 tx_coal->int_ql = cmd->tx_max_coalesced_frames; in hns3_set_coalesce()
1600 rx_coal->int_ql = cmd->rx_max_coalesced_frames; in hns3_set_coalesce()
1603 hns3_set_coalesce_per_queue(netdev, cmd, i); in hns3_set_coalesce()
1627 struct ethtool_regs *cmd, void *data) in hns3_get_regs() argument
1634 h->ae_algo->ops->get_regs(h, &cmd->version, data); in hns3_get_regs()