kernel: Add missing devm_regulator_get_exclusive()
[openwrt/openwrt.git] / target / linux / generic / backport-5.10 / 763-v5.11-net-dsa-mt7530-enable-MTU-normalization.patch
1 From 771c8901568dd8776a260aa93db41be88a60389e Mon Sep 17 00:00:00 2001
2 From: DENG Qingfang <dqfext@gmail.com>
3 Date: Fri, 11 Dec 2020 01:03:22 +0800
4 Subject: [PATCH] net: dsa: mt7530: enable MTU normalization
5
6 MT7530 has a global RX length register, so we are actually changing its
7 MRU.
8 Enable MTU normalization for this reason.
9
10 Signed-off-by: DENG Qingfang <dqfext@gmail.com>
11 Acked-by: Landen Chao <landen.chao@mediatek.com>
12 Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
13 Link: https://lore.kernel.org/r/20201210170322.3433-1-dqfext@gmail.com
14 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
15 ---
16 drivers/net/dsa/mt7530.c | 2 ++
17 1 file changed, 2 insertions(+)
18
19 --- a/drivers/net/dsa/mt7530.c
20 +++ b/drivers/net/dsa/mt7530.c
21 @@ -1703,6 +1703,7 @@ mt7530_setup(struct dsa_switch *ds)
22 */
23 dn = dsa_to_port(ds, MT7530_CPU_PORT)->master->dev.of_node->parent;
24 ds->configure_vlan_while_not_filtering = true;
25 + ds->mtu_enforcement_ingress = true;
26
27 if (priv->id == ID_MT7530) {
28 regulator_set_voltage(priv->core_pwr, 1000000, 1000000);
29 @@ -1948,6 +1949,7 @@ mt7531_setup(struct dsa_switch *ds)
30 }
31
32 ds->configure_vlan_while_not_filtering = true;
33 + ds->mtu_enforcement_ingress = true;
34
35 /* Flush the FDB table */
36 ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);