realtek: dsa: rename rtl838x_vlan_info

Rename struct rtl838x_vlan_info to struct rtldsa_vlan_info.

The structure is shared by all supported Realtek switch families and
is not specific to RTL838x. Use the driver-wide rtldsa prefix to
better reflect its scope.

No functional change.

Assisted-by: ChatGPT (OpenAI GPT-5.6 Sol)
Link: https://github.com/openwrt/openwrt/pull/24918
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
This commit is contained in:
Markus Stockhausen committed 2026-08-29 09:04:29 +02:00
1 parent fad3ebd4f1
commit 8115d2f098
7 files changed
+18 -18

No files matched your search

@@ -508,7 +508,7 @@ static const struct file_operations rtldsa_vlan_profiles_fops = {
static int rtldsa_vlan_table_raw_show(struct seq_file *m, void *v)
{
struct rtl838x_switch_priv *priv = m->private;
struct rtl838x_vlan_info info;
struct rtldsa_vlan_info info;
if (!priv->r->vlan_tables_read)
return -ENOTSUPP;
@@ -551,7 +551,7 @@ static const struct file_operations rtldsa_vlan_table_raw_fops = {
static int rtldsa_vlan_table_show(struct seq_file *m, void *v)
{
struct rtl838x_switch_priv *priv = m->private;
struct rtl838x_vlan_info info;
struct rtldsa_vlan_info info;
if (!priv->r->vlan_tables_read)
return -ENOTSUPP;
@@ -80,7 +80,7 @@ static void rtldsa_83xx_mc_pmasks_setup(struct rtl838x_switch_priv *priv)
/* Initialize all VLANS */
static void rtldsa_vlan_setup(struct rtl838x_switch_priv *priv)
{
struct rtl838x_vlan_info info = {
struct rtldsa_vlan_info info = {
.l2_tunnel_list_id = -1,
};
@@ -1522,7 +1522,7 @@ static int rtldsa_vlan_filtering(struct dsa_switch *ds, int port,
static int rtldsa_vlan_prepare(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan)
{
struct rtl838x_vlan_info info;
struct rtldsa_vlan_info info;
struct rtl838x_switch_priv *priv = ds->priv;
priv->r->vlan_tables_read(0, &info);
@@ -1548,7 +1548,7 @@ static int rtldsa_vlan_add(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan,
struct netlink_ext_ack *extack)
{
struct rtl838x_vlan_info info;
struct rtldsa_vlan_info info;
struct rtl838x_switch_priv *priv = ds->priv;
int err;
@@ -1620,7 +1620,7 @@ static int rtldsa_vlan_add(struct dsa_switch *ds, int port,
static int rtldsa_vlan_del(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan)
{
struct rtl838x_vlan_info info;
struct rtldsa_vlan_info info;
struct rtl838x_switch_priv *priv = ds->priv;
u16 pvid;
@@ -1701,7 +1701,7 @@ static int rtldsa_vlan_msti_set(struct dsa_switch *ds, struct dsa_bridge bridge,
const struct switchdev_vlan_msti *msti)
{
struct rtl838x_switch_priv *priv = ds->priv;
struct rtl838x_vlan_info info;
struct rtldsa_vlan_info info;
u16 mst_slot_old;
int mst_slot;
@@ -1008,7 +1008,7 @@ struct rtldsa_port {
const struct dsa_port *dp;
};
struct rtl838x_vlan_info {
struct rtldsa_vlan_info {
u64 untagged_ports;
u64 member_ports;
u8 profile_id;
@@ -1349,8 +1349,8 @@ struct rtldsa_config {
int trk_ctrl;
int trk_hash_ctrl;
int spanning_tree_ctrl;
void (*vlan_tables_read)(u32 vlan, struct rtl838x_vlan_info *info);
void (*vlan_set_tagged)(u32 vlan, struct rtl838x_vlan_info *info);
void (*vlan_tables_read)(u32 vlan, struct rtldsa_vlan_info *info);
void (*vlan_set_tagged)(u32 vlan, struct rtldsa_vlan_info *info);
void (*vlan_set_untagged)(u32 vlan, u64 portmask);
int (*vlan_profile_get)(int index, struct rtldsa_vlan_profile *profile);
void (*vlan_profile_dump)(struct rtl838x_switch_priv *priv, int index);
@@ -206,7 +206,7 @@ static inline int rtl838x_port_iso_ctrl(int p)
return RTL838X_PORT_ISO_CTRL(p);
}
static void rtl838x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
static void rtl838x_vlan_tables_read(u32 vlan, struct rtldsa_vlan_info *info)
{
u32 v;
/* Read VLAN table (0) via register 0 */
@@ -230,7 +230,7 @@ static void rtl838x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
rtl_table_release(r);
}
static void rtl838x_vlan_set_tagged(u32 vlan, struct rtl838x_vlan_info *info)
static void rtl838x_vlan_set_tagged(u32 vlan, struct rtldsa_vlan_info *info)
{
u32 v;
/* Access VLAN table (0) via register 0 */
@@ -224,7 +224,7 @@ inline void rtl839x_exec_tbl2_cmd(u32 cmd)
do { } while (sw_r32(RTL839X_TBL_ACCESS_CTRL_2) & (1 << 9));
}
static void rtl839x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
static void rtl839x_vlan_tables_read(u32 vlan, struct rtldsa_vlan_info *info)
{
u32 u, v, w;
/* Read VLAN table (0) via register 0 */
@@ -254,7 +254,7 @@ static void rtl839x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
info->untagged_ports = (info->untagged_ports << 21) | ((v >> 11) & 0x1fffff);
}
static void rtl839x_vlan_set_tagged(u32 vlan, struct rtl838x_vlan_info *info)
static void rtl839x_vlan_set_tagged(u32 vlan, struct rtldsa_vlan_info *info)
{
u32 u, v, w;
/* Access VLAN table (0) via register 0 */
@@ -345,7 +345,7 @@ static inline int rtl930x_trk_mbr_ctr(int group)
return RTL930X_TRK_MBR_CTRL + (group << 2);
}
static void rtl930x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
static void rtl930x_vlan_tables_read(u32 vlan, struct rtldsa_vlan_info *info)
{
u32 v, w;
/* Read VLAN table (1) via register 0 */
@@ -372,7 +372,7 @@ static void rtl930x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
info->untagged_ports = v >> 3;
}
static void rtl930x_vlan_set_tagged(u32 vlan, struct rtl838x_vlan_info *info)
static void rtl930x_vlan_set_tagged(u32 vlan, struct rtldsa_vlan_info *info)
{
u32 v, w;
/* Access VLAN table (1) via register 0 */
@@ -287,7 +287,7 @@ static inline int rtldsa_931x_trk_mbr_ctr(int group)
return RTL931X_TRK_MBR_CTRL + (group << 3);
}
static void rtl931x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
static void rtl931x_vlan_tables_read(u32 vlan, struct rtldsa_vlan_info *info)
{
u32 v, w, x, y;
/* Read VLAN table (3) via register 0 */
@@ -325,7 +325,7 @@ static void rtl931x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
rtl_table_release(r);
}
static void rtl931x_vlan_set_tagged(u32 vlan, struct rtl838x_vlan_info *info)
static void rtl931x_vlan_set_tagged(u32 vlan, struct rtldsa_vlan_info *info)
{
struct table_reg *r;
u32 v, w, x, y;