Skip to content

Commit

Permalink
usb/atm/speedtch.c: call atm_dev_signal_change() when signal changes.
Browse files Browse the repository at this point in the history
Propagate signal changes to upper atm layer.

Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Karl Hiramoto authored and David S. Miller committed Jul 9, 2010
1 parent 676f3d2 commit 23f89f0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/usb/atm/speedtch.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,20 +525,20 @@ static void speedtch_check_status(struct work_struct *work)

switch (status) {
case 0:
atm_dev->signal = ATM_PHY_SIG_LOST;
atm_dev_signal_change(atm_dev, ATM_PHY_SIG_LOST);
if (instance->last_status)
atm_info(usbatm, "ADSL line is down\n");
/* It may never resync again unless we ask it to... */
ret = speedtch_start_synchro(instance);
break;

case 0x08:
atm_dev->signal = ATM_PHY_SIG_UNKNOWN;
atm_dev_signal_change(atm_dev, ATM_PHY_SIG_UNKNOWN);
atm_info(usbatm, "ADSL line is blocked?\n");
break;

case 0x10:
atm_dev->signal = ATM_PHY_SIG_LOST;
atm_dev_signal_change(atm_dev, ATM_PHY_SIG_LOST);
atm_info(usbatm, "ADSL line is synchronising\n");
break;

Expand All @@ -554,15 +554,15 @@ static void speedtch_check_status(struct work_struct *work)
}

atm_dev->link_rate = down_speed * 1000 / 424;
atm_dev->signal = ATM_PHY_SIG_FOUND;
atm_dev_signal_change(atm_dev, ATM_PHY_SIG_FOUND);

atm_info(usbatm,
"ADSL line is up (%d kb/s down | %d kb/s up)\n",
down_speed, up_speed);
break;

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", status);
break;
}
Expand Down

0 comments on commit 23f89f0

Please sign in to comment.