usb ethernet driver question
    Alexander Samarin 
    sasha.devel at gmail.com
       
    Sun Nov 22 20:09:05 UTC 2009
    
    
  
Hello, all!
I'm trying to write a kernel module driver for WiMAX modem.
I have Samsung SWC-U100 USB modem.
Driver is based on if_cue module (it's source file is smallest in the tree).
I've get module successfully attaching to device and registering new network 
interface, but some questions appeared:
1. madwimax project have a description of protocol of the modem, but it says
    simply "This data should be sent over OUT endpoint in bulk mode."
    In other drivers I found only calls to functionu ether_do_request() e.g:
       struct usb_device_request req;
       req.bmRequestType = UT_READ_VENDOR_DEVICE;
       req.bRequest = CUE_CMD_GET_MACADDR;
       USETW(req.wValue, 0);
       USETW(req.wIndex, 0);
       USETW(req.wLength, ETHER_ADDR_LEN);
       uether_do_request(&sc->sc_ue, &req, buf, 1000);
    Here I can't understand:
    Buffer can be sent or received via buf argument of ether_do_request(), but
    what value should be used for req.bRequest, req.wValue and req.wIndex fields?
    In dev/usb/net/if_* files drivers read and write to registers or memory of
    chip; libusb just writes to file descriptor.
    Can anyone take me a link where I can read more about programming usb
    drivers for kernel?
2. Is it possible to detach CAM subsystem from virtual DVD-ROM on other
    interface? This DVD-ROM contains WinXP drivers and access program, which
    will never be used (I think) on UNIX systems.
PS: I know that if_cue is an ethernet driver, but WiMAX is a wireless so basing
    driver on if_cue code is not a good idea, but wireless drivers are big and
    my modem can connect only to one provider (Yota) so I decided to use if_cue
    as base code.
PS2: sorry for my English.
-- 
Best regards,  Alexander Samarin
     mailto:sasha at enikasoft.ru
     https://www.fsora.ru (waits for FreeBSD 8.0-RELEASE)
    
    
More information about the freebsd-usb
mailing list