lantiq: fix dsl drivers for 3.18

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44346
This commit is contained in:
John Crispin 2015-02-09 12:12:52 +00:00
parent 682cf3b854
commit 64f9626963
3 changed files with 18 additions and 5 deletions

View File

@ -109,7 +109,7 @@ typedef enum {
/* wait for an event, timeout is measured in ms */
#define MEI_WAIT_EVENT_TIMEOUT(ev,timeout)\
interruptible_sleep_on_timeout(&ev,timeout * HZ / 1000)
wait_event_interruptible_timeout(ev,0 == 1, timeout * HZ / 1000)
#define MEI_WAKEUP_EVENT(ev)\
wake_up_interruptible(&ev)
#endif /* IFX_MEI_BSP */

View File

@ -0,0 +1,13 @@
Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h
===================================================================
--- drv_dsl_cpe_api-3.24.4.4.orig/src/include/drv_dsl_cpe_os_linux.h 2015-02-08 09:59:02.424259834 +0100
+++ drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h 2015-02-08 10:02:19.580740173 +0100
@@ -218,7 +218,7 @@
#define DSL_DRV_WAKEUP_WAKELIST(queue) wake_up_interruptible(&(queue))
#define DSL_DRV_INIT_EVENT(name,ev) init_waitqueue_head(&(ev))
/* wait for an event, timeout is measured in ms */
-#define DSL_DRV_WAIT_EVENT_TIMEOUT(ev,t) interruptible_sleep_on_timeout(&(ev), (t) * HZ / 1000)
+#define DSL_DRV_WAIT_EVENT_TIMEOUT(ev,t) wait_event_interruptible_timeout((ev), 0 == 1, (t) * HZ / 1000)
#define DSL_DRV_WAIT_EVENT(ev) interruptible_sleep_on(&(ev))
#define DSL_DRV_WAKEUP_EVENT(ev) wake_up_interruptible(&(ev))
#define DSL_DRV_TimeMSecGet() DSL_DRV_ElapsedTimeMSecGet(0)

View File

@ -66,7 +66,7 @@ unsigned long cgu_get_pp32_clock(void)
return rate;
}
static void ptm_setup(struct net_device *, int);
static void ptm_setup(struct net_device *);
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,8 +134,9 @@ unsigned int ifx_ptm_dbg_enable = DBG_ENABLE_MASK_ERR;
* ####################################
*/
static void ptm_setup(struct net_device *dev, int ndev)
static void ptm_setup(struct net_device *dev)
{
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;
@ -951,10 +952,9 @@ 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);
g_net_dev[i] = alloc_netdev(0, g_net_dev_name[i], ether_setup, ptm_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++ ) {