Module Name: src
Committed By: christos
Date: Mon May 28 14:19:11 UTC 2012
Modified Files:
src/sys/compat/netbsd32: netbsd32_ioctl.c netbsd32_ioctl.h
Log Message:
compat for 80211 ioctls from jmcneill
To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/compat/netbsd32/netbsd32_ioctl.c
cvs rdiff -u -r1.42 -r1.43 src/sys/compat/netbsd32/netbsd32_ioctl.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/compat/netbsd32/netbsd32_ioctl.c
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.65 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.66
--- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.65 Fri May 11 15:00:36 2012
+++ src/sys/compat/netbsd32/netbsd32_ioctl.c Mon May 28 10:19:10 2012
@@ -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 @@ netbsd32_to_wsdisplay_addscreendata(stru
}
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 @@ netbsd32_from_wsdisplay_cursor(struct ws
}
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 @@ netbsd32_ioctl(struct lwp *l, const stru
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:
Index: src/sys/compat/netbsd32/netbsd32_ioctl.h
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.h:1.42 src/sys/compat/netbsd32/netbsd32_ioctl.h:1.43
--- src/sys/compat/netbsd32/netbsd32_ioctl.h:1.42 Fri May 11 15:00:36 2012
+++ src/sys/compat/netbsd32/netbsd32_ioctl.h Mon May 28 10:19:10 2012
@@ -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 @@ 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" */
int i_wepon; /* wep enabled flag */