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:
@@ -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
|
||||
|
||||
@@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/mbuf.h>
|
||||
|
||||
#include <sys/socket.h>
|
||||
|
||||
@@ -109,7 +109,7 @@ cipher_attach(struct ieee80211vap *vap, struct ieee80211_key *key)
|
||||
return key->wk_cipher->ic_attach(vap, key);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Wrappers for driver key management methods.
|
||||
*/
|
||||
static __inline int
|
||||
@@ -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
|
||||
@@ -216,7 +221,7 @@ ieee80211_crypto_enmic(struct ieee80211vap *vap,
|
||||
return (cip->ic_miclen > 0 ? cip->ic_enmic(k, m, force) : 1);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Reset key state to an unused state. The crypto
|
||||
* key allocation mechanism insures other state (e.g.
|
||||
* key data) is properly setup before a key is used.
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user