--- zzzz-none-000/linux-2.6.28.10/drivers/usb/gadget/rndis.h 2009-05-02 18:54:43.000000000 +0000 +++ puma5-6360-529/linux-2.6.28.10/drivers/usb/gadget/rndis.h 2009-01-12 13:06:56.000000000 +0000 @@ -12,13 +12,35 @@ * Microsoft's Remote NDIS Specification License Agreement. */ +/* Copyright 2008, Texas Instruments Incorporated + * + * This program has been modified from its original operation by + * Texas Instruments to do the following: + * + * Explanation of modification: + * fixes/changes from puma5 + * + * + * THIS MODIFIED SOFTWARE AND DOCUMENTATION ARE PROVIDED + * "AS IS," AND TEXAS INSTRUMENTS MAKES NO REPRESENTATIONS + * OR WARRENTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED + * TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY + * PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR + * DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, + * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + * See The GNU General Public License for more details. + * + * These changes are covered under version 2 of the GNU General Public License, + * dated June 1991. + */ + #ifndef _LINUX_RNDIS_H #define _LINUX_RNDIS_H #include "ndis.h" -#define RNDIS_MAXIMUM_FRAME_SIZE 1518 -#define RNDIS_MAX_TOTAL_SIZE 1558 +#define RNDIS_MAXIMUM_FRAME_SIZE 1518 +#define RNDIS_MAX_TOTAL_SIZE 1514 /* Remote NDIS Versions */ #define RNDIS_MAJOR_VERSION 1 @@ -219,7 +241,9 @@ u32 length; int send; } rndis_resp_t; - +#ifdef CONFIG_MACH_PUMA5 +#define RNDIS_MAX_MULTICAST_SIZE 32 +#endif typedef struct rndis_params { u8 confignr; @@ -230,7 +254,12 @@ u32 speed; u32 media_state; - const u8 *host_mac; +#ifdef CONFIG_MACH_PUMA5 + u8 perm_mac[6]; + u8 *host_mac; +#else + const u8 *host_mac; +#endif u16 *filter; struct net_device *dev; @@ -239,6 +268,10 @@ void (*resp_avail)(void *v); void *v; struct list_head resp_queue; +#ifdef CONFIG_MACH_PUMA5 + u8 mcast_addr [RNDIS_MAX_MULTICAST_SIZE] [6]; +#endif + } rndis_params; /* RNDIS Message parser and other useless functions */ @@ -257,11 +290,51 @@ void rndis_uninit (int configNr); int rndis_signal_connect (int configNr); +#ifdef CONFIG_MACH_PUMA5 +int rndis_signal_disconnect (int configNr, u8 logical); +u32 rndis_get_param_filter (u8 configNr); +#else int rndis_signal_disconnect (int configNr); +#endif int rndis_state (int configNr); extern void rndis_set_host_mac (int configNr, const u8 *addr); int __devinit rndis_init (void); void rndis_exit (void); +#ifdef CONFIG_MACH_PUMA5 +/* rndis MIB support */ +typedef struct CDC_RNDIS_STATS +{ + /* Transmission counters. */ + u32 broadcast_pkts_txed; + u32 broadcast_bytes_txed; + u32 multicast_pkts_txed; + u32 multicast_bytes_txed; + u32 unicast_pkts_txed; + u32 unicast_bytes_txed; + u32 transmit_packets_dropped; + u32 tx_errors; + + /* Receive counters */ + u32 broadcast_pkts_rxed; + u32 broadcast_bytes_rxed; + u32 multicast_pkts_rxed; + u32 multicast_bytes_rxed; + u32 unicast_pkts_rxed; + u32 unicast_bytes_rxed; + u32 receive_packets_dropped; + u32 rx_errors; + u32 unknownProtPkts; +}CDC_RNDIS_STATS; + +/* for MIB support */ +typedef struct mib2_ifCounters USB_MIB2_IF_COUNTERS; +typedef struct mib2_ifParams USB_MIB2_IF_PARAMS; +typedef struct mib2_ethParams USB_MIB2_ETH_PARAMS; +typedef struct mib2_phyCounters USB_MIB2_PHY_COUNTERS; +typedef struct mib2_usbParams USB_MIB2_USB_PARAMS; +typedef struct mib2_ifCommand USB_MIB2_IF_COMMAND; +#endif + #endif /* _LINUX_RNDIS_H */