[PATCH] hso: fix disable_net

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Filip Aben
Date: Wednesday, November 24, 2010 - 12:35 pm

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>
---

diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index b154a94..b05c235 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -2994,10 +2994,10 @@ 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)
+		if ((port_spec & HSO_PORT_MASK) == HSO_PORT_NETWORK) { 
+		    if(!disable_net)
 			hso_dev = hso_create_net_device(interface, port_spec);
-		else
+		} else
 			hso_dev =
 			    hso_create_bulk_serial_device(interface, port_spec);
 		if (!hso_dev)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] hso: fix disable_net, Filip Aben, (Wed Nov 24, 12:35 pm)
Re: [PATCH] hso: fix disable_net, Sergei Shtylyov, (Thu Nov 25, 5:16 am)
Re: [PATCH] hso: fix disable_net, Sergei Shtylyov, (Thu Nov 25, 5:17 am)
Re: [PATCH] hso: fix disable_net, Johan Hovold, (Thu Nov 25, 5:52 am)