Author: hauke Date: 2014-07-05 14:13:56 +0200 (Sat, 05 Jul 2014) New Revision: 41511
Modified: trunk/target/linux/generic/files/drivers/net/phy/adm6996.c Log: adm6996: the GPIO interface for the adm6996l does not support switch statistics. This patch deactivates the statistics, adds a missing lock initialization and fixes a waring. Signed-off-by: Hauke Mehrtens <[email protected]> Modified: trunk/target/linux/generic/files/drivers/net/phy/adm6996.c =================================================================== --- trunk/target/linux/generic/files/drivers/net/phy/adm6996.c 2014-07-04 12:11:40 UTC (rev 41510) +++ trunk/target/linux/generic/files/drivers/net/phy/adm6996.c 2014-07-05 12:13:56 UTC (rev 41511) @@ -804,7 +804,6 @@ struct adm6996_priv *priv = to_adm(dev); u16 reg = 0; - u32 speed; if (port >= ADM_NUM_PORTS) return -EINVAL; @@ -938,7 +937,7 @@ }, }; -static const struct switch_dev_ops adm6996_ops = { +static struct switch_dev_ops adm6996_ops = { .attr_global = { .attr = adm6996_globals, .n_attr = ARRAY_SIZE(adm6996_globals), @@ -992,6 +991,13 @@ swdev->ops = &adm6996_ops; swdev->alias = alias; + /* The ADM6996L connected through GPIOs does not support any switch + status calls */ + if (priv->model == ADM6996L) { + adm6996_ops.attr_port.n_attr = 0; + adm6996_ops.get_port_link = NULL; + } + pr_info ("%s: %s model PHY found.\n", alias, swdev->name); mutex_lock(&priv->reg_mutex); @@ -1121,6 +1127,7 @@ return -ENOMEM; mutex_init(&priv->reg_mutex); + mutex_init(&priv->mib_lock); priv->eecs = pdata->eecs; priv->eedi = pdata->eedi; _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
