aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-12-17 09:28:10 +0000
committerJohn Crispin <blogic@openwrt.org>2015-12-17 09:28:10 +0000
commit942bdffc7cf5afb7f660d37b11d2fcd096ba4f88 (patch)
tree8369614c9ec9d3e7edac8da591ddfb5f7b639d64 /package/kernel/lantiq
parent730bb9fac70529f0bf3cfc2b9dd3f3bc649b212f (diff)
downloadmaster-187ad058-942bdffc7cf5afb7f660d37b11d2fcd096ba4f88.tar.gz
master-187ad058-942bdffc7cf5afb7f660d37b11d2fcd096ba4f88.tar.bz2
master-187ad058-942bdffc7cf5afb7f660d37b11d2fcd096ba4f88.zip
lantiq: ltq-atm: set carrier status
This prevents the unconditionally start of pppd since netifd will be triggered if the device goes into showtime. The same applies to lost showtime as well. In compare to the ptm driver, this changeset isn't strictly required, since the "not in showtime" message is limited to the debug loglevel. But it reduces the amount of ppp related messages significant. Signed-off-by: Mathias Kresin <openwrt@kresin.me> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47916 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/lantiq')
-rw-r--r--package/kernel/lantiq/ltq-atm/src/ltq_atm.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
index 658dfdc2c5..1208dd87dd 100644
--- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
+++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
@@ -1715,7 +1715,7 @@ static inline void init_tx_tables(void)
static int atm_showtime_enter(struct port_cell_info *port_cell, void *xdata_addr)
{
- int i, j;
+ int i, j, port_num;
ASSERT(port_cell != NULL, "port_cell is NULL");
ASSERT(xdata_addr != NULL, "xdata_addr is NULL");
@@ -1738,6 +1738,9 @@ static int atm_showtime_enter(struct port_cell_info *port_cell, void *xdata_addr
g_showtime = 1;
+ for ( port_num = 0; port_num < ATM_PORT_NUMBER; port_num++ )
+ atm_dev_signal_change(g_atm_priv_data.port[port_num].dev, ATM_PHY_SIG_FOUND);
+
#if defined(CONFIG_VR9)
IFX_REG_W32(0x0F, UTP_CFG);
#endif
@@ -1752,12 +1755,18 @@ static int atm_showtime_enter(struct port_cell_info *port_cell, void *xdata_addr
static int atm_showtime_exit(void)
{
+ int port_num;
+
if ( !g_showtime )
return -1;
#if defined(CONFIG_VR9)
IFX_REG_W32(0x00, UTP_CFG);
#endif
+
+ for ( port_num = 0; port_num < ATM_PORT_NUMBER; port_num++ )
+ atm_dev_signal_change(g_atm_priv_data.port[port_num].dev, ATM_PHY_SIG_LOST);
+
g_showtime = 0;
g_xdata_addr = NULL;
printk("leave showtime\n");
@@ -1824,6 +1833,10 @@ static int ltq_atm_probe(struct platform_device *pdev)
g_atm_priv_data.port[port_num].dev->ci_range.vci_bits = 16;
g_atm_priv_data.port[port_num].dev->link_rate = g_atm_priv_data.port[port_num].tx_max_cell_rate;
g_atm_priv_data.port[port_num].dev->dev_data = (void*)port_num;
+
+#if defined(CONFIG_IFXMIPS_DSL_CPE_MEI) || defined(CONFIG_IFXMIPS_DSL_CPE_MEI_MODULE)
+ atm_dev_signal_change(g_atm_priv_data.port[port_num].dev, ATM_PHY_SIG_LOST);
+#endif
}
}