Lines Matching refs:ops
60 if (h->dev && h->dev->ops && h->dev->ops->get_status) in hns_nic_get_link()
61 link_stat = link_stat && h->dev->ops->get_status(h); in hns_nic_get_link()
137 if (!h->dev || !h->dev->ops || !h->dev->ops->get_info) in hns_nic_get_settings()
140 ret = h->dev->ops->get_info(h, NULL, &speed, &duplex); in hns_nic_get_settings()
203 !priv->ae_handle->dev->ops) in hns_nic_set_settings()
231 if (h->dev->ops->adjust_link) { in hns_nic_set_settings()
232 h->dev->ops->adjust_link(h, (int)speed, cmd->duplex); in hns_nic_set_settings()
322 if ((h->dev->ops->set_loopback) && in __lb_setup()
324 ret = h->dev->ops->set_loopback(h, loop, 0x1); in __lb_setup()
327 if (h->dev->ops->set_loopback) in __lb_setup()
328 ret = h->dev->ops->set_loopback(h, loop, 0x1); in __lb_setup()
334 if (h->dev->ops->set_loopback) { in __lb_setup()
336 ret |= h->dev->ops->set_loopback(h, in __lb_setup()
339 ret |= h->dev->ops->set_loopback(h, in __lb_setup()
376 ret = h->dev->ops->start ? h->dev->ops->start(h) : 0; in __lb_up()
390 h->dev->ops->adjust_link(h, speed, duplex); in __lb_up()
575 if (h->dev->ops->stop) in __lb_down()
576 h->dev->ops->stop(h); in __lb_down()
681 struct hnae_ae_ops *ops; in hns_get_ringparam() local
686 ops = priv->ae_handle->dev->ops; in hns_get_ringparam()
688 if (ops->get_ring_bdnum_limit) in hns_get_ringparam()
689 ops->get_ring_bdnum_limit(queue, &uplimit); in hns_get_ringparam()
706 struct hnae_ae_ops *ops; in hns_get_pauseparam() local
708 ops = priv->ae_handle->dev->ops; in hns_get_pauseparam()
710 if (ops->get_pauseparam) in hns_get_pauseparam()
711 ops->get_pauseparam(priv->ae_handle, ¶m->autoneg, in hns_get_pauseparam()
727 struct hnae_ae_ops *ops; in hns_set_pauseparam() local
732 ops = h->dev->ops; in hns_set_pauseparam()
734 if (!ops->set_pauseparam) in hns_set_pauseparam()
737 return ops->set_pauseparam(priv->ae_handle, param->autoneg, in hns_set_pauseparam()
752 struct hnae_ae_ops *ops; in hns_get_coalesce() local
754 ops = priv->ae_handle->dev->ops; in hns_get_coalesce()
759 if ((!ops->get_coalesce_usecs) || in hns_get_coalesce()
760 (!ops->get_rx_max_coalesced_frames)) in hns_get_coalesce()
763 ops->get_coalesce_usecs(priv->ae_handle, in hns_get_coalesce()
767 ops->get_rx_max_coalesced_frames( in hns_get_coalesce()
786 struct hnae_ae_ops *ops; in hns_set_coalesce() local
791 ops = priv->ae_handle->dev->ops; in hns_set_coalesce()
799 if ((!ops->set_coalesce_usecs) || in hns_set_coalesce()
800 (!ops->set_coalesce_frames)) in hns_set_coalesce()
803 ops->set_coalesce_usecs(priv->ae_handle, in hns_set_coalesce()
806 ret = ops->set_coalesce_frames( in hns_set_coalesce()
844 if (!h->dev->ops->get_stats || !h->dev->ops->update_stats) { in hns_get_ethtool_stats()
849 h->dev->ops->update_stats(h, &netdev->stats); in hns_get_ethtool_stats()
884 h->dev->ops->get_stats(h, &p[26]); in hns_get_ethtool_stats()
899 if (!h->dev->ops->get_strings) { in hns_get_strings()
972 h->dev->ops->get_strings(h, stringset, (u8 *)buff); in hns_get_strings()
987 struct hnae_ae_ops *ops = h->dev->ops; in hns_get_sset_count() local
989 if (!ops->get_sset_count) { in hns_get_sset_count()
1004 return (HNS_NET_STATS_CNT + ops->get_sset_count(h, stringset)); in hns_get_sset_count()
1105 return h->dev->ops->set_led_id(h, HNAE_LED_ACTIVE); in hns_set_phys_id()
1107 return h->dev->ops->set_led_id(h, HNAE_LED_ON); in hns_set_phys_id()
1109 return h->dev->ops->set_led_id(h, HNAE_LED_OFF); in hns_set_phys_id()
1111 return h->dev->ops->set_led_id(h, HNAE_LED_INACTIVE); in hns_set_phys_id()
1129 struct hnae_ae_ops *ops; in hns_get_regs() local
1133 ops = priv->ae_handle->dev->ops; in hns_get_regs()
1136 if (!ops->get_regs) { in hns_get_regs()
1140 ops->get_regs(priv->ae_handle, data); in hns_get_regs()
1153 struct hnae_ae_ops *ops; in hns_get_regs_len() local
1157 ops = priv->ae_handle->dev->ops; in hns_get_regs_len()
1158 if (!ops->get_regs_len) { in hns_get_regs_len()
1163 reg_num = ops->get_regs_len(priv->ae_handle); in hns_get_regs_len()