Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64014fe6 authored by Vivien Didelot's avatar Vivien Didelot Committed by David S. Miller
Browse files

net: dsa: mv88e6xxx: unconditionally set ATU trunk



Set the trunk member of the mv88e6xxx_atu_entry structure regardless its
value, so that uninitialized structures gets the correct boolean value.

Note that no mainline code is affected by the current behavior.

Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 382ed724
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -121,9 +121,7 @@ static int mv88e6xxx_g1_atu_data_read(struct mv88e6xxx_chip *chip,


	entry->state = val & 0xf;
	entry->state = val & 0xf;
	if (entry->state != GLOBAL_ATU_DATA_STATE_UNUSED) {
	if (entry->state != GLOBAL_ATU_DATA_STATE_UNUSED) {
		if (val & GLOBAL_ATU_DATA_TRUNK)
		entry->trunk = !!(val & GLOBAL_ATU_DATA_TRUNK);
			entry->trunk = true;

		entry->portvec = (val >> 4) & mv88e6xxx_port_mask(chip);
		entry->portvec = (val >> 4) & mv88e6xxx_port_mask(chip);
	}
	}