Lines Matching refs:h
43 struct hnae_handle *h; in hns_nic_get_link() local
45 h = priv->ae_handle; in hns_nic_get_link()
54 if (h->dev && h->dev->ops && h->dev->ops->get_status) in hns_nic_get_link()
55 link_stat = link_stat && h->dev->ops->get_status(h); in hns_nic_get_link()
118 struct hnae_handle *h; in hns_nic_get_link_ksettings() local
128 h = priv->ae_handle; in hns_nic_get_link_ksettings()
129 if (!h->dev || !h->dev->ops || !h->dev->ops->get_info) in hns_nic_get_link_ksettings()
132 ret = h->dev->ops->get_info(h, NULL, &speed, &duplex); in hns_nic_get_link_ksettings()
160 supported |= h->if_support; in hns_nic_get_link_ksettings()
161 if (h->phy_if == PHY_INTERFACE_MODE_SGMII) { in hns_nic_get_link_ksettings()
164 } else if (h->phy_if == PHY_INTERFACE_MODE_XGMII) { in hns_nic_get_link_ksettings()
169 switch (h->media_type) { in hns_nic_get_link_ksettings()
181 if (!(AE_IS_VER1(priv->enet_ver) && h->port_type == HNAE_PORT_DEBUG)) in hns_nic_get_link_ksettings()
205 struct hnae_handle *h; in hns_nic_set_link_ksettings() local
215 h = priv->ae_handle; in hns_nic_set_link_ksettings()
218 if (h->phy_if == PHY_INTERFACE_MODE_XGMII) { in hns_nic_set_link_ksettings()
223 } else if (h->phy_if == PHY_INTERFACE_MODE_SGMII) { in hns_nic_set_link_ksettings()
241 if (h->dev->ops->adjust_link) { in hns_nic_set_link_ksettings()
243 h->dev->ops->adjust_link(h, (int)speed, cmd->base.duplex); in hns_nic_set_link_ksettings()
289 struct hnae_handle *h = priv->ae_handle; in __lb_setup() local
295 ret = h->dev->ops->set_loopback(h, loop, 0x1); in __lb_setup()
298 if ((h->dev->ops->set_loopback) && in __lb_setup()
300 ret = h->dev->ops->set_loopback(h, loop, 0x1); in __lb_setup()
303 if (h->dev->ops->set_loopback) in __lb_setup()
304 ret = h->dev->ops->set_loopback(h, loop, 0x1); in __lb_setup()
310 if (!ret && h->dev->ops->set_loopback) { in __lb_setup()
312 ret = h->dev->ops->set_loopback(h, in __lb_setup()
316 ret = h->dev->ops->set_loopback(h, in __lb_setup()
327 h->dev->ops->set_promisc_mode( in __lb_setup()
328 h, ndev->flags & IFF_PROMISC); in __lb_setup()
330 h->dev->ops->set_promisc_mode(h, 1); in __lb_setup()
340 struct hnae_handle *h = priv->ae_handle; in __lb_up() local
352 ret = h->dev->ops->start ? h->dev->ops->start(h) : 0; in __lb_up()
363 h->dev->ops->adjust_link(h, speed, duplex); in __lb_up()
485 struct hnae_handle *h = priv->ae_handle; in __lb_run_test() local
531 h->q_num, h->q_num * 2 - 1, in __lb_run_test()
554 struct hnae_handle *h = priv->ae_handle; in __lb_down() local
566 if (h->dev->ops->stop) in __lb_down()
567 h->dev->ops->stop(h); in __lb_down()
570 (void)__lb_clean_rings(priv, 0, h->q_num - 1, 256); in __lb_down()
717 struct hnae_handle *h; in hns_set_pauseparam() local
720 h = priv->ae_handle; in hns_set_pauseparam()
721 ops = h->dev->ops; in hns_set_pauseparam()
841 struct hnae_handle *h = priv->ae_handle; in hns_get_ethtool_stats() local
845 if (!h->dev->ops->get_stats || !h->dev->ops->update_stats) { in hns_get_ethtool_stats()
850 h->dev->ops->update_stats(h, &netdev->stats); in hns_get_ethtool_stats()
885 h->dev->ops->get_stats(h, &p[26]); in hns_get_ethtool_stats()
897 struct hnae_handle *h = priv->ae_handle; in hns_get_strings() local
900 if (!h->dev->ops->get_strings) { in hns_get_strings()
973 h->dev->ops->get_strings(h, stringset, (u8 *)buff); in hns_get_strings()
987 struct hnae_handle *h = priv->ae_handle; in hns_get_sset_count() local
988 struct hnae_ae_ops *ops = h->dev->ops; in hns_get_sset_count()
1005 return (HNS_NET_STATS_CNT + ops->get_sset_count(h, stringset)); in hns_get_sset_count()
1044 struct hnae_handle *h = priv->ae_handle; in hns_set_phys_id() local
1095 return h->dev->ops->set_led_id(h, HNAE_LED_ACTIVE); in hns_set_phys_id()
1097 return h->dev->ops->set_led_id(h, HNAE_LED_ON); in hns_set_phys_id()
1099 return h->dev->ops->set_led_id(h, HNAE_LED_OFF); in hns_set_phys_id()
1101 return h->dev->ops->set_led_id(h, HNAE_LED_INACTIVE); in hns_set_phys_id()