From owner-p4-projects@FreeBSD.ORG Fri Oct 27 04:59:33 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B396216A47E; Fri, 27 Oct 2006 04:59:33 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CEB316A416 for ; Fri, 27 Oct 2006 04:59:33 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2660A43D78 for ; Fri, 27 Oct 2006 04:59:29 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k9R4xTB5029118 for ; Fri, 27 Oct 2006 04:59:29 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k9R4xS6E029115 for perforce@freebsd.org; Fri, 27 Oct 2006 04:59:28 GMT (envelope-from marcel@freebsd.org) Date: Fri, 27 Oct 2006 04:59:28 GMT Message-Id: <200610270459.k9R4xS6E029115@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 108544 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Oct 2006 04:59:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=108544 Change 108544 by marcel@marcel_cluster on 2006/10/27 04:58:46 Update efinetif. Affected files ... .. //depot/projects/ia64/sys/boot/efi/include/efilib.h#7 edit .. //depot/projects/ia64/sys/boot/efi/libefi/efinet.c#8 edit Differences ... ==== //depot/projects/ia64/sys/boot/efi/include/efilib.h#7 (text+ko) ==== @@ -1,5 +1,6 @@ /*- * Copyright (c) 2000 Doug Rabson + * Copyright (c) 2006 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,6 +37,8 @@ extern struct devsw efifs_dev; extern struct fs_ops efifs_fsops; +extern struct netif_driver efinetif; + void *efi_get_table(EFI_GUID *tbl); void efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table); ==== //depot/projects/ia64/sys/boot/efi/libefi/efinet.c#8 (text+ko) ==== @@ -38,7 +38,24 @@ #include #include -extern struct netif_driver efi_net; +static void efinet_end(struct netif *); +static int efinet_get(struct iodesc *, void *, size_t, time_t); +static void efinet_init(struct iodesc *, void *); +static int efinet_match(struct netif *, void *); +static int efinet_probe(struct netif *, void *); +static int efinet_put(struct iodesc *, void *, size_t); + +struct netif_driver efinetif = { + .netif_bname = "net", + .netif_match = efinet_match, + .netif_probe = efinet_probe, + .netif_init = efinet_init, + .netif_get = efinet_get, + .netif_put = efinet_put, + .netif_end = efinet_end, + .netif_ifs = NULL, + .netif_nifs = 0 +}; #ifdef EFINET_DEBUG static void @@ -74,21 +91,21 @@ } #endif -int +static int efinet_match(struct netif *nif, void *machdep_hint) { return (1); } -int +static int efinet_probe(struct netif *nif, void *machdep_hint) { return (0); } -int +static int efinet_put(struct iodesc *desc, void *pkt, size_t len) { struct netif *nif = desc->io_netif; @@ -116,8 +133,7 @@ return (status == EFI_SUCCESS) ? len : -1; } - -int +static int efinet_get(struct iodesc *desc, void *pkt, size_t len, time_t timeout) { struct netif *nif = desc->io_netif; @@ -152,7 +168,7 @@ return 0; } -void +static void efinet_init(struct iodesc *desc, void *machdep_hint) { struct netif *nif = desc->io_netif; @@ -229,12 +245,12 @@ if (nifs > MAX_INTERFACES) nifs = MAX_INTERFACES; - efi_net.netif_nifs = nifs; - efi_net.netif_ifs = difs; + efinetif.netif_nifs = nifs; + efinetif.netif_ifs = difs; bzero(stats, sizeof(stats)); for (i = 0; i < nifs; i++) { - struct netif_dif *dif = &efi_net.netif_ifs[i]; + struct netif_dif *dif = &efinetif.netif_ifs[i]; dif->dif_unit = i; dif->dif_nsel = 1; dif->dif_stats = &stats[i]; @@ -246,23 +262,10 @@ return; } -void +static void efinet_end(struct netif *nif) { EFI_SIMPLE_NETWORK *net = nif->nif_devdata; net->Shutdown(net); } - -struct netif_driver efi_net = { - "net", /* netif_bname */ - efinet_match, /* netif_match */ - efinet_probe, /* netif_probe */ - efinet_init, /* netif_init */ - efinet_get, /* netif_get */ - efinet_put, /* netif_put */ - efinet_end, /* netif_end */ - 0, /* netif_ifs */ - 0 /* netif_nifs */ -}; -