Lines Matching refs:mib
64 struct ksz_port_mib *mib = &dev->ports[port].mib; in port_r_cnt() local
68 while (mib->cnt_ptr < dev->reg_mib_cnt) { in port_r_cnt()
69 dev->dev_ops->r_mib_cnt(dev, port, mib->cnt_ptr, in port_r_cnt()
70 &mib->counters[mib->cnt_ptr]); in port_r_cnt()
71 ++mib->cnt_ptr; in port_r_cnt()
75 dropped = &mib->counters[dev->mib_cnt]; in port_r_cnt()
78 while (mib->cnt_ptr < dev->mib_cnt) { in port_r_cnt()
79 dev->dev_ops->r_mib_pkt(dev, port, mib->cnt_ptr, in port_r_cnt()
80 dropped, &mib->counters[mib->cnt_ptr]); in port_r_cnt()
81 ++mib->cnt_ptr; in port_r_cnt()
83 mib->cnt_ptr = 0; in port_r_cnt()
90 struct ksz_port_mib *mib; in ksz_mib_read_work() local
99 mib = &p->mib; in ksz_mib_read_work()
100 mutex_lock(&mib->cnt_mutex); in ksz_mib_read_work()
109 mib->cnt_ptr = dev->reg_mib_cnt; in ksz_mib_read_work()
113 mutex_unlock(&mib->cnt_mutex); in ksz_mib_read_work()
180 struct ksz_port_mib *mib; in ksz_get_ethtool_stats() local
182 mib = &dev->ports[port].mib; in ksz_get_ethtool_stats()
183 mutex_lock(&mib->cnt_mutex); in ksz_get_ethtool_stats()
187 mib->cnt_ptr = dev->reg_mib_cnt; in ksz_get_ethtool_stats()
189 memcpy(buf, mib->counters, dev->mib_cnt * sizeof(u64)); in ksz_get_ethtool_stats()
190 mutex_unlock(&mib->cnt_mutex); in ksz_get_ethtool_stats()