Lines Matching refs:pdata
205 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_ethtool_stats() local
209 pdata->hw_if.read_mmc_stats(pdata); in xgbe_get_ethtool_stats()
211 stat = (u8 *)pdata + xgbe_gstring_stats[i].stat_offset; in xgbe_get_ethtool_stats()
235 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_pauseparam() local
237 pause->autoneg = pdata->phy.pause_autoneg; in xgbe_get_pauseparam()
238 pause->tx_pause = pdata->phy.tx_pause; in xgbe_get_pauseparam()
239 pause->rx_pause = pdata->phy.rx_pause; in xgbe_get_pauseparam()
245 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_pauseparam() local
248 if (pause->autoneg && (pdata->phy.autoneg != AUTONEG_ENABLE)) { in xgbe_set_pauseparam()
254 pdata->phy.pause_autoneg = pause->autoneg; in xgbe_set_pauseparam()
255 pdata->phy.tx_pause = pause->tx_pause; in xgbe_set_pauseparam()
256 pdata->phy.rx_pause = pause->rx_pause; in xgbe_set_pauseparam()
258 pdata->phy.advertising &= ~ADVERTISED_Pause; in xgbe_set_pauseparam()
259 pdata->phy.advertising &= ~ADVERTISED_Asym_Pause; in xgbe_set_pauseparam()
262 pdata->phy.advertising |= ADVERTISED_Pause; in xgbe_set_pauseparam()
263 pdata->phy.advertising |= ADVERTISED_Asym_Pause; in xgbe_set_pauseparam()
267 pdata->phy.advertising ^= ADVERTISED_Asym_Pause; in xgbe_set_pauseparam()
270 ret = pdata->phy_if.phy_config_aneg(pdata); in xgbe_set_pauseparam()
278 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_settings() local
280 cmd->phy_address = pdata->phy.address; in xgbe_get_settings()
282 cmd->supported = pdata->phy.supported; in xgbe_get_settings()
283 cmd->advertising = pdata->phy.advertising; in xgbe_get_settings()
284 cmd->lp_advertising = pdata->phy.lp_advertising; in xgbe_get_settings()
286 cmd->autoneg = pdata->phy.autoneg; in xgbe_get_settings()
287 ethtool_cmd_speed_set(cmd, pdata->phy.speed); in xgbe_get_settings()
288 cmd->duplex = pdata->phy.duplex; in xgbe_get_settings()
299 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_settings() local
305 if (cmd->phy_address != pdata->phy.address) { in xgbe_set_settings()
323 if (pdata->speed_set != XGBE_SPEEDSET_2500_10000) { in xgbe_set_settings()
330 if (pdata->speed_set != XGBE_SPEEDSET_1000_10000) { in xgbe_set_settings()
348 netif_dbg(pdata, link, netdev, in xgbe_set_settings()
350 cmd->advertising, pdata->phy.supported); in xgbe_set_settings()
352 cmd->advertising &= pdata->phy.supported; in xgbe_set_settings()
360 pdata->phy.autoneg = cmd->autoneg; in xgbe_set_settings()
361 pdata->phy.speed = speed; in xgbe_set_settings()
362 pdata->phy.duplex = cmd->duplex; in xgbe_set_settings()
363 pdata->phy.advertising = cmd->advertising; in xgbe_set_settings()
366 pdata->phy.advertising |= ADVERTISED_Autoneg; in xgbe_set_settings()
368 pdata->phy.advertising &= ~ADVERTISED_Autoneg; in xgbe_set_settings()
371 ret = pdata->phy_if.phy_config_aneg(pdata); in xgbe_set_settings()
379 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_drvinfo() local
380 struct xgbe_hw_features *hw_feat = &pdata->hw_feat; in xgbe_get_drvinfo()
384 strlcpy(drvinfo->bus_info, dev_name(pdata->dev), in xgbe_get_drvinfo()
394 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_msglevel() local
396 return pdata->msg_enable; in xgbe_get_msglevel()
401 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_msglevel() local
403 pdata->msg_enable = msglevel; in xgbe_set_msglevel()
409 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_coalesce() local
413 ec->rx_coalesce_usecs = pdata->rx_usecs; in xgbe_get_coalesce()
414 ec->rx_max_coalesced_frames = pdata->rx_frames; in xgbe_get_coalesce()
416 ec->tx_max_coalesced_frames = pdata->tx_frames; in xgbe_get_coalesce()
424 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_coalesce() local
425 struct xgbe_hw_if *hw_if = &pdata->hw_if; in xgbe_set_coalesce()
453 rx_riwt = hw_if->usec_to_riwt(pdata, ec->rx_coalesce_usecs); in xgbe_set_coalesce()
464 hw_if->riwt_to_usec(pdata, XGMAC_MAX_DMA_RIWT)); in xgbe_set_coalesce()
467 if (rx_frames > pdata->rx_desc_count) { in xgbe_set_coalesce()
469 pdata->rx_desc_count); in xgbe_set_coalesce()
476 if (tx_frames > pdata->tx_desc_count) { in xgbe_set_coalesce()
478 pdata->tx_desc_count); in xgbe_set_coalesce()
482 pdata->rx_riwt = rx_riwt; in xgbe_set_coalesce()
483 pdata->rx_usecs = rx_usecs; in xgbe_set_coalesce()
484 pdata->rx_frames = rx_frames; in xgbe_set_coalesce()
485 hw_if->config_rx_coalesce(pdata); in xgbe_set_coalesce()
487 pdata->tx_frames = tx_frames; in xgbe_set_coalesce()
488 hw_if->config_tx_coalesce(pdata); in xgbe_set_coalesce()
496 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_rxnfc() local
500 rxnfc->data = pdata->rx_ring_count; in xgbe_get_rxnfc()
511 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_rxfh_key_size() local
513 return sizeof(pdata->rss_key); in xgbe_get_rxfh_key_size()
518 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_rxfh_indir_size() local
520 return ARRAY_SIZE(pdata->rss_table); in xgbe_get_rxfh_indir_size()
526 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_rxfh() local
530 for (i = 0; i < ARRAY_SIZE(pdata->rss_table); i++) in xgbe_get_rxfh()
531 indir[i] = XGMAC_GET_BITS(pdata->rss_table[i], in xgbe_get_rxfh()
536 memcpy(key, pdata->rss_key, sizeof(pdata->rss_key)); in xgbe_get_rxfh()
547 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_rxfh() local
548 struct xgbe_hw_if *hw_if = &pdata->hw_if; in xgbe_set_rxfh()
557 ret = hw_if->set_rss_lookup_table(pdata, indir); in xgbe_set_rxfh()
563 ret = hw_if->set_rss_hash_key(pdata, key); in xgbe_set_rxfh()
574 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_ts_info() local
583 if (pdata->ptp_clock) in xgbe_get_ts_info()
584 ts_info->phc_index = ptp_clock_index(pdata->ptp_clock); in xgbe_get_ts_info()