Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 compat for 80211 ioctls from jmcneill
details: https://anonhg.NetBSD.org/src/rev/25235458c423
branches: trunk
changeset: 779445:25235458c423
user: christos <christos%NetBSD.org@localhost>
date: Mon May 28 14:19:10 2012 +0000
description:
compat for 80211 ioctls from jmcneill
diffstat:
sys/compat/netbsd32/netbsd32_ioctl.c | 30 ++++++++++++++++++++++++++++--
sys/compat/netbsd32/netbsd32_ioctl.h | 13 ++++++++++++-
2 files changed, 40 insertions(+), 3 deletions(-)
diffs (92 lines):
diff -r df74c6e30113 -r 25235458c423 sys/compat/netbsd32/netbsd32_ioctl.c
--- a/sys/compat/netbsd32/netbsd32_ioctl.c Mon May 28 13:16:10 2012 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.c Mon May 28 14:19:10 2012 +0000
@@ -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>
@@ -267,6 +267,17 @@
}
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,
u_long cmd)
@@ -547,6 +558,17 @@
}
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,
u_long cmd)
@@ -951,6 +973,10 @@
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:
diff -r df74c6e30113 -r 25235458c423 sys/compat/netbsd32/netbsd32_ioctl.h
--- a/sys/compat/netbsd32/netbsd32_ioctl.h Mon May 28 13:16:10 2012 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.h Mon May 28 14:19:10 2012 +0000
@@ -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
@@ -115,6 +115,17 @@
#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" */
int i_wepon; /* wep enabled flag */
Home |
Main Index |
Thread Index |
Old Index