aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-03-05 20:25:18 +0000
committerJohn Crispin <blogic@openwrt.org>2015-03-05 20:25:18 +0000
commit68e0affb9a8bcf0ba1ad884ba4cae2ead766dc7c (patch)
treee9852936f81d55a3ef948c476e7fc3b83688a3d0 /package/kernel/lantiq
parent9a1263b1b939ba1f6dedc2d31aeea2b1330df451 (diff)
downloadmaster-187ad058-68e0affb9a8bcf0ba1ad884ba4cae2ead766dc7c.tar.gz
master-187ad058-68e0affb9a8bcf0ba1ad884ba4cae2ead766dc7c.tar.bz2
master-187ad058-68e0affb9a8bcf0ba1ad884ba4cae2ead766dc7c.zip
lantiq: fix netdev setup in ltq-ptm-vdsl
The initial fix for 3.18 in r44346 wrongly treated the newly added parameter of alloc_netdev to be another function pointer, causing ether_config to be skipped during ptm netdev init. Fix this by partially reverting r44346 and properly setting the newly added macro parameter. (Tested on VRX200 board) A similar change might be needed for ltq-ptm-adsl as well. Signed-off-by: Daniel Golle <daniel@makrotopia.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44607 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/lantiq')
-rw-r--r--package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
index 9c25c154b5..b328261c5f 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
@@ -66,7 +66,7 @@ unsigned long cgu_get_pp32_clock(void)
return rate;
}
-static void ptm_setup(struct net_device *);
+static void ptm_setup(struct net_device *, int);
static struct net_device_stats *ptm_get_stats(struct net_device *);
static int ptm_open(struct net_device *);
static int ptm_stop(struct net_device *);
@@ -134,9 +134,8 @@ unsigned int ifx_ptm_dbg_enable = DBG_ENABLE_MASK_ERR;
* ####################################
*/
-static void ptm_setup(struct net_device *dev)
+static void ptm_setup(struct net_device *dev, int ndev)
{
- int ndev = 0;
dev->netdev_ops = &g_ptm_netdev_ops;
netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16);
dev->watchdog_timeo = ETH_WATCHDOG_TIMEOUT;
@@ -952,9 +951,10 @@ static int ifx_ptm_init(void)
}
for ( i = 0; i < ARRAY_SIZE(g_net_dev); i++ ) {
- g_net_dev[i] = alloc_netdev(0, g_net_dev_name[i], ether_setup, ptm_setup);
+ g_net_dev[i] = alloc_netdev(0, g_net_dev_name[i], NET_NAME_UNKNOWN, ether_setup);
if ( g_net_dev[i] == NULL )
goto ALLOC_NETDEV_FAIL;
+ ptm_setup(g_net_dev[i], i);
}
for ( i = 0; i < ARRAY_SIZE(g_net_dev); i++ ) {