diff options
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/Kconfig | 4 | ||||
-rw-r--r-- | drivers/net/usb/hso.c | 32 |
2 files changed, 17 insertions, 19 deletions
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index ef976215b649..bd33153261ce 100644 --- a/drivers/net/usb/Kconfig +++ b/drivers/net/usb/Kconfig | |||
@@ -445,7 +445,7 @@ config USB_NET_QMI_WWAN | |||
445 | 445 | ||
446 | config USB_HSO | 446 | config USB_HSO |
447 | tristate "Option USB High Speed Mobile Devices" | 447 | tristate "Option USB High Speed Mobile Devices" |
448 | depends on USB && RFKILL | 448 | depends on USB && RFKILL && TTY |
449 | default n | 449 | default n |
450 | help | 450 | help |
451 | Choose this option if you have an Option HSDPA/HSUPA card. | 451 | Choose this option if you have an Option HSDPA/HSUPA card. |
@@ -493,7 +493,7 @@ config USB_SIERRA_NET | |||
493 | 493 | ||
494 | config USB_VL600 | 494 | config USB_VL600 |
495 | tristate "LG VL600 modem dongle" | 495 | tristate "LG VL600 modem dongle" |
496 | depends on USB_NET_CDCETHER | 496 | depends on USB_NET_CDCETHER && TTY |
497 | select USB_ACM | 497 | select USB_ACM |
498 | help | 498 | help |
499 | Select this if you want to use an LG Electronics 4G/LTE usb modem | 499 | Select this if you want to use an LG Electronics 4G/LTE usb modem |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index cd8ccb240f4b..f902a14da88c 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -2035,25 +2035,23 @@ static int put_rxbuf_data(struct urb *urb, struct hso_serial *serial) | |||
2035 | tty = tty_port_tty_get(&serial->port); | 2035 | tty = tty_port_tty_get(&serial->port); |
2036 | 2036 | ||
2037 | /* Push data to tty */ | 2037 | /* Push data to tty */ |
2038 | if (tty) { | 2038 | write_length_remaining = urb->actual_length - |
2039 | write_length_remaining = urb->actual_length - | 2039 | serial->curr_rx_urb_offset; |
2040 | serial->curr_rx_urb_offset; | 2040 | D1("data to push to tty"); |
2041 | D1("data to push to tty"); | 2041 | while (write_length_remaining) { |
2042 | while (write_length_remaining) { | 2042 | if (tty && test_bit(TTY_THROTTLED, &tty->flags)) { |
2043 | if (test_bit(TTY_THROTTLED, &tty->flags)) { | 2043 | tty_kref_put(tty); |
2044 | tty_kref_put(tty); | 2044 | return -1; |
2045 | return -1; | ||
2046 | } | ||
2047 | curr_write_len = tty_insert_flip_string | ||
2048 | (tty, urb->transfer_buffer + | ||
2049 | serial->curr_rx_urb_offset, | ||
2050 | write_length_remaining); | ||
2051 | serial->curr_rx_urb_offset += curr_write_len; | ||
2052 | write_length_remaining -= curr_write_len; | ||
2053 | tty_flip_buffer_push(tty); | ||
2054 | } | 2045 | } |
2055 | tty_kref_put(tty); | 2046 | curr_write_len = tty_insert_flip_string(&serial->port, |
2047 | urb->transfer_buffer + serial->curr_rx_urb_offset, | ||
2048 | write_length_remaining); | ||
2049 | serial->curr_rx_urb_offset += curr_write_len; | ||
2050 | write_length_remaining -= curr_write_len; | ||
2051 | tty_flip_buffer_push(&serial->port); | ||
2056 | } | 2052 | } |
2053 | tty_kref_put(tty); | ||
2054 | |||
2057 | if (write_length_remaining == 0) { | 2055 | if (write_length_remaining == 0) { |
2058 | serial->curr_rx_urb_offset = 0; | 2056 | serial->curr_rx_urb_offset = 0; |
2059 | serial->rx_urb_filled[hso_urb_to_index(serial, urb)] = 0; | 2057 | serial->rx_urb_filled[hso_urb_to_index(serial, urb)] = 0; |