diff options
author | Filip Aben <f.aben@option.com> | 2010-11-25 04:40:50 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-28 20:46:44 +0100 |
commit | 8e65c0ece6f2aa732f9b755331869c67aeb1c7f6 (patch) | |
tree | eb7a5c26bfc87ed661fe42b35fcfb31356915682 /drivers/net/usb | |
parent | NET: wan/x25_asy, move lapb_unregister to x25_asy_close_tty (diff) | |
download | linux-8e65c0ece6f2aa732f9b755331869c67aeb1c7f6.tar.xz linux-8e65c0ece6f2aa732f9b755331869c67aeb1c7f6.zip |
hso: fix disable_net
The HSO driver incorrectly creates a serial device instead of a net
device when disable_net is set. It shouldn't create anything for the
network interface.
Signed-off-by: Filip Aben <f.aben@option.com>
Reported-by: Piotr Isajew <pki@ex.com.pl>
Reported-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/hso.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index b154a94de03e..62e9e8dc8190 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -2994,12 +2994,14 @@ static int hso_probe(struct usb_interface *interface, case HSO_INTF_BULK: /* It's a regular bulk interface */ - if (((port_spec & HSO_PORT_MASK) == HSO_PORT_NETWORK) && - !disable_net) - hso_dev = hso_create_net_device(interface, port_spec); - else + if ((port_spec & HSO_PORT_MASK) == HSO_PORT_NETWORK) { + if (!disable_net) + hso_dev = + hso_create_net_device(interface, port_spec); + } else { hso_dev = hso_create_bulk_serial_device(interface, port_spec); + } if (!hso_dev) goto exit; break; |