Changeset 44607


Ignore:
Timestamp:
2015-03-05T21:25:18+01:00 (3 years ago)
Author:
blogic
Message:

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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c

    r44346 r44607  
    6767} 
    6868 
    69 static void ptm_setup(struct net_device *); 
     69static void ptm_setup(struct net_device *, int); 
    7070static struct net_device_stats *ptm_get_stats(struct net_device *); 
    7171static int ptm_open(struct net_device *); 
     
    135135 */ 
    136136 
    137 static void ptm_setup(struct net_device *dev) 
    138 { 
    139     int ndev = 0; 
     137static void ptm_setup(struct net_device *dev, int ndev) 
     138{ 
    140139    dev->netdev_ops      = &g_ptm_netdev_ops; 
    141140    netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16); 
     
    953952 
    954953    for ( i = 0; i < ARRAY_SIZE(g_net_dev); i++ ) { 
    955         g_net_dev[i] = alloc_netdev(0, g_net_dev_name[i], ether_setup, ptm_setup); 
     954        g_net_dev[i] = alloc_netdev(0, g_net_dev_name[i], NET_NAME_UNKNOWN, ether_setup); 
    956955        if ( g_net_dev[i] == NULL ) 
    957956            goto ALLOC_NETDEV_FAIL; 
     957        ptm_setup(g_net_dev[i], i); 
    958958    } 
    959959 
Note: See TracChangeset for help on using the changeset viewer.