Commit Graph

12 Commits (46c49d83815a84225c1bfcb54fd96b9f73c7c2cb)

Author SHA1 Message Date
Jo-Philipp Wich dc7a1e8555 ramips: fix reporting effective VLAN ID on MT7621 switches
On MT7621, the REG_ESW_VLAN_VTIM reads are undefined, causing swconfig
to always report `vid: 0` in swconfig show output.

Since a 4K VLAN table is used on this platform, the VLAN ID always
correponds to the actual VLAN table index so provide a specific MT7621
implementation of the get_vid callback which returns the table index
as VLAN ID.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Jo-Philipp Wich 341b1427fc ramips: properly map pvid for vlans with remapped vid on mt7530/762x switches
Currently, untagged port primary vlan IDs are set to the VLAN table index,
and not the actual VLAN ID, breaking configurations with IDs deviating from
the VLAN index.

Fix the issue by resolving the per-port pvid property to the target VLAN ID
value before committing to the hardware.

Fixes FS#991, FS#1147, FS#1341

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Jo-Philipp Wich bb4002c79d ramips: don't clobber vlans with remapped vid on mt7530/762x switches
Avoid overwriting vlan entries with remapped vid in later iterations of
the vlan enumeration loop of mt7530_apply_config().

Fix the problem by refactoring the code to first reset the entire table,
then reprogram only vlans with members to prevent overwriting configured
vlans with unconfigured ones.

Fixes FS#1147, FS#1341

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Felix Fietkau d3ea5fc9f3 ramips: use napi_alloc_frag and skb_free_frag
Slightly improves rx performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 968b861612 ramips: improve NAPI polling to increase GRO batch size
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Rosen Penev dcdc2880b6 ramips: reduce napi_weight in the ethernet driver.
Currently dmsg a weight of 128 which is above the kernel limit of 64. Silence the warning.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
7 years ago
Kevin Darbyshire-Bryant fd6bf05548 ramips: add 'lwlll' portmap to mt7530 switch
The Xiaomi Mi Router 3G uses this deranged vlan portmap. Add support so
that packets are not leaked across all switch ports when reset.

Fix a whitespace nit while we're here.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
[fix wrong pvids order]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Rosen Penev 6aa46bf05e ramips: Change ethernet driver to use napi_complete_done.
Backport of mailine linux commit. Speeds up ethernet slightly and reduces latency.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
7 years ago
Thibaut VARENE 2b3ab0208e ramips: provide get_port_stats() on mt7530/762x switches
This patch provides a generic switch_dev_ops 'get_port_stats()' callback by
taping into the relevant port MIB counters.

This callback is used by swconfig_leds led trigger to blink LEDs with port
network traffic.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
John Crispin 7f9143168f ramips: add jumbo frame support for v4.9
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
John Crispin 6cb0372d42 ramips: fix mt7621 ethernet support for v4.9
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
John Crispin 9c24227090 ramips: add v4.9 support
NAND support is missing

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago