mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
ramips: update mt7530 switch settings
This commit is contained in:
parent
62eb2434f5
commit
3d3a95e5b4
@ -2284,7 +2284,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
|
||||
host->mrq = NULL;
|
||||
//init_MUTEX(&host->sem); /* we don't need to support multiple threads access */
|
||||
|
||||
dma_coerce_mask_and_coherent(mmc_dev(mmc), DMA_BIT_MASK(32));
|
||||
mmc_dev(mmc)->dma_mask = NULL;
|
||||
|
||||
/* using dma_alloc_coherent*/ /* todo: using 1, for all 4 slots */
|
||||
host->dma.gpd = dma_alloc_coherent(&pdev->dev,
|
||||
|
@ -208,7 +208,6 @@ struct mt7530_priv {
|
||||
struct mii_bus *bus;
|
||||
struct switch_dev swdev;
|
||||
|
||||
u8 mirror_src_port;
|
||||
u8 mirror_dest_port;
|
||||
bool global_vlan_enable;
|
||||
struct mt7530_vlan_entry vlan_entries[MT7530_NUM_VLANS];
|
||||
@ -436,7 +435,8 @@ mt7530_get_vlan_ports(struct switch_dev *dev, struct switch_val *val)
|
||||
if (etag == ETAG_CTRL_TAG)
|
||||
p->flags |= BIT(SWITCH_PORT_FLAG_TAGGED);
|
||||
else if (etag != ETAG_CTRL_UNTAG)
|
||||
printk("vlan egress tag control neither untag nor tag.\n");
|
||||
printk("vlan %d port %d egress tag control neither untag nor tag: %d.\n",
|
||||
val->port_vlan, i, etag);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -519,50 +519,6 @@ mt7530_get_vid(struct switch_dev *dev, const struct switch_attr *attr,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
mt7530_get_mirror_rx_enable(struct switch_dev *dev, const struct switch_attr *attr,
|
||||
struct switch_val *val)
|
||||
{
|
||||
struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev);
|
||||
|
||||
val->value.i = priv->port_entries[priv->mirror_src_port].mirror_rx;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
mt7530_set_mirror_rx_enable(struct switch_dev *dev, const struct switch_attr *attr,
|
||||
struct switch_val *val)
|
||||
{
|
||||
struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev);
|
||||
|
||||
priv->port_entries[priv->mirror_src_port].mirror_rx = val->value.i;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
mt7530_get_mirror_tx_enable(struct switch_dev *dev, const struct switch_attr *attr,
|
||||
struct switch_val *val)
|
||||
{
|
||||
struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev);
|
||||
|
||||
val->value.i = priv->port_entries[priv->mirror_src_port].mirror_tx;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
mt7530_set_mirror_tx_enable(struct switch_dev *dev, const struct switch_attr *attr,
|
||||
struct switch_val *val)
|
||||
{
|
||||
struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev);
|
||||
|
||||
priv->port_entries[priv->mirror_src_port].mirror_tx = val->value.i;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
mt7530_get_mirror_monitor_port(struct switch_dev *dev, const struct switch_attr *attr,
|
||||
struct switch_val *val)
|
||||
@ -585,28 +541,6 @@ mt7530_set_mirror_monitor_port(struct switch_dev *dev, const struct switch_attr
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
mt7530_get_mirror_source_port(struct switch_dev *dev, const struct switch_attr *attr,
|
||||
struct switch_val *val)
|
||||
{
|
||||
struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev);
|
||||
|
||||
val->value.i = priv->mirror_src_port;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
mt7530_set_mirror_source_port(struct switch_dev *dev, const struct switch_attr *attr,
|
||||
struct switch_val *val)
|
||||
{
|
||||
struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev);
|
||||
|
||||
priv->mirror_src_port = val->value.i;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
mt7530_get_port_mirror_rx(struct switch_dev *dev, const struct switch_attr *attr,
|
||||
struct switch_val *val)
|
||||
@ -1002,20 +936,6 @@ static const struct switch_attr mt7530_global[] = {
|
||||
.description = "Get MIB counters for switch",
|
||||
.get = mt7530_sw_get_mib,
|
||||
.set = NULL,
|
||||
}, {
|
||||
.type = SWITCH_TYPE_INT,
|
||||
.name = "enable_mirror_rx",
|
||||
.description = "Enable mirroring of RX packets",
|
||||
.set = mt7530_set_mirror_rx_enable,
|
||||
.get = mt7530_get_mirror_rx_enable,
|
||||
.max = 1
|
||||
}, {
|
||||
.type = SWITCH_TYPE_INT,
|
||||
.name = "enable_mirror_tx",
|
||||
.description = "Enable mirroring of TX packets",
|
||||
.set = mt7530_set_mirror_tx_enable,
|
||||
.get = mt7530_get_mirror_tx_enable,
|
||||
.max = 1
|
||||
}, {
|
||||
.type = SWITCH_TYPE_INT,
|
||||
.name = "mirror_monitor_port",
|
||||
@ -1023,13 +943,6 @@ static const struct switch_attr mt7530_global[] = {
|
||||
.set = mt7530_set_mirror_monitor_port,
|
||||
.get = mt7530_get_mirror_monitor_port,
|
||||
.max = MT7530_NUM_PORTS - 1
|
||||
}, {
|
||||
.type = SWITCH_TYPE_INT,
|
||||
.name = "mirror_source_port",
|
||||
.description = "Mirror source port",
|
||||
.set = mt7530_set_mirror_source_port,
|
||||
.get = mt7530_get_mirror_source_port,
|
||||
.max = MT7530_NUM_PORTS - 1
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -47,7 +47,7 @@ I2C_RALINK_MODULES:= \
|
||||
define KernelPackage/i2c-ralink
|
||||
$(call i2c_defaults,$(I2C_RALINK_MODULES),59)
|
||||
TITLE:=Ralink I2C Controller
|
||||
DEPENDS:=kmod-i2c-core @TARGET_ramips \
|
||||
DEPENDS:=+kmod-i2c-core @TARGET_ramips \
|
||||
@!(TARGET_ramips_mt7621||TARGET_ramips_mt76x8)
|
||||
endef
|
||||
|
||||
@ -64,7 +64,7 @@ I2C_MT7621_MODULES:= \
|
||||
define KernelPackage/i2c-mt7628
|
||||
$(call i2c_defaults,$(I2C_MT7621_MODULES),59)
|
||||
TITLE:=MT7628/88 I2C Controller
|
||||
DEPENDS:=kmod-i2c-core \
|
||||
DEPENDS:=+kmod-i2c-core \
|
||||
@(TARGET_ramips_mt76x8)
|
||||
endef
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user