Lines Matching refs:ops
22 const struct ethtool_ops *ops = cpu_dp->orig_ethtool_ops; in dsa_master_get_regs_len() local
28 if (ops->get_regs_len) { in dsa_master_get_regs_len()
29 len = ops->get_regs_len(dev); in dsa_master_get_regs_len()
38 if (ds->ops->get_regs_len) { in dsa_master_get_regs_len()
39 len = ds->ops->get_regs_len(ds, port); in dsa_master_get_regs_len()
52 const struct ethtool_ops *ops = cpu_dp->orig_ethtool_ops; in dsa_master_get_regs() local
59 if (ops->get_regs_len && ops->get_regs) { in dsa_master_get_regs()
60 len = ops->get_regs_len(dev); in dsa_master_get_regs()
64 ops->get_regs(dev, regs, data); in dsa_master_get_regs()
74 if (ds->ops->get_regs_len && ds->ops->get_regs) { in dsa_master_get_regs()
75 len = ds->ops->get_regs_len(ds, port); in dsa_master_get_regs()
79 ds->ops->get_regs(ds, port, cpu_regs, data); in dsa_master_get_regs()
88 const struct ethtool_ops *ops = cpu_dp->orig_ethtool_ops; in dsa_master_get_ethtool_stats() local
93 if (ops->get_sset_count && ops->get_ethtool_stats) { in dsa_master_get_ethtool_stats()
94 count = ops->get_sset_count(dev, ETH_SS_STATS); in dsa_master_get_ethtool_stats()
95 ops->get_ethtool_stats(dev, stats, data); in dsa_master_get_ethtool_stats()
98 if (ds->ops->get_ethtool_stats) in dsa_master_get_ethtool_stats()
99 ds->ops->get_ethtool_stats(ds, port, data + count); in dsa_master_get_ethtool_stats()
107 const struct ethtool_ops *ops = cpu_dp->orig_ethtool_ops; in dsa_master_get_ethtool_phy_stats() local
112 if (dev->phydev && !ops->get_ethtool_phy_stats) { in dsa_master_get_ethtool_phy_stats()
116 } else if (ops->get_sset_count && ops->get_ethtool_phy_stats) { in dsa_master_get_ethtool_phy_stats()
117 count = ops->get_sset_count(dev, ETH_SS_PHY_STATS); in dsa_master_get_ethtool_phy_stats()
118 ops->get_ethtool_phy_stats(dev, stats, data); in dsa_master_get_ethtool_phy_stats()
124 if (ds->ops->get_ethtool_phy_stats) in dsa_master_get_ethtool_phy_stats()
125 ds->ops->get_ethtool_phy_stats(ds, port, data + count); in dsa_master_get_ethtool_phy_stats()
131 const struct ethtool_ops *ops = cpu_dp->orig_ethtool_ops; in dsa_master_get_sset_count() local
136 !ops->get_ethtool_phy_stats) in dsa_master_get_sset_count()
138 else if (ops->get_sset_count) in dsa_master_get_sset_count()
139 count = ops->get_sset_count(dev, sset); in dsa_master_get_sset_count()
144 if (ds->ops->get_sset_count) in dsa_master_get_sset_count()
145 count += ds->ops->get_sset_count(ds, cpu_dp->index, sset); in dsa_master_get_sset_count()
154 const struct ethtool_ops *ops = cpu_dp->orig_ethtool_ops; in dsa_master_get_strings() local
167 !ops->get_ethtool_phy_stats) { in dsa_master_get_strings()
173 } else if (ops->get_sset_count && ops->get_strings) { in dsa_master_get_strings()
174 mcount = ops->get_sset_count(dev, stringset); in dsa_master_get_strings()
177 ops->get_strings(dev, stringset, data); in dsa_master_get_strings()
180 if (ds->ops->get_strings) { in dsa_master_get_strings()
186 ds->ops->get_strings(ds, port, stringset, ndata); in dsa_master_get_strings()
187 count = ds->ops->get_sset_count(ds, port, stringset); in dsa_master_get_strings()
234 struct ethtool_ops *ops; in dsa_master_ethtool_setup() local
239 ops = devm_kzalloc(ds->dev, sizeof(*ops), GFP_KERNEL); in dsa_master_ethtool_setup()
240 if (!ops) in dsa_master_ethtool_setup()
245 memcpy(ops, cpu_dp->orig_ethtool_ops, sizeof(*ops)); in dsa_master_ethtool_setup()
247 ops->get_regs_len = dsa_master_get_regs_len; in dsa_master_ethtool_setup()
248 ops->get_regs = dsa_master_get_regs; in dsa_master_ethtool_setup()
249 ops->get_sset_count = dsa_master_get_sset_count; in dsa_master_ethtool_setup()
250 ops->get_ethtool_stats = dsa_master_get_ethtool_stats; in dsa_master_ethtool_setup()
251 ops->get_strings = dsa_master_get_strings; in dsa_master_ethtool_setup()
252 ops->get_ethtool_phy_stats = dsa_master_get_ethtool_phy_stats; in dsa_master_ethtool_setup()
254 dev->ethtool_ops = ops; in dsa_master_ethtool_setup()
271 const struct dsa_netdevice_ops *ops) in dsa_netdev_ops_set() argument
276 dev->dsa_ptr->netdev_ops = ops; in dsa_netdev_ops_set()
286 const struct dsa_device_ops *ops = dev->dsa_ptr->tag_ops; in dsa_master_set_promiscuity() local
288 if ((dev->priv_flags & IFF_UNICAST_FLT) && !ops->promisc_on_master) in dsa_master_set_promiscuity()