#define RTL8366S_VLAN_FID_SHIFT 12
#define RTL8366S_VLAN_FID_MASK 0x7
+#define RTL8366S_MIB_RXB_ID 0 /* IfInOctets */
+#define RTL8366S_MIB_TXB_ID 20 /* IfOutOctets */
+
static struct rtl8366_mib_counter rtl8366s_mib_counters[] = {
{ 0, 0, 4, "IfInOctets" },
{ 0, 4, 4, "EtherStatsOctets" },
0, (1 << (val->port_vlan + 3)));
}
+static int rtl8366s_sw_get_port_stats(struct switch_dev *dev, int port,
+ struct switch_port_stats *stats)
+{
+ return (rtl8366_sw_get_port_stats(dev, port, stats,
+ RTL8366S_MIB_TXB_ID, RTL8366S_MIB_RXB_ID));
+}
+
static struct switch_attr rtl8366s_globals[] = {
{
.type = SWITCH_TYPE_INT,
.set_port_pvid = rtl8366_sw_set_port_pvid,
.reset_switch = rtl8366_sw_reset_switch,
.get_port_link = rtl8366s_sw_get_port_link,
+ .get_port_stats = rtl8366s_sw_get_port_stats,
};
static int rtl8366s_switch_init(struct rtl8366_smi *smi)