realtek: DSA: Document meaning of lag priv variables
authorSven Eckelmann <[email protected]>
Sun, 9 Nov 2025 08:38:48 +0000 (09:38 +0100)
committerHauke Mehrtens <[email protected]>
Tue, 11 Nov 2025 00:06:49 +0000 (01:06 +0100)
The names of the LAG variables in struct rtl838x_switch_priv are not self
explaining. They are even suggesting that they are dealing with information
which are actually stored in a different variable. As first step, document
their meaning.

Signed-off-by: Sven Eckelmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20707
Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h

index ca9558f8df29540614a119092d30225f8117bd77..32e124091ecc27619efe7c32789fc7497791b37f 100644 (file)
@@ -1164,9 +1164,22 @@ struct rtl838x_switch_priv {
        u32 fib_entries;
        int l2_bucket_size;
        struct dentry *dbgfs_dir;
+
+       /** @lags_port_members: Port (bit) is part of a specific LAG */
        u64 lags_port_members[MAX_LAGS];
+
+       /** @lag_primary: port of a LAG is primary (repesenting) and is added to
+        * the port matrix
+        */
        u32 lag_primary[MAX_LAGS];
+
+       /**
+        * @is_lagmember: Port is part of any LAG but not the first/primary
+        * port which needs to be added in the port matrix
+        */
        u32 is_lagmember[57];
+
+       /** @lagmembers: Port (bit) is part of any LAG */
        u64 lagmembers;
        struct workqueue_struct *wq;
        struct notifier_block ne_nb;