summaryrefslogtreecommitdiffstats
path: root/sys/dev/awi
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-06-28 06:17:26 +0000
committersam <sam@FreeBSD.org>2003-06-28 06:17:26 +0000
commit83c82ef638b47ee2a19f6c9f361dc79d8fefdea2 (patch)
tree6f38a1a79d998c20ed7651406ffd556fe4858396 /sys/dev/awi
parent11ef034744518ddd1e6510fa963c27e85ca457a1 (diff)
downloadFreeBSD-src-83c82ef638b47ee2a19f6c9f361dc79d8fefdea2.zip
FreeBSD-src-83c82ef638b47ee2a19f6c9f361dc79d8fefdea2.tar.gz
update for new 802.11 support
Diffstat (limited to 'sys/dev/awi')
-rw-r--r--sys/dev/awi/awi.c10
-rw-r--r--sys/dev/awi/awi_wep.c3
-rw-r--r--sys/dev/awi/awi_wicfg.c3
-rw-r--r--sys/dev/awi/awivar.h18
-rw-r--r--sys/dev/awi/if_awi_pccard.c3
5 files changed, 33 insertions, 4 deletions
diff --git a/sys/dev/awi/awi.c b/sys/dev/awi/awi.c
index e77fae6..5326c8a 100644
--- a/sys/dev/awi/awi.c
+++ b/sys/dev/awi/awi.c
@@ -112,7 +112,6 @@
#endif
#include <net/if_media.h>
#include <net/if_llc.h>
-#include <net/if_ieee80211.h>
#ifdef INET
#include <netinet/in.h>
@@ -126,6 +125,9 @@
#endif
#endif
+#include <net80211/ieee80211_var.h>
+#include <net80211/ieee80211_ioctl.h>
+
#if defined(__FreeBSD__) && __FreeBSD_version >= 400000
#define NBPFILTER 1
#elif defined(__FreeBSD__) && __FreeBSD_version >= 300000
@@ -459,7 +461,9 @@ awi_ioctl(ifp, cmd, data)
struct ifaddr *ifa = (struct ifaddr *)data;
struct ieee80211req *ireq = (struct ieee80211req *)data;
int s, error;
+#ifdef SIOCS80211NWID
struct ieee80211_nwid nwid;
+#endif
u_int8_t *p;
int len;
u_int8_t tmpstr[IEEE80211_NWID_LEN*2];
@@ -527,6 +531,7 @@ awi_ioctl(ifp, cmd, data)
else
ifp->if_mtu = ifr->ifr_mtu;
break;
+#ifdef SIOCS80211NWID
case SIOCS80211NWID:
#ifdef __FreeBSD__
error = suser(mythread);
@@ -561,6 +566,8 @@ awi_ioctl(ifp, cmd, data)
p = sc->sc_mib_mac.aDesired_ESS_ID;
error = copyout(p + 1, ifr->ifr_data, 1 + IEEE80211_NWID_LEN);
break;
+#endif
+#ifdef SIOCS80211NWKEY
case SIOCS80211NWKEY:
#ifdef __FreeBSD__
error = suser(mythread);
@@ -572,6 +579,7 @@ awi_ioctl(ifp, cmd, data)
case SIOCG80211NWKEY:
error = awi_wep_getnwkey(sc, (struct ieee80211_nwkey *)data);
break;
+#endif
#ifdef IFM_IEEE80211
case SIOCSIFMEDIA:
case SIOCGIFMEDIA:
diff --git a/sys/dev/awi/awi_wep.c b/sys/dev/awi/awi_wep.c
index ecaf548..c5029f7 100644
--- a/sys/dev/awi/awi_wep.c
+++ b/sys/dev/awi/awi_wep.c
@@ -74,7 +74,8 @@
#include <net/if_ether.h>
#endif
#include <net/if_media.h>
-#include <net/if_ieee80211.h>
+
+#include <net80211/ieee80211.h>
#include <machine/cpu.h>
#include <machine/bus.h>
diff --git a/sys/dev/awi/awi_wicfg.c b/sys/dev/awi/awi_wicfg.c
index db97d63..363fcbf 100644
--- a/sys/dev/awi/awi_wicfg.c
+++ b/sys/dev/awi/awi_wicfg.c
@@ -65,7 +65,8 @@
#include <net/if_ether.h>
#endif
#include <net/if_media.h>
-#include <net/if_ieee80211.h>
+
+#include <net80211/ieee80211.h>
#include <machine/cpu.h>
#include <machine/bus.h>
diff --git a/sys/dev/awi/awivar.h b/sys/dev/awi/awivar.h
index 0d4a979..0fcf4e2 100644
--- a/sys/dev/awi/awivar.h
+++ b/sys/dev/awi/awivar.h
@@ -213,6 +213,24 @@ int awi_init(struct awi_softc *sc);
int awi_init_region(struct awi_softc *);
int awi_wicfg(struct ifnet *, u_long, caddr_t);
+#ifndef SIOCS80211NWKEY
+/*
+ * This structure is part of the NetBSD public ioctl interface but
+ * used internally by the driver. Declare it here for non-NetBSD
+ * systems.
+ */
+/* the first member must be matched with struct ifreq */
+struct ieee80211_nwkey {
+ char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
+ int i_wepon; /* wep enabled flag */
+ int i_defkid; /* default encrypt key id */
+ struct {
+ int i_keylen;
+ u_int8_t *i_keydat;
+ } i_key[IEEE80211_WEP_NKID];
+};
+#endif
+
int awi_wep_setnwkey(struct awi_softc *, struct ieee80211_nwkey *);
int awi_wep_getnwkey(struct awi_softc *, struct ieee80211_nwkey *);
int awi_wep_getalgo(struct awi_softc *);
diff --git a/sys/dev/awi/if_awi_pccard.c b/sys/dev/awi/if_awi_pccard.c
index 4e6150d..7c69af3 100644
--- a/sys/dev/awi/if_awi_pccard.c
+++ b/sys/dev/awi/if_awi_pccard.c
@@ -41,7 +41,8 @@
#include <net/if_arp.h>
#include <net/if_media.h>
#include <net/ethernet.h>
-#include <net/if_ieee80211.h>
+
+#include <net80211/ieee80211.h>
#include <dev/awi/am79c930reg.h>
#include <dev/awi/am79c930var.h>
OpenPOWER on IntegriCloud