X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fusb%2Fgadget%2Frndis.h;h=aac61dfe0f034d170a74151bb1070b1260341fa4;hb=2ab61b01110aa04cd853c619a74881e3225a5e24;hp=95b4c63261000b15d8c0a0dff21aa48ab720232f;hpb=a8b3e6f10f08f66ae1072efd087b30966a3654f6;p=linux-2.6 diff --git a/drivers/usb/gadget/rndis.h b/drivers/usb/gadget/rndis.h index 95b4c63261..aac61dfe0f 100644 --- a/drivers/usb/gadget/rndis.h +++ b/drivers/usb/gadget/rndis.h @@ -1,15 +1,13 @@ -/* +/* * RNDIS Definitions for Remote NDIS - * - * Version: $Id: rndis.h,v 1.15 2004/03/25 21:33:46 robert Exp $ - * + * * Authors: Benedikt Spranger, Pengutronix - * Robert Schwebel, Pengutronix - * - * This program is free software; you can redistribute it and/or + * Robert Schwebel, Pengutronix + * + * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License - * version 2, as published by the Free Software Foundation. - * + * version 2, as published by the Free Software Foundation. + * * This software was originally developed in conformance with * Microsoft's Remote NDIS Specification License Agreement. */ @@ -34,7 +32,7 @@ #define RNDIS_STATUS_MEDIA_CONNECT 0x4001000BU /* Device connected */ #define RNDIS_STATUS_MEDIA_DISCONNECT 0x4001000CU /* Device disconnected */ /* For all not specified status messages: - * RNDIS_STATUS_Xxx -> NDIS_STATUS_Xxx + * RNDIS_STATUS_Xxx -> NDIS_STATUS_Xxx */ /* Message Set for Connectionless (802.3) Devices */ @@ -69,7 +67,7 @@ #define OID_PNP_ENABLE_WAKE_UP 0xFD010106 -typedef struct rndis_init_msg_type +typedef struct rndis_init_msg_type { __le32 MessageType; __le32 MessageLength; @@ -195,7 +193,7 @@ struct rndis_packet_msg_type __le32 PerPacketInfoLength; __le32 VcHandle; __le32 Reserved; -}; +} __attribute__ ((packed)); struct rndis_config_parameter { @@ -234,23 +232,22 @@ typedef struct rndis_params const u8 *host_mac; u16 *filter; - struct net_device *dev; - struct net_device_stats *stats; + struct net_device *dev; 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, +int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr); int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed); void rndis_add_hdr (struct sk_buff *skb); @@ -264,7 +261,7 @@ int rndis_signal_disconnect (int configNr); int rndis_state (int configNr); extern void rndis_set_host_mac (int configNr, const u8 *addr); -int __init rndis_init (void); +int __devinit rndis_init (void); void rndis_exit (void); #endif /* _LINUX_RNDIS_H */