diff options
Diffstat (limited to 'drivers/net/usb/cdc_ether.c')
| -rw-r--r-- | drivers/net/usb/cdc_ether.c | 35 | 
1 files changed, 32 insertions, 3 deletions
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 2023f3ea891..2a32d9167d3 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c @@ -14,15 +14,13 @@   * GNU General Public License for more details.   *   * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA + * along with this program; if not, see <http://www.gnu.org/licenses/>.   */  // #define	DEBUG			// error path messages, extra info  // #define	VERBOSE			// more; success messages  #include <linux/module.h> -#include <linux/init.h>  #include <linux/netdevice.h>  #include <linux/etherdevice.h>  #include <linux/ethtool.h> @@ -343,6 +341,22 @@ next_desc:  		usb_driver_release_interface(driver, info->data);  		return -ENODEV;  	} + +	/* Some devices don't initialise properly. In particular +	 * the packet filter is not reset. There are devices that +	 * don't do reset all the way. So the packet filter should +	 * be set to a sane initial value. +	 */ +	usb_control_msg(dev->udev, +			usb_sndctrlpipe(dev->udev, 0), +			USB_CDC_SET_ETHERNET_PACKET_FILTER, +			USB_TYPE_CLASS | USB_RECIP_INTERFACE, +			USB_CDC_PACKET_TYPE_ALL_MULTICAST | USB_CDC_PACKET_TYPE_DIRECTED | USB_CDC_PACKET_TYPE_BROADCAST, +			intf->cur_altsetting->desc.bInterfaceNumber, +			NULL, +			0, +			USB_CTRL_SET_TIMEOUT +		);  	return 0;  bad_desc: @@ -487,6 +501,7 @@ static const struct driver_info wwan_info = {  #define ZTE_VENDOR_ID		0x19D2  #define DELL_VENDOR_ID		0x413C  #define REALTEK_VENDOR_ID	0x0bda +#define SAMSUNG_VENDOR_ID	0x04e8  static const struct usb_device_id	products[] = {  /* BLACKLIST !! @@ -626,6 +641,13 @@ static const struct usb_device_id	products[] = {  	.driver_info = 0,  }, +/* Novatel Expedite E371 - handled by qmi_wwan */ +{ +	USB_DEVICE_AND_INTERFACE_INFO(NOVATEL_VENDOR_ID, 0x9011, USB_CLASS_COMM, +			USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), +	.driver_info = 0, +}, +  /* AnyDATA ADU960S - handled by qmi_wwan */  {  	USB_DEVICE_AND_INTERFACE_INFO(0x16d5, 0x650a, USB_CLASS_COMM, @@ -653,6 +675,13 @@ static const struct usb_device_id	products[] = {  	.driver_info = 0,  }, +/* Samsung USB Ethernet Adapters */ +{ +	USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, 0xa101, USB_CLASS_COMM, +			USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), +	.driver_info = 0, +}, +  /* WHITELIST!!!   *   * CDC Ether uses two interfaces, not necessarily consecutive.  | 
