diff --git a/src/libs/compat/freebsd_wlan/net80211/Jamfile b/src/libs/compat/freebsd_wlan/net80211/Jamfile index b8ca8aa807..dcdae52f08 100644 --- a/src/libs/compat/freebsd_wlan/net80211/Jamfile +++ b/src/libs/compat/freebsd_wlan/net80211/Jamfile @@ -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 diff --git a/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto.c b/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto.c index e2a744d3bc..df0e5f59ab 100644 --- a/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto.c +++ b/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto.c @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include @@ -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 } /* diff --git a/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto.h b/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto.h index 26f373bbce..e382954b92 100644 --- a/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto.h +++ b/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto.h @@ -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. diff --git a/src/libs/compat/freebsd_wlan/net80211/ieee80211_haiku.h b/src/libs/compat/freebsd_wlan/net80211/ieee80211_haiku.h index c33f415e42..b4038f79d3 100644 --- a/src/libs/compat/freebsd_wlan/net80211/ieee80211_haiku.h +++ b/src/libs/compat/freebsd_wlan/net80211/ieee80211_haiku.h @@ -33,6 +33,21 @@ #include #include + +#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. */