compat for 80211 ioctls from jmcneill
This commit is contained in:
parent
fa636f0de9
commit
82e21017c8
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_ioctl.c,v 1.65 2012/05/11 19:00:36 christos Exp $ */
|
||||
/* $NetBSD: netbsd32_ioctl.c,v 1.66 2012/05/28 14:19:10 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Matthew R. Green
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.65 2012/05/11 19:00:36 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.66 2012/05/28 14:19:10 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -266,6 +266,17 @@ netbsd32_to_wsdisplay_addscreendata(struct netbsd32_wsdisplay_addscreendata *asd
|
|||
asd->idx = asd32->idx;
|
||||
}
|
||||
|
||||
static inline void
|
||||
netbsd32_to_ieee80211req(struct netbsd32_ieee80211req *ireq32,
|
||||
struct ieee80211req *ireq, u_long cmd)
|
||||
{
|
||||
strncpy(ireq->i_name, ireq32->i_name, IFNAMSIZ);
|
||||
ireq->i_type = ireq32->i_type;
|
||||
ireq->i_val = ireq32->i_val;
|
||||
ireq->i_len = ireq32->i_len;
|
||||
ireq->i_data = NETBSD32PTR64(ireq32->i_data);
|
||||
}
|
||||
|
||||
static inline void
|
||||
netbsd32_to_ieee80211_nwkey(struct netbsd32_ieee80211_nwkey *nwk32,
|
||||
struct ieee80211_nwkey *nwk,
|
||||
|
@ -546,6 +557,17 @@ netbsd32_from_wsdisplay_cursor(struct wsdisplay_cursor *c,
|
|||
NETBSD32PTR32(c32->mask, c->mask);
|
||||
}
|
||||
|
||||
static inline void
|
||||
netbsd32_from_ieee80211req(struct ieee80211req *ireq,
|
||||
struct netbsd32_ieee80211req *ireq32, u_long cmd)
|
||||
{
|
||||
strncpy(ireq32->i_name, ireq->i_name, IFNAMSIZ);
|
||||
ireq32->i_type = ireq->i_type;
|
||||
ireq32->i_val = ireq->i_val;
|
||||
ireq32->i_len = ireq->i_len;
|
||||
NETBSD32PTR32(ireq32->i_data, ireq->i_data);
|
||||
}
|
||||
|
||||
static inline void
|
||||
netbsd32_from_ieee80211_nwkey(struct ieee80211_nwkey *nwk,
|
||||
struct netbsd32_ieee80211_nwkey *nwk32,
|
||||
|
@ -951,6 +973,10 @@ netbsd32_ioctl(struct lwp *l, const struct netbsd32_ioctl_args *uap, register_t
|
|||
case WSDISPLAYIO_SCURSOR32:
|
||||
IOCTL_STRUCT_CONV_TO(WSDISPLAYIO_SCURSOR, wsdisplay_cursor);
|
||||
|
||||
case SIOCS8021132:
|
||||
IOCTL_STRUCT_CONV_TO(SIOCS80211, ieee80211req);
|
||||
case SIOCG8021132:
|
||||
IOCTL_STRUCT_CONV_TO(SIOCG80211, ieee80211req);
|
||||
case SIOCS80211NWKEY32:
|
||||
IOCTL_STRUCT_CONV_TO(SIOCS80211NWKEY, ieee80211_nwkey);
|
||||
case SIOCG80211NWKEY32:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_ioctl.h,v 1.42 2012/05/11 19:00:36 christos Exp $ */
|
||||
/* $NetBSD: netbsd32_ioctl.h,v 1.43 2012/05/28 14:19:10 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Matthew R. Green
|
||||
|
@ -114,6 +114,17 @@ struct netbsd32_wsdisplay_addscreendata {
|
|||
};
|
||||
#define WSDISPLAYIO_ADDSCREEN32 _IOW('W', 78, struct netbsd32_wsdisplay_addscreendata)
|
||||
|
||||
/* the first member must be matched with struct ifreq */
|
||||
struct netbsd32_ieee80211req {
|
||||
char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
|
||||
uint16_t i_type; /* req type */
|
||||
int16_t i_val; /* Index or simple value */
|
||||
uint16_t i_len; /* Index or simple value */
|
||||
netbsd32_voidp i_data; /* Extra data */
|
||||
};
|
||||
#define SIOCS8021132 _IOW('i', 244, struct netbsd32_ieee80211req)
|
||||
#define SIOCG8021132 _IOWR('i', 245, struct netbsd32_ieee80211req)
|
||||
|
||||
/* the first member must be matched with struct ifreq */
|
||||
struct netbsd32_ieee80211_nwkey {
|
||||
char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
|
||||
|
|
Loading…
Reference in New Issue