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()
336 netif_dbg(pdata, link, netdev, in xgbe_set_settings()
338 cmd->advertising, pdata->phy.supported); in xgbe_set_settings()
340 cmd->advertising &= pdata->phy.supported; in xgbe_set_settings()
348 pdata->phy.autoneg = cmd->autoneg; in xgbe_set_settings()
349 pdata->phy.speed = speed; in xgbe_set_settings()
350 pdata->phy.duplex = cmd->duplex; in xgbe_set_settings()
351 pdata->phy.advertising = cmd->advertising; in xgbe_set_settings()
354 pdata->phy.advertising |= ADVERTISED_Autoneg; in xgbe_set_settings()
356 pdata->phy.advertising &= ~ADVERTISED_Autoneg; in xgbe_set_settings()
359 ret = pdata->phy_if.phy_config_aneg(pdata); in xgbe_set_settings()
367 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_drvinfo() local
368 struct xgbe_hw_features *hw_feat = &pdata->hw_feat; in xgbe_get_drvinfo()
372 strlcpy(drvinfo->bus_info, dev_name(pdata->dev), in xgbe_get_drvinfo()
382 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_msglevel() local
384 return pdata->msg_enable; in xgbe_get_msglevel()
389 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_msglevel() local
391 pdata->msg_enable = msglevel; in xgbe_set_msglevel()
397 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_coalesce() local
401 ec->rx_coalesce_usecs = pdata->rx_usecs; in xgbe_get_coalesce()
402 ec->rx_max_coalesced_frames = pdata->rx_frames; in xgbe_get_coalesce()
404 ec->tx_max_coalesced_frames = pdata->tx_frames; in xgbe_get_coalesce()
412 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_coalesce() local
413 struct xgbe_hw_if *hw_if = &pdata->hw_if; in xgbe_set_coalesce()
441 rx_riwt = hw_if->usec_to_riwt(pdata, ec->rx_coalesce_usecs); in xgbe_set_coalesce()
452 hw_if->riwt_to_usec(pdata, XGMAC_MAX_DMA_RIWT)); in xgbe_set_coalesce()
455 if (rx_frames > pdata->rx_desc_count) { in xgbe_set_coalesce()
457 pdata->rx_desc_count); in xgbe_set_coalesce()
464 if (tx_frames > pdata->tx_desc_count) { in xgbe_set_coalesce()
466 pdata->tx_desc_count); in xgbe_set_coalesce()
470 pdata->rx_riwt = rx_riwt; in xgbe_set_coalesce()
471 pdata->rx_usecs = rx_usecs; in xgbe_set_coalesce()
472 pdata->rx_frames = rx_frames; in xgbe_set_coalesce()
473 hw_if->config_rx_coalesce(pdata); in xgbe_set_coalesce()
475 pdata->tx_frames = tx_frames; in xgbe_set_coalesce()
476 hw_if->config_tx_coalesce(pdata); in xgbe_set_coalesce()
484 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_rxnfc() local
488 rxnfc->data = pdata->rx_ring_count; in xgbe_get_rxnfc()
499 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_rxfh_key_size() local
501 return sizeof(pdata->rss_key); in xgbe_get_rxfh_key_size()
506 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_rxfh_indir_size() local
508 return ARRAY_SIZE(pdata->rss_table); in xgbe_get_rxfh_indir_size()
514 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_rxfh() local
518 for (i = 0; i < ARRAY_SIZE(pdata->rss_table); i++) in xgbe_get_rxfh()
519 indir[i] = XGMAC_GET_BITS(pdata->rss_table[i], in xgbe_get_rxfh()
524 memcpy(key, pdata->rss_key, sizeof(pdata->rss_key)); in xgbe_get_rxfh()
535 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_rxfh() local
536 struct xgbe_hw_if *hw_if = &pdata->hw_if; in xgbe_set_rxfh()
545 ret = hw_if->set_rss_lookup_table(pdata, indir); in xgbe_set_rxfh()
551 ret = hw_if->set_rss_hash_key(pdata, key); in xgbe_set_rxfh()
562 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_ts_info() local
571 if (pdata->ptp_clock) in xgbe_get_ts_info()
572 ts_info->phc_index = ptp_clock_index(pdata->ptp_clock); in xgbe_get_ts_info()