]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] USB: usbnet (1/9) clean up framing
authorDavid Brownell <david-b@pacbell.net>
Wed, 31 Aug 2005 16:52:31 +0000 (09:52 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Sep 2005 23:28:30 +0000 (16:28 -0700)
commit53d771fc9045374b0cfc5e5ebe1e35532414b933
treeef2798f4b6581926082b88a8cd6cdecbd11ac39e
parentd2e753904a49cbef6934213db4e7709fad237151
[PATCH] USB: usbnet (1/9) clean up framing

This starts to prepare the core of "usbnet" to know less about various
framing protocols that map Ethernet packets onto USB, so "minidrivers"
can be modules that just plug into the core.

  - Remove some framing-specific code that cluttered the core:

      * net->hard_header_len records how much space to preallocate;
        now drivers that add their own framing (Net1080, GeneLink,
Zaurus, and RNDIS) will have smoother TX paths.  Even for
the drivers (Zaurus, Net1080) that need trailers.

      * defines new dev->hard_mtu, using this "hardware" limit to
        check changes to the link's settable "software" mtu.

      * now net->hard_header_len and dev->hard_mtu are set up in the
        driver bind() routines, if needed.

  - Transaction ID is no longer specific to the Net1080 framing;
    RNDIS needs one too.

  - Creates a new "usbnet.h" header with declarations that are shared
    between the core and what will be separate modules.

  - Plus a couple other minor tweaks, like recognizing -ESHUTDOWN
    means the keventd work should just shut itself down asap.

The core code is only about 1/3 of this large file.  Splitting out the
minidrivers into separate modules (e.g. ones for ASIX adapters,
Zaurii and similar, CDC Ethernet, etc), in later patches, will
improve maintainability and shrink typical runtime footprints.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/net/Kconfig
drivers/usb/net/usbnet.c
drivers/usb/net/usbnet.h [new file with mode: 0644]