Skip to content

Commit

Permalink
hso: fix disable_net
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Filip Aben authored and David S. Miller committed Nov 28, 2010
1 parent 03fe5f3 commit 8e65c0e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/net/usb/hso.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8e65c0e

Please sign in to comment.