diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2008-06-19 18:19:16 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 15:16:10 -0700 |
commit | 15b2d2b529d11449910ac86f6093124bce8f6103 (patch) | |
tree | f8c153f86a19354e789c16af277dff2b68779f94 /drivers/usb/gadget/rndis.h | |
parent | 7bb5ea54be47584869b9a748696e06788c55e28f (diff) | |
download | linux-15b2d2b529d11449910ac86f6093124bce8f6103.tar.bz2 |
usb gadget: RNDIS cleanups
Some cleanup to the RNDIS code:
- Minor bugfix: rndis_unit() is supposed to put the link into the
RNDIS_UNINITIALIZED state, which does not mean "unused". There's
a separate method to stop using the link. (Bug doesn't affect
anything right now because of how the code is used.)
- Reduce coupling between RNDIS code and its user(s), in preparation
for updates in that code:
* Decouple RNDIS_RESPONSE_AVAILABLE notifications from net_device
by passing just a void* handle. (Also, remove the unused return
value of the notification callback.)
* When it needs a copy of net_device stats, just ask for it
- Remove unused/untested code backing various never-used OIDs:
* RNDIS_PM, RNDIS_WAKEUP ... "should" get implemented, but the
relevant docs were unclear, ambguous, and incomplete. Someone
with access to the Hidden Gospels (maybe in the EU?) might be
able to figure out what this should do.
* RNDIS_OPTIONAL_STATS ... as the name suggests, optional. Never
implemented in part because not all the semantics were clear.
* OID_GEN_RNDIS_CONFIG_PARAMETER, which has been #if 0 forever.
- A few small whitespace fixes
Plus switch the VERBOSE symbol over to the newer VERBOSE_DEBUG style.
There should be no functional changes because of this patch; it's a
net source code shrink (because of the dead/unused code removal) and
a small object code shrink (a couple hundred bytes on ARMv5).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/rndis.h')
-rw-r--r-- | drivers/usb/gadget/rndis.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/gadget/rndis.h b/drivers/usb/gadget/rndis.h index b917b4f34ea8..aac61dfe0f03 100644 --- a/drivers/usb/gadget/rndis.h +++ b/drivers/usb/gadget/rndis.h @@ -233,20 +233,19 @@ typedef struct rndis_params const u8 *host_mac; u16 *filter; struct net_device *dev; - struct net_device_stats *stats; u32 vendorID; const char *vendorDescr; - int (*ack) (struct net_device *); + void (*resp_avail)(void *v); + void *v; struct list_head resp_queue; } rndis_params; /* RNDIS Message parser and other useless functions */ int rndis_msg_parser (u8 configNr, u8 *buf); -int rndis_register (int (*rndis_control_ack) (struct net_device *)); +int rndis_register(void (*resp_avail)(void *v), void *v); void rndis_deregister (int configNr); int rndis_set_param_dev (u8 configNr, struct net_device *dev, - struct net_device_stats *stats, u16 *cdc_filter); int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr); |