De-__P'ify.
This commit is contained in:
parent
296c51f110
commit
15921b5f23
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_media.c,v 1.21 2004/02/19 11:58:30 ragge Exp $ */
|
||||
/* $NetBSD: if_media.c,v 1.22 2004/04/09 20:44:57 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -83,7 +83,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.21 2004/02/19 11:58:30 ragge Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.22 2004/04/09 20:44:57 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -105,18 +105,15 @@ __KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.21 2004/02/19 11:58:30 ragge Exp $");
|
|||
|
||||
#ifdef IFMEDIA_DEBUG
|
||||
int ifmedia_debug = 0;
|
||||
static void ifmedia_printword __P((int));
|
||||
static void ifmedia_printword(int);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initialize if_media struct for a specific interface instance.
|
||||
*/
|
||||
void
|
||||
ifmedia_init(ifm, dontcare_mask, change_callback, status_callback)
|
||||
struct ifmedia *ifm;
|
||||
int dontcare_mask;
|
||||
ifm_change_cb_t change_callback;
|
||||
ifm_stat_cb_t status_callback;
|
||||
ifmedia_init(struct ifmedia *ifm, int dontcare_mask,
|
||||
ifm_change_cb_t change_callback, ifm_stat_cb_t status_callback)
|
||||
{
|
||||
|
||||
TAILQ_INIT(&ifm->ifm_list);
|
||||
|
@ -132,11 +129,7 @@ ifmedia_init(ifm, dontcare_mask, change_callback, status_callback)
|
|||
* for a specific interface instance.
|
||||
*/
|
||||
void
|
||||
ifmedia_add(ifm, mword, data, aux)
|
||||
struct ifmedia *ifm;
|
||||
int mword;
|
||||
int data;
|
||||
void *aux;
|
||||
ifmedia_add(struct ifmedia *ifm, int mword, int data, void *aux)
|
||||
{
|
||||
struct ifmedia_entry *entry;
|
||||
|
||||
|
@ -167,10 +160,7 @@ ifmedia_add(ifm, mword, data, aux)
|
|||
* supported media for a specific interface instance.
|
||||
*/
|
||||
void
|
||||
ifmedia_list_add(ifm, lp, count)
|
||||
struct ifmedia *ifm;
|
||||
struct ifmedia_entry *lp;
|
||||
int count;
|
||||
ifmedia_list_add(struct ifmedia *ifm, struct ifmedia_entry *lp, int count)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -187,9 +177,7 @@ ifmedia_list_add(ifm, lp, count)
|
|||
* media-change callback.
|
||||
*/
|
||||
void
|
||||
ifmedia_set(ifm, target)
|
||||
struct ifmedia *ifm;
|
||||
int target;
|
||||
ifmedia_set(struct ifmedia *ifm, int target)
|
||||
{
|
||||
struct ifmedia_entry *match;
|
||||
|
||||
|
@ -238,11 +226,8 @@ ifmedia_set(ifm, target)
|
|||
* Device-independent media ioctl support function.
|
||||
*/
|
||||
int
|
||||
ifmedia_ioctl(ifp, ifr, ifm, cmd)
|
||||
struct ifnet *ifp;
|
||||
struct ifreq *ifr;
|
||||
struct ifmedia *ifm;
|
||||
u_long cmd;
|
||||
ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, struct ifmedia *ifm,
|
||||
u_long cmd)
|
||||
{
|
||||
struct ifmedia_entry *match;
|
||||
struct ifmediareq *ifmr = (struct ifmediareq *) ifr;
|
||||
|
@ -256,7 +241,7 @@ ifmedia_ioctl(ifp, ifr, ifm, cmd)
|
|||
/*
|
||||
* Set the current media.
|
||||
*/
|
||||
case SIOCSIFMEDIA:
|
||||
case SIOCSIFMEDIA:
|
||||
{
|
||||
struct ifmedia_entry *oldentry;
|
||||
u_int oldmedia;
|
||||
|
@ -312,7 +297,7 @@ ifmedia_ioctl(ifp, ifr, ifm, cmd)
|
|||
/*
|
||||
* Get list of available media and current media on interface.
|
||||
*/
|
||||
case SIOCGIFMEDIA:
|
||||
case SIOCGIFMEDIA:
|
||||
{
|
||||
struct ifmedia_entry *ep;
|
||||
size_t nwords;
|
||||
|
@ -370,10 +355,7 @@ ifmedia_ioctl(ifp, ifr, ifm, cmd)
|
|||
* Find media entry matching a given ifm word.
|
||||
*/
|
||||
struct ifmedia_entry *
|
||||
ifmedia_match(ifm, target, mask)
|
||||
struct ifmedia *ifm;
|
||||
u_int target;
|
||||
u_int mask;
|
||||
ifmedia_match(struct ifmedia *ifm, u_int target, u_int mask)
|
||||
{
|
||||
struct ifmedia_entry *match, *next;
|
||||
|
||||
|
@ -402,9 +384,7 @@ ifmedia_match(ifm, target, mask)
|
|||
* Delete all media for a given instance.
|
||||
*/
|
||||
void
|
||||
ifmedia_delete_instance(ifm, inst)
|
||||
struct ifmedia *ifm;
|
||||
u_int inst;
|
||||
ifmedia_delete_instance(struct ifmedia *ifm, u_int inst)
|
||||
{
|
||||
struct ifmedia_entry *ife, *nife;
|
||||
|
||||
|
@ -456,8 +436,7 @@ static const struct ifmedia_description ifm_option_descriptions[] =
|
|||
* print a media word.
|
||||
*/
|
||||
static void
|
||||
ifmedia_printword(ifmw)
|
||||
int ifmw;
|
||||
ifmedia_printword(int ifmw)
|
||||
{
|
||||
const struct ifmedia_description *desc;
|
||||
int seen_option = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_media.h,v 1.39 2004/04/09 20:30:28 thorpej Exp $ */
|
||||
/* $NetBSD: if_media.h,v 1.40 2004/04/09 20:44:57 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -93,8 +93,8 @@
|
|||
/*
|
||||
* Driver callbacks for media status and change requests.
|
||||
*/
|
||||
typedef int (*ifm_change_cb_t) __P((struct ifnet *));
|
||||
typedef void (*ifm_stat_cb_t) __P((struct ifnet *, struct ifmediareq *));
|
||||
typedef int (*ifm_change_cb_t)(struct ifnet *);
|
||||
typedef void (*ifm_stat_cb_t)(struct ifnet *, struct ifmediareq *);
|
||||
|
||||
/*
|
||||
* In-kernel representation of a single supported media type.
|
||||
|
@ -120,27 +120,25 @@ struct ifmedia {
|
|||
};
|
||||
|
||||
/* Initialize an interface's struct if_media field. */
|
||||
void ifmedia_init __P((struct ifmedia *, int, ifm_change_cb_t,
|
||||
ifm_stat_cb_t));
|
||||
void ifmedia_init(struct ifmedia *, int, ifm_change_cb_t, ifm_stat_cb_t);
|
||||
|
||||
/* Add one supported medium to a struct ifmedia. */
|
||||
void ifmedia_add __P((struct ifmedia *, int, int, void *));
|
||||
void ifmedia_add(struct ifmedia *, int, int, void *);
|
||||
|
||||
/* Add an array (of ifmedia_entry) media to a struct ifmedia. */
|
||||
void ifmedia_list_add(struct ifmedia *, struct ifmedia_entry *, int);
|
||||
|
||||
/* Set default media type on initialization. */
|
||||
void ifmedia_set __P((struct ifmedia *ifm, int mword));
|
||||
void ifmedia_set(struct ifmedia *ifm, int mword);
|
||||
|
||||
/* Common ioctl function for getting/setting media, called by driver. */
|
||||
int ifmedia_ioctl __P((struct ifnet *, struct ifreq *, struct ifmedia *,
|
||||
u_long));
|
||||
int ifmedia_ioctl(struct ifnet *, struct ifreq *, struct ifmedia *, u_long);
|
||||
|
||||
/* Look up a media entry. */
|
||||
struct ifmedia_entry *ifmedia_match __P((struct ifmedia *, u_int, u_int));
|
||||
struct ifmedia_entry *ifmedia_match(struct ifmedia *, u_int, u_int);
|
||||
|
||||
/* Delete all media for a given media instance */
|
||||
void ifmedia_delete_instance __P((struct ifmedia *, u_int));
|
||||
void ifmedia_delete_instance(struct ifmedia *, u_int);
|
||||
|
||||
/* Compute baudrate for a given media. */
|
||||
u_quad_t ifmedia_baudrate(int);
|
||||
|
|
Loading…
Reference in New Issue