Deleted Added
full compact
usb_ethernet.h (193045) usb_ethernet.h (194228)
1/* $FreeBSD: head/sys/dev/usb/net/usb_ethernet.h 193045 2009-05-29 18:46:57Z thompsa $ */
1/* $FreeBSD: head/sys/dev/usb/net/usb_ethernet.h 194228 2009-06-15 01:02:43Z thompsa $ */
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

--- 66 unchanged lines hidden (view full) ---

76
77struct usb_ether {
78 /* NOTE: the "ue_ifp" pointer must be first --hps */
79 struct ifnet *ue_ifp;
80 struct mtx *ue_mtx;
81 const struct usb_ether_methods *ue_methods;
82 struct sysctl_oid *ue_sysctl_oid;
83 void *ue_sc;
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

--- 66 unchanged lines hidden (view full) ---

76
77struct usb_ether {
78 /* NOTE: the "ue_ifp" pointer must be first --hps */
79 struct ifnet *ue_ifp;
80 struct mtx *ue_mtx;
81 const struct usb_ether_methods *ue_methods;
82 struct sysctl_oid *ue_sysctl_oid;
83 void *ue_sc;
84 struct usb_device *ue_udev; /* used by usb2_ether_do_request() */
84 struct usb_device *ue_udev; /* used by uether_do_request() */
85 device_t ue_dev;
86 device_t ue_miibus;
87
88 struct usb_process ue_tq;
89 struct sysctl_ctx_list ue_sysctl_ctx;
90 struct ifqueue ue_rxq;
91 struct usb_callout ue_watchdog;
92 struct usb_ether_cfg_task ue_sync_task[2];
93 struct usb_ether_cfg_task ue_media_task[2];
94 struct usb_ether_cfg_task ue_multi_task[2];
95 struct usb_ether_cfg_task ue_promisc_task[2];
96 struct usb_ether_cfg_task ue_tick_task[2];
97
98 int ue_unit;
99
100 /* ethernet address from eeprom */
101 uint8_t ue_eaddr[ETHER_ADDR_LEN];
102};
103
85 device_t ue_dev;
86 device_t ue_miibus;
87
88 struct usb_process ue_tq;
89 struct sysctl_ctx_list ue_sysctl_ctx;
90 struct ifqueue ue_rxq;
91 struct usb_callout ue_watchdog;
92 struct usb_ether_cfg_task ue_sync_task[2];
93 struct usb_ether_cfg_task ue_media_task[2];
94 struct usb_ether_cfg_task ue_multi_task[2];
95 struct usb_ether_cfg_task ue_promisc_task[2];
96 struct usb_ether_cfg_task ue_tick_task[2];
97
98 int ue_unit;
99
100 /* ethernet address from eeprom */
101 uint8_t ue_eaddr[ETHER_ADDR_LEN];
102};
103
104#define usb2_ether_do_request(ue,req,data,timo) \
105 usb2_do_request_proc((ue)->ue_udev,&(ue)->ue_tq,req,data,0,NULL,timo)
104#define uether_do_request(ue,req,data,timo) \
105 usbd_do_request_proc((ue)->ue_udev,&(ue)->ue_tq,req,data,0,NULL,timo)
106
106
107uint8_t usb2_ether_pause(struct usb_ether *, unsigned int);
108struct ifnet *usb2_ether_getifp(struct usb_ether *);
109struct mii_data *usb2_ether_getmii(struct usb_ether *);
110void *usb2_ether_getsc(struct usb_ether *);
111int usb2_ether_ifattach(struct usb_ether *);
112void usb2_ether_ifdetach(struct usb_ether *);
113int usb2_ether_ioctl(struct ifnet *, u_long, caddr_t);
114struct mbuf *usb2_ether_newbuf(void);
115int usb2_ether_rxmbuf(struct usb_ether *, struct mbuf *,
107uint8_t uether_pause(struct usb_ether *, unsigned int);
108struct ifnet *uether_getifp(struct usb_ether *);
109struct mii_data *uether_getmii(struct usb_ether *);
110void *uether_getsc(struct usb_ether *);
111int uether_ifattach(struct usb_ether *);
112void uether_ifdetach(struct usb_ether *);
113int uether_ioctl(struct ifnet *, u_long, caddr_t);
114struct mbuf *uether_newbuf(void);
115int uether_rxmbuf(struct usb_ether *, struct mbuf *,
116 unsigned int);
116 unsigned int);
117int usb2_ether_rxbuf(struct usb_ether *,
117int uether_rxbuf(struct usb_ether *,
118 struct usb_page_cache *,
119 unsigned int, unsigned int);
118 struct usb_page_cache *,
119 unsigned int, unsigned int);
120void usb2_ether_rxflush(struct usb_ether *);
121uint8_t usb2_ether_is_gone(struct usb_ether *);
120void uether_rxflush(struct usb_ether *);
121uint8_t uether_is_gone(struct usb_ether *);
122#endif /* _USB2_ETHERNET_H_ */
122#endif /* _USB2_ETHERNET_H_ */