Thread (3 messages) 3 messages, 2 authors, 2021-08-03

Re: [PATCH net 1/1] net: dsa: qca: ar9331: make proper initial port defaults

flat view

From: DENG Qingfang <dqfext@gmail.com>
Date: 2021-08-03 08:14:50
Also in: linux-mips, lkml

On Tue, Aug 03, 2021 at 08:54:24AM +0200, Oleksij Rempel wrote:
quoted hunk ↗ jump to hunk
+	if (dsa_is_cpu_port(ds, port)) {
+		/* CPU port should be allowed to communicate with all user
+		 * ports.
+		 */
+		port_mask = dsa_user_ports(ds);
+		/* Enable Atheros header on CPU port. This will allow us
+		 * communicate with each port separately
+		 */
+		port_ctrl |= AR9331_SW_PORT_CTRL_HEAD_EN;
+	} else if (dsa_is_user_port(ds, port)) {
+		/* User ports should communicate only with the CPU port.
+		 */
+		port_mask = BIT(dsa_to_port(ds, port)->cpu_dp->index);
+		port_ctrl |= AR9331_SW_PORT_CTRL_LEARN_EN;
All user ports should start with address learning disabled.
To toggle it, implement .port_pre_bridge_flags and .port_bridge_flags.
quoted hunk ↗ jump to hunk
+	} else {
+		/* Other ports do not need to communicate at all */
+		port_mask = 0;
+	}
+
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help