- return rtl8366_smi_rmwr(smi, RTL8366RB_CHIP_GLOBAL_CTRL_REG,
- RTL8366RB_CHIP_CTRL_VLAN_4KTB,
- (enable) ? RTL8366RB_CHIP_CTRL_VLAN_4KTB : 0);
-}
-
-#ifdef CONFIG_RTL8366S_PHY_DEBUG_FS
-static ssize_t rtl8366rb_read_debugfs_mibs(struct file *file,
- char __user *user_buf,
- size_t count, loff_t *ppos)
-{
- struct rtl8366_smi *smi = file->private_data;
- int i, j, len = 0;
- char *buf = smi->buf;
-
- len += snprintf(buf + len, sizeof(smi->buf) - len,
- "%-36s %12s %12s %12s %12s %12s %12s\n",
- "Counter",
- "Port 0", "Port 1", "Port 2",
- "Port 3", "Port 4", "Port 5");
-
- for (i = 0; i < ARRAY_SIZE(rtl8366rb_mib_counters); ++i) {
- len += snprintf(buf + len, sizeof(smi->buf) - len, "%-36s ",
- rtl8366rb_mib_counters[i].name);
- for (j = 0; j < RTL8366RB_NUM_PORTS; ++j) {
- unsigned long long counter = 0;
-
- if (!rtl8366_get_mib_counter(smi, i, j, &counter))
- len += snprintf(buf + len,
- sizeof(smi->buf) - len,
- "%12llu ", counter);
- else
- len += snprintf(buf + len,
- sizeof(smi->buf) - len,
- "%12s ", "error");
- }
- len += snprintf(buf + len, sizeof(smi->buf) - len, "\n");
- }
-
- return simple_read_from_buffer(user_buf, count, ppos, buf, len);