forked from Minki/linux
usb/atm/cxacru.c: call atm_dev_signal_change() when signal changes.
Propagate signal changes to upper atm layer. Signed-off-by: Karl Hiramoto <karl@hiramoto.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e0b901a953
commit
676f3d2686
@ -866,50 +866,50 @@ static void cxacru_poll_status(struct work_struct *work)
|
|||||||
instance->line_status = buf[CXINF_LINE_STATUS];
|
instance->line_status = buf[CXINF_LINE_STATUS];
|
||||||
switch (instance->line_status) {
|
switch (instance->line_status) {
|
||||||
case 0:
|
case 0:
|
||||||
atm_dev->signal = ATM_PHY_SIG_LOST;
|
atm_dev_signal_change(atm_dev, ATM_PHY_SIG_LOST);
|
||||||
atm_info(usbatm, "ADSL line: down\n");
|
atm_info(usbatm, "ADSL line: down\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
atm_dev->signal = ATM_PHY_SIG_LOST;
|
atm_dev_signal_change(atm_dev, ATM_PHY_SIG_LOST);
|
||||||
atm_info(usbatm, "ADSL line: attempting to activate\n");
|
atm_info(usbatm, "ADSL line: attempting to activate\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
atm_dev->signal = ATM_PHY_SIG_LOST;
|
atm_dev_signal_change(atm_dev, ATM_PHY_SIG_LOST);
|
||||||
atm_info(usbatm, "ADSL line: training\n");
|
atm_info(usbatm, "ADSL line: training\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
atm_dev->signal = ATM_PHY_SIG_LOST;
|
atm_dev_signal_change(atm_dev, ATM_PHY_SIG_LOST);
|
||||||
atm_info(usbatm, "ADSL line: channel analysis\n");
|
atm_info(usbatm, "ADSL line: channel analysis\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
atm_dev->signal = ATM_PHY_SIG_LOST;
|
atm_dev_signal_change(atm_dev, ATM_PHY_SIG_LOST);
|
||||||
atm_info(usbatm, "ADSL line: exchange\n");
|
atm_info(usbatm, "ADSL line: exchange\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
atm_dev->link_rate = buf[CXINF_DOWNSTREAM_RATE] * 1000 / 424;
|
atm_dev->link_rate = buf[CXINF_DOWNSTREAM_RATE] * 1000 / 424;
|
||||||
atm_dev->signal = ATM_PHY_SIG_FOUND;
|
atm_dev_signal_change(atm_dev, ATM_PHY_SIG_FOUND);
|
||||||
|
|
||||||
atm_info(usbatm, "ADSL line: up (%d kb/s down | %d kb/s up)\n",
|
atm_info(usbatm, "ADSL line: up (%d kb/s down | %d kb/s up)\n",
|
||||||
buf[CXINF_DOWNSTREAM_RATE], buf[CXINF_UPSTREAM_RATE]);
|
buf[CXINF_DOWNSTREAM_RATE], buf[CXINF_UPSTREAM_RATE]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
atm_dev->signal = ATM_PHY_SIG_LOST;
|
atm_dev_signal_change(atm_dev, ATM_PHY_SIG_LOST);
|
||||||
atm_info(usbatm, "ADSL line: waiting\n");
|
atm_info(usbatm, "ADSL line: waiting\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
atm_dev->signal = ATM_PHY_SIG_LOST;
|
atm_dev_signal_change(atm_dev, ATM_PHY_SIG_LOST);
|
||||||
atm_info(usbatm, "ADSL line: initializing\n");
|
atm_info(usbatm, "ADSL line: initializing\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
atm_dev->signal = ATM_PHY_SIG_UNKNOWN;
|
atm_dev_signal_change(atm_dev, ATM_PHY_SIG_UNKNOWN);
|
||||||
atm_info(usbatm, "Unknown line state %02x\n", instance->line_status);
|
atm_info(usbatm, "Unknown line state %02x\n", instance->line_status);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user