Adding crypto support for wep to the wlan stack.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34795 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Colin Günther
2009-12-29 02:35:59 +00:00
parent ca16bde32b
commit f1c8646374
4 changed files with 31 additions and 5 deletions
@@ -22,8 +22,9 @@ KernelStaticLibrary libfreebsd_wlan.a :
ieee80211_adhoc.c
ieee80211_ageq.c
ieee80211_amrr.c
ieee80211_crypto_none.c
ieee80211_crypto.c
ieee80211_crypto_none.c
ieee80211_crypto_wep.c
ieee80211_dfs.c
ieee80211_haiku.c
ieee80211_ht.c
@@ -46,7 +47,6 @@ KernelStaticLibrary libfreebsd_wlan.a :
# NOT SUPPORTED YET ieee80211_acl.c
# NOT SUPPORTED YET ieee80211_crypto_ccmp.c
# NOT SUPPORTED YET ieee80211_crypto_tkip.c
# NOT SUPPORTED YET ieee80211_crypto_wep.c
# NOT SUPPORTED YET ieee80211_ddb.c
# NOT SUPPORTED YET ieee80211_hwmp.c
# NOT SUPPORTED YET ieee80211_mesh.c
@@ -141,6 +141,9 @@ ieee80211_crypto_attach(struct ieee80211com *ic)
{
/* NB: we assume everything is pre-zero'd */
ciphers[IEEE80211_CIPHER_NONE] = &ieee80211_cipher_none;
#if defined(__HAIKU__)
ieee80211_crypto_wep_load();
#endif
}
/*
@@ -149,6 +152,9 @@ ieee80211_crypto_attach(struct ieee80211com *ic)
void
ieee80211_crypto_detach(struct ieee80211com *ic)
{
#if defined(__HAIKU__)
ieee80211_crypto_wep_unload();
#endif
}
/*
@@ -159,6 +159,11 @@ int ieee80211_crypto_setkey(struct ieee80211vap *, struct ieee80211_key *);
void ieee80211_crypto_delglobalkeys(struct ieee80211vap *);
void ieee80211_crypto_reload_keys(struct ieee80211com *);
#if defined (__HAIKU__)
void ieee80211_crypto_wep_load(void);
void ieee80211_crypto_wep_unload(void);
#endif
/*
* Template for a supported cipher. Ciphers register with the
* crypto code and are typically loaded as separate modules
@@ -33,6 +33,21 @@
#include <sys/sysctl.h>
#include <sys/taskqueue.h>
#define IEEE80211_CRYPTO_MODULE(name, version) \
void \
ieee80211_crypto_##name##_load() { \
ieee80211_crypto_register(&name); \
} \
\
\
void \
ieee80211_crypto_##name##_unload() \
{ \
ieee80211_crypto_unregister(&name); \
}
/*
* Common state locking definitions.
*/