net: dsa: mv88e6xxx: Refactor setting of jumbo frames

Some switches support jumbo frames. Refactor this code into operations
in the ops structure.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Цей коміт міститься в:
Andrew Lunn
2016-12-03 04:45:17 +01:00
зафіксовано David S. Miller
джерело 6e55f69846
коміт 5f4366660d
4 змінених файлів з 38 додано та 5 видалено

Переглянути файл

@@ -607,6 +607,20 @@ int mv88e6xxx_port_set_8021q_mode(struct mv88e6xxx_chip *chip, int port,
return 0;
}
int mv88e6165_port_jumbo_config(struct mv88e6xxx_chip *chip, int port)
{
u16 reg;
int err;
err = mv88e6xxx_port_read(chip, port, PORT_CONTROL_2, &reg);
if (err)
return err;
reg |= PORT_CONTROL_2_JUMBO_10240;
return mv88e6xxx_port_write(chip, port, PORT_CONTROL_2, reg);
}
/* Offset 0x0f: Port Ether type */
int mv88e6351_port_set_ether_type(struct mv88e6xxx_chip *chip, int port,