Lines Matching defs:cmd
771 struct ethtool_link_ksettings *cmd)
779 phy_ethtool_ksettings_get(dev->phydev, cmd);
785 const struct ethtool_link_ksettings *cmd)
793 return phy_ethtool_ksettings_set(dev->phydev, cmd);
1336 struct ethtool_rxnfc *cmd)
1341 if (cmd->fs.location >= MAX_NUM_OF_FS_RULES) {
1343 cmd->fs.location);
1347 switch (cmd->fs.flow_type & ~(FLOW_EXT | FLOW_MAC_EXT)) {
1349 l4_mask = &cmd->fs.m_u.usr_ip4_spec;
1362 eth_mask = &cmd->fs.m_u.ether_spec;
1373 cmd->fs.flow_type);
1377 if ((cmd->fs.flow_type & FLOW_EXT)) {
1379 if (VALIDATE_MASK(cmd->fs.m_ext.vlan_etype) ||
1380 VALIDATE_MASK(cmd->fs.m_ext.vlan_tci)) {
1384 if (cmd->fs.m_ext.data[0] || cmd->fs.m_ext.data[1]) {
1390 if ((cmd->fs.flow_type & FLOW_MAC_EXT)) {
1392 if (VALIDATE_MASK(cmd->fs.m_ext.h_dest)) {
1402 struct ethtool_rxnfc *cmd)
1413 if (cmd->fs.ring_cookie > priv->hw_params->rx_queues &&
1414 cmd->fs.ring_cookie != RX_CLS_FLOW_WAKE) {
1416 cmd->fs.ring_cookie);
1420 err = bcmgenet_validate_flow(dev, cmd);
1424 loc_rule = &priv->rxnfc_rules[cmd->fs.location];
1426 bcmgenet_hfb_disable_filter(priv, cmd->fs.location);
1429 bcmgenet_hfb_clear_filter(priv, cmd->fs.location);
1432 memcpy(&loc_rule->fs, &cmd->fs,
1443 struct ethtool_rxnfc *cmd)
1449 if (cmd->fs.location >= MAX_NUM_OF_FS_RULES)
1452 rule = &priv->rxnfc_rules[cmd->fs.location];
1459 bcmgenet_hfb_disable_filter(priv, cmd->fs.location);
1462 bcmgenet_hfb_clear_filter(priv, cmd->fs.location);
1471 static int bcmgenet_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
1476 switch (cmd->cmd) {
1478 err = bcmgenet_insert_flow(dev, cmd);
1481 err = bcmgenet_delete_flow(dev, cmd);
1485 cmd->cmd);
1492 static int bcmgenet_get_flow(struct net_device *dev, struct ethtool_rxnfc *cmd,
1506 memcpy(&cmd->fs, &rule->fs,
1523 static int bcmgenet_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
1531 switch (cmd->cmd) {
1533 cmd->data = priv->hw_params->rx_queues ?: 1;
1536 cmd->rule_cnt = bcmgenet_get_num_flows(priv);
1537 cmd->data = MAX_NUM_OF_FS_RULES;
1540 err = bcmgenet_get_flow(dev, cmd, cmd->fs.location);
1544 if (i < cmd->rule_cnt)
1546 cmd->rule_cnt = i;
1547 cmd->data = MAX_NUM_OF_FS_RULES;