summaryrefslogtreecommitdiff
path: root/sys/net80211
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-12-05 16:26:54 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-12-05 16:26:54 +0000
commit6b3118a2e04bce85e93d11eff520cfa25cd9f6f3 (patch)
tree2444d64478f9624cd7dfe84d3233a5120b0d1523 /sys/net80211
parent9955d3ad72419bc5c54aa6fb17a51ca3321b2269 (diff)
Keep kernel definitions under _KERNEL to unbreak security/wpa_supplicant
because of a missing forward declaration for kernel functions. ok stsp@
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_crypto.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/sys/net80211/ieee80211_crypto.h b/sys/net80211/ieee80211_crypto.h
index 9e7cdc072fc..5114462a4d3 100644
--- a/sys/net80211/ieee80211_crypto.h
+++ b/sys/net80211/ieee80211_crypto.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_crypto.h,v 1.22 2009/01/26 19:09:41 damien Exp $ */
+/* $OpenBSD: ieee80211_crypto.h,v 1.23 2015/12/05 16:26:53 mpi Exp $ */
/*-
* Copyright (c) 2007,2008 Damien Bergamini <damien.bergamini@free.fr>
@@ -47,6 +47,16 @@ enum ieee80211_akm {
IEEE80211_AKM_SHA256_PSK = 0x00000008 /* 11w */
};
+#define IEEE80211_TKIP_HDRLEN 8
+#define IEEE80211_TKIP_MICLEN 8
+#define IEEE80211_TKIP_ICVLEN 4
+#define IEEE80211_CCMP_HDRLEN 8
+#define IEEE80211_CCMP_MICLEN 8
+
+#define IEEE80211_PMK_LEN 32
+
+#ifdef _KERNEL
+
static __inline int
ieee80211_is_8021x_akm(enum ieee80211_akm akm)
{
@@ -61,16 +71,6 @@ ieee80211_is_sha256_akm(enum ieee80211_akm akm)
akm == IEEE80211_AKM_SHA256_PSK;
}
-#define IEEE80211_KEYBUF_SIZE 16
-
-#define IEEE80211_TKIP_HDRLEN 8
-#define IEEE80211_TKIP_MICLEN 8
-#define IEEE80211_TKIP_ICVLEN 4
-#define IEEE80211_CCMP_HDRLEN 8
-#define IEEE80211_CCMP_MICLEN 8
-
-#define IEEE80211_PMK_LEN 32
-
struct ieee80211_key {
u_int8_t k_id; /* identifier (0-5) */
enum ieee80211_cipher k_cipher;
@@ -87,6 +87,8 @@ struct ieee80211_key {
void *k_priv;
};
+#define IEEE80211_KEYBUF_SIZE 16
+
/*
* Entry in the PMKSA cache.
*/
@@ -178,4 +180,5 @@ struct mbuf *ieee80211_bip_encap(struct ieee80211com *, struct mbuf *,
struct mbuf *ieee80211_bip_decap(struct ieee80211com *, struct mbuf *,
struct ieee80211_key *);
+#endif /* _KERNEL */
#endif /* _NET80211_IEEE80211_CRYPTO_H_ */