Re: Convert urb to skbuff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 29, 2010 at 05:43:13PM +0530, Bond wrote:
> On Mon, Nov 29, 2010 at 5:17 PM, sugnan prabhu <sugnan.prabhu@xxxxxxxxx> wrote:
> >
> > Hello,
> >       I am trying to write a kernel module which is the combination of the
> > usb driver and a network driver, now whenever the data is recieved by the
> > usb driver it will be in struct urb, but the data that is required by the
> > net driver is sk_buff, now how do i convert a urb to sk_buff,
> My reply is not a direct answer of your question but it might help you
> to understand.
> In USB driver the read and write is done via making calls to file
> operations which are same for character drivers.
> I.e. the USB end points is some thing you need to understand.
> For a USB driver the device will be reading and writing to the endpoints.
> Hence you need to have  char driver which can create all this for you.

Bond, no, that is totally and completely wrong.

Sugnan, just take the buffer passed back to you from your urb and put it
into a sk_buff.  Look at the existing usb network drivers for examples.

good luck,

greg k-h

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux