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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 03, 2021 at 08:54:24AM +0200, Oleksij Rempel wrote:
> +	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.

> +	} else {
> +		/* Other ports do not need to communicate at all */
> +		port_mask = 0;
> +	}
> +



[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux