diff options
author | yongari <yongari@FreeBSD.org> | 2011-10-24 23:38:11 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2011-10-24 23:38:11 +0000 |
commit | c9a1e7f1ad6d72c82b80127f615fe80ad9e34009 (patch) | |
tree | ef946c13c1ed9bf852b2d44943f0574a3aaea1b5 /sys/dev/usb/net/usb_ethernet.h | |
parent | 2d67bb3650dddd0cc2dacd206d347d77e29deb6e (diff) | |
download | FreeBSD-src-c9a1e7f1ad6d72c82b80127f615fe80ad9e34009.zip FreeBSD-src-c9a1e7f1ad6d72c82b80127f615fe80ad9e34009.tar.gz |
This change makes it possible to define driver specific attach
handler such that driver can announce interface capabilities and
can do its own MII attach. Currently all USB ethernet controllers
have no way to establish a link with pause capabilities. Lack of
checksum offloading support also was one of reason to bring this
change in.
This change adds a couple of wrappers to USB ethernet drivers
(uether_ifmedia_upd, uether_init and uether_start). All exported
functions in uether has prefix uether_ so I think it's more
consistent to have wrappers that follow the convention.
This change preserves ABI/KPI so it should be safe to merge this
change to stable/8.
While I'm here add missing __FBSDID and clean up headers.
Reviewed by: hselasky
Diffstat (limited to 'sys/dev/usb/net/usb_ethernet.h')
-rw-r--r-- | sys/dev/usb/net/usb_ethernet.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/usb/net/usb_ethernet.h b/sys/dev/usb/net/usb_ethernet.h index 51a8107..af7cad4 100644 --- a/sys/dev/usb/net/usb_ethernet.h +++ b/sys/dev/usb/net/usb_ethernet.h @@ -22,6 +22,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _USB_ETHERNET_H_ @@ -66,7 +68,7 @@ struct usb_ether_methods { void (*ue_mii_sts)(struct ifnet *, struct ifmediareq *); int (*ue_ioctl)(struct ifnet *, u_long, caddr_t); - + int (*ue_attach_post_sub)(struct usb_ether *); }; struct usb_ether_cfg_task { @@ -110,6 +112,8 @@ struct mii_data *uether_getmii(struct usb_ether *); void *uether_getsc(struct usb_ether *); int uether_ifattach(struct usb_ether *); void uether_ifdetach(struct usb_ether *); +int uether_ifmedia_upd(struct ifnet *); +void uether_init(void *); int uether_ioctl(struct ifnet *, u_long, caddr_t); struct mbuf *uether_newbuf(void); int uether_rxmbuf(struct usb_ether *, struct mbuf *, @@ -119,4 +123,5 @@ int uether_rxbuf(struct usb_ether *, unsigned int, unsigned int); void uether_rxflush(struct usb_ether *); uint8_t uether_is_gone(struct usb_ether *); +void uether_start(struct ifnet *); #endif /* _USB_ETHERNET_H_ */ |