diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2008-04-26 20:03:35 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2008-04-26 20:03:35 +0000 |
commit | e3125e5a55625c8c7948c5dae418c31467cd3d7d (patch) | |
tree | 17b4fa4fd24abb35dad9e40fba722f18bd55c20f /sys/net80211 | |
parent | 1d4719eb83dfb0b84682b4294d17ca3e5c4f7bbf (diff) |
move things from ieee80211_ifattach() to ieee80211_crypto_attach().
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211.c | 16 | ||||
-rw-r--r-- | sys/net80211/ieee80211_crypto.c | 13 |
2 files changed, 14 insertions, 15 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 5218138a16d..3cfbf4a3b45 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211.c,v 1.30 2008/04/16 18:32:15 damien Exp $ */ +/* $OpenBSD: ieee80211.c,v 1.31 2008/04/26 20:03:34 damien Exp $ */ /* $NetBSD: ieee80211.c,v 1.19 2004/06/06 05:45:29 dyoung Exp $ */ /*- @@ -141,25 +141,13 @@ ieee80211_ifattach(struct ifnet *ifp) ifp->if_capabilities |= IFCAP_VLAN_MTU; ieee80211_setbasicrates(ic); - (void) ieee80211_setmode(ic, ic->ic_curmode); + (void)ieee80211_setmode(ic, ic->ic_curmode); if (ic->ic_lintval == 0) ic->ic_lintval = 100; /* default sleep */ ic->ic_bmisstimeout = 7*ic->ic_lintval; /* default 7 beacons */ ic->ic_dtim_period = 1; /* all TIMs are DTIMs */ - if (ic->ic_caps & IEEE80211_C_RSN) { - ic->ic_rsnprotos = - IEEE80211_PROTO_WPA | IEEE80211_PROTO_RSN; - ic->ic_rsnakms = - IEEE80211_AKM_PSK | IEEE80211_AKM_IEEE8021X; - ic->ic_rsnciphers = - IEEE80211_CIPHER_TKIP | IEEE80211_CIPHER_CCMP; - ic->ic_rsngroupcipher = IEEE80211_CIPHER_TKIP; - } - ic->ic_set_key = ieee80211_set_key; - ic->ic_delete_key = ieee80211_delete_key; - LIST_INSERT_HEAD(&ieee80211com_head, ic, ic_list); ieee80211_node_attach(ifp); ieee80211_proto_attach(ifp); diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c index 954a15e7800..7e19b991406 100644 --- a/sys/net80211/ieee80211_crypto.c +++ b/sys/net80211/ieee80211_crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_crypto.c,v 1.40 2008/04/21 19:01:01 damien Exp $ */ +/* $OpenBSD: ieee80211_crypto.c,v 1.41 2008/04/26 20:03:34 damien Exp $ */ /*- * Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr> @@ -61,6 +61,17 @@ void ieee80211_derive_pmkid(const u_int8_t *, size_t, const u_int8_t *, void ieee80211_crypto_attach(struct ifnet *ifp) { + struct ieee80211com *ic = (void *)ifp; + + if (ic->ic_caps & IEEE80211_C_RSN) { + ic->ic_rsnprotos = IEEE80211_PROTO_WPA | IEEE80211_PROTO_RSN; + ic->ic_rsnakms = IEEE80211_AKM_PSK | IEEE80211_AKM_IEEE8021X; + ic->ic_rsnciphers = IEEE80211_CIPHER_TKIP | + IEEE80211_CIPHER_CCMP; + ic->ic_rsngroupcipher = IEEE80211_CIPHER_TKIP; + } + ic->ic_set_key = ieee80211_set_key; + ic->ic_delete_key = ieee80211_delete_key; } void |