| .. | .. |
|---|
| 129 | 129 | |
|---|
| 130 | 130 | #define XGMAC_MMC_STAT(_string, _var) \ |
|---|
| 131 | 131 | { _string, \ |
|---|
| 132 | | - FIELD_SIZEOF(struct xgbe_mmc_stats, _var), \ |
|---|
| 132 | + sizeof_field(struct xgbe_mmc_stats, _var), \ |
|---|
| 133 | 133 | offsetof(struct xgbe_prv_data, mmc_stats._var), \ |
|---|
| 134 | 134 | } |
|---|
| 135 | 135 | |
|---|
| 136 | 136 | #define XGMAC_EXT_STAT(_string, _var) \ |
|---|
| 137 | 137 | { _string, \ |
|---|
| 138 | | - FIELD_SIZEOF(struct xgbe_ext_stats, _var), \ |
|---|
| 138 | + sizeof_field(struct xgbe_ext_stats, _var), \ |
|---|
| 139 | 139 | offsetof(struct xgbe_prv_data, ext_stats._var), \ |
|---|
| 140 | 140 | } |
|---|
| 141 | 141 | |
|---|
| .. | .. |
|---|
| 405 | 405 | struct xgbe_hw_features *hw_feat = &pdata->hw_feat; |
|---|
| 406 | 406 | |
|---|
| 407 | 407 | strlcpy(drvinfo->driver, XGBE_DRV_NAME, sizeof(drvinfo->driver)); |
|---|
| 408 | | - strlcpy(drvinfo->version, XGBE_DRV_VERSION, sizeof(drvinfo->version)); |
|---|
| 409 | 408 | strlcpy(drvinfo->bus_info, dev_name(pdata->dev), |
|---|
| 410 | 409 | sizeof(drvinfo->bus_info)); |
|---|
| 411 | 410 | snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version), "%d.%d.%d", |
|---|
| .. | .. |
|---|
| 450 | 449 | struct xgbe_hw_if *hw_if = &pdata->hw_if; |
|---|
| 451 | 450 | unsigned int rx_frames, rx_riwt, rx_usecs; |
|---|
| 452 | 451 | unsigned int tx_frames; |
|---|
| 453 | | - |
|---|
| 454 | | - /* Check for not supported parameters */ |
|---|
| 455 | | - if ((ec->rx_coalesce_usecs_irq) || |
|---|
| 456 | | - (ec->rx_max_coalesced_frames_irq) || |
|---|
| 457 | | - (ec->tx_coalesce_usecs) || |
|---|
| 458 | | - (ec->tx_coalesce_usecs_irq) || |
|---|
| 459 | | - (ec->tx_max_coalesced_frames_irq) || |
|---|
| 460 | | - (ec->stats_block_coalesce_usecs) || |
|---|
| 461 | | - (ec->use_adaptive_rx_coalesce) || |
|---|
| 462 | | - (ec->use_adaptive_tx_coalesce) || |
|---|
| 463 | | - (ec->pkt_rate_low) || |
|---|
| 464 | | - (ec->rx_coalesce_usecs_low) || |
|---|
| 465 | | - (ec->rx_max_coalesced_frames_low) || |
|---|
| 466 | | - (ec->tx_coalesce_usecs_low) || |
|---|
| 467 | | - (ec->tx_max_coalesced_frames_low) || |
|---|
| 468 | | - (ec->pkt_rate_high) || |
|---|
| 469 | | - (ec->rx_coalesce_usecs_high) || |
|---|
| 470 | | - (ec->rx_max_coalesced_frames_high) || |
|---|
| 471 | | - (ec->tx_coalesce_usecs_high) || |
|---|
| 472 | | - (ec->tx_max_coalesced_frames_high) || |
|---|
| 473 | | - (ec->rate_sample_interval)) { |
|---|
| 474 | | - netdev_err(netdev, "unsupported coalescing parameter\n"); |
|---|
| 475 | | - return -EOPNOTSUPP; |
|---|
| 476 | | - } |
|---|
| 477 | 452 | |
|---|
| 478 | 453 | rx_riwt = hw_if->usec_to_riwt(pdata, ec->rx_coalesce_usecs); |
|---|
| 479 | 454 | rx_usecs = ec->rx_coalesce_usecs; |
|---|
| .. | .. |
|---|
| 838 | 813 | } |
|---|
| 839 | 814 | |
|---|
| 840 | 815 | static const struct ethtool_ops xgbe_ethtool_ops = { |
|---|
| 816 | + .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS | |
|---|
| 817 | + ETHTOOL_COALESCE_MAX_FRAMES, |
|---|
| 841 | 818 | .get_drvinfo = xgbe_get_drvinfo, |
|---|
| 842 | 819 | .get_msglevel = xgbe_get_msglevel, |
|---|
| 843 | 820 | .set_msglevel = xgbe_set_msglevel, |
|---|