FreeBSD/sys/dev/usb/net/uhso.c
/*
 * Returns the capabilities of interfaces for devices that don't
 * support the automatic query.
 * Returns a bit mask with the interface capabilities.
 */
Returns the capabilities of interfaces for devices that don't
support the automatic query.
Returns a bit mask with the interface capabilities.
Returns the capabilities of interfaces for devices that don ' t support the automatic query . Returns a bit mask with the interface capabilities .
static int
uhso_probe_iface_static(struct usb_device *udev, int index)
{
	struct usb_config_descriptor *cd;
	cd = usbd_get_config_descriptor(udev);
	if (cd->bNumInterface <= 3) {
		switch (index) {
		case 0:
			return UHSO_IFACE_SPEC(UHSO_IF_NET | UHSO_IF_MUX,
			    UHSO_PORT_SERIAL | UHSO_PORT_NETWORK,
			    UHSO_PORT_TYPE_NETWORK);
		case 1:
			return UHSO_IFACE_SPEC(UHSO_IF_BULK,
			    UHSO_PORT_SERIAL, UHSO_PORT_TYPE_DIAG);
		case 2:
			return UHSO_IFACE_SPEC(UHSO_IF_BULK,
			    UHSO_PORT_SERIAL, UHSO_PORT_TYPE_MODEM);
		}
	} else {
		switch (index) {
		case 0:
			return UHSO_IFACE_SPEC(UHSO_IF_NET | UHSO_IF_MUX,
			    UHSO_PORT_SERIAL | UHSO_PORT_NETWORK,
			    UHSO_PORT_TYPE_NETWORK);
		case 1:
			return UHSO_IFACE_SPEC(UHSO_IF_BULK,
			    UHSO_PORT_SERIAL, UHSO_PORT_TYPE_DIAG2);
		case 2:
			return UHSO_IFACE_SPEC(UHSO_IF_BULK,
			    UHSO_PORT_SERIAL, UHSO_PORT_TYPE_MODEM);
		case 3:
			return UHSO_IFACE_SPEC(UHSO_IF_BULK,
			    UHSO_PORT_SERIAL, UHSO_PORT_TYPE_DIAG);
		}
	}
	return (0);
}
static int uhso_probe_iface_static ( struct usb_device * udev , int index ) { struct usb_config_descriptor * cd ; cd = usbd_get_config_descriptor ( udev ) ; if ( cd -> bNumInterface <= 3 ) { switch ( index ) { case 0 : return UHSO_IFACE_SPEC ( UHSO_IF_NET | UHSO_IF_MUX , UHSO_PORT_SERIAL | UHSO_PORT_NETWORK , UHSO_PORT_TYPE_NETWORK ) ; case 1 : return UHSO_IFACE_SPEC ( UHSO_IF_BULK , UHSO_PORT_SERIAL , UHSO_PORT_TYPE_DIAG ) ; case 2 : return UHSO_IFACE_SPEC ( UHSO_IF_BULK , UHSO_PORT_SERIAL , UHSO_PORT_TYPE_MODEM ) ; } } else { switch ( index ) { case 0 : return UHSO_IFACE_SPEC ( UHSO_IF_NET | UHSO_IF_MUX , UHSO_PORT_SERIAL | UHSO_PORT_NETWORK , UHSO_PORT_TYPE_NETWORK ) ; case 1 : return UHSO_IFACE_SPEC ( UHSO_IF_BULK , UHSO_PORT_SERIAL , UHSO_PORT_TYPE_DIAG2 ) ; case 2 : return UHSO_IFACE_SPEC ( UHSO_IF_BULK , UHSO_PORT_SERIAL , UHSO_PORT_TYPE_MODEM ) ; case 3 : return UHSO_IFACE_SPEC ( UHSO_IF_BULK , UHSO_PORT_SERIAL , UHSO_PORT_TYPE_DIAG ) ; } } return ( 0 ) ; }
Returns the capabilities of interfaces for devices that don't
 support the automatic query.
Returns the capabilities of interfaces for devices that don ' t support the automatic query .
/* Cards with 3 or less interfaces */ /* Cards with 4 interfaces */