Subject: searching users of if_cdce
To: NetBSD Current Users <current-users@netbsd.org>
From: Barry Bouwsma <freebsd-misuser@remove-NOSPAM-to-reply.NOSPAM.dyndns.dk>
List: current-users
Date: 01/01/2005 09:46:36
Greetings.

Is anyone out there using if_cdce for anything in NetBSD?

The source is from OpenBSD, and seems intended mostly for PDAs.
I've taken it, adapted it for FreeBSD to try and use with a
CDC Ethernet DOCSIS Cabal modem unit, and then tried to merge
in the fixes from that, into my NetBSD source, to be able to
talk to the modem over USB.

One of my hacks is almost certainly clearly wrong for the PDA
case where the current code may work, but one other is unclear
to me if it will break cases that work today:

@@ -268,7 +248,8 @@
        }
 
        ue = (usb_cdc_ethernet_descriptor_t *)usb_find_desc(dev,
-            UDESC_INTERFACE, UDESCSUB_CDC_ENF);
+/* XXX ?            UDESC_INTERFACE, UDESCSUB_CDC_ENF); */
+            UDESC_CS_INTERFACE, UDESCSUB_CDC_ENF);
 eaddr_str)) { */
        if (!ue || usbd_get_string(dev, ue->iMacAddress, eaddr_str)) {
                printf("%s: faking address\n", USBDEVNAME(sc->cdce_dev));
                eaddr[0]= 0x2a;


Only with this can I snarf the MAC address from the modem properly.

If someone out there has a device which uses cdce, can you tell me
if the above change breaks your device, or if it still works as
expected?  Thanks.


I'm still not able to get the modem to recognize I'm actually trying
to talk to it, in both NetBSD and FreeBSD, so I'm not sure if the
modem is at fault, or if it's something that may be correct in Linux.
I can hear what's coming in, and it looks as if I'm sending things
out, but get no response from them.  Have not yet verified with Linux.


thanks
barry bouwsma