Page MenuHomeFreeBSD

D44827.diff
No OneTemporary

D44827.diff

diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c
--- a/sys/net80211/ieee80211.c
+++ b/sys/net80211/ieee80211.c
@@ -434,6 +434,28 @@
IEEE80211_LOCK_DESTROY(ic);
}
+/*
+ * Called by drivers during attach to set the supported
+ * cipher set for software encryption.
+ */
+void
+ieee80211_set_software_ciphers(struct ieee80211com *ic,
+ uint32_t cipher_suite)
+{
+ ieee80211_crypto_set_supported_software_ciphers(ic, cipher_suite);
+}
+
+/*
+ * Called by drivers during attach to set the supported
+ * cipher set for hardware encryption.
+ */
+void
+ieee80211_set_hardware_ciphers(struct ieee80211com *ic,
+ uint32_t cipher_suite)
+{
+ ieee80211_crypto_set_supported_hardware_ciphers(ic, cipher_suite);
+}
+
struct ieee80211com *
ieee80211_find_com(const char *name)
{
diff --git a/sys/net80211/ieee80211_crypto.h b/sys/net80211/ieee80211_crypto.h
--- a/sys/net80211/ieee80211_crypto.h
+++ b/sys/net80211/ieee80211_crypto.h
@@ -162,6 +162,10 @@
void ieee80211_crypto_attach(struct ieee80211com *);
void ieee80211_crypto_detach(struct ieee80211com *);
+void ieee80211_crypto_set_supported_software_ciphers(struct ieee80211com *,
+ uint32_t cipher_set);
+void ieee80211_crypto_set_supported_hardware_ciphers(struct ieee80211com *,
+ uint32_t cipher_set);
void ieee80211_crypto_vattach(struct ieee80211vap *);
void ieee80211_crypto_vdetach(struct ieee80211vap *);
int ieee80211_crypto_newkey(struct ieee80211vap *,
diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c
--- a/sys/net80211/ieee80211_crypto.c
+++ b/sys/net80211/ieee80211_crypto.c
@@ -164,6 +164,27 @@
{
}
+/*
+ * Set the supported ciphers for software encryption.
+ */
+void
+ieee80211_crypto_set_supported_software_ciphers(struct ieee80211com *ic,
+ uint32_t cipher_set)
+{
+ ic->ic_sw_cryptocaps = cipher_set;
+}
+
+/*
+ * Set the supported ciphers for hardware encryption.
+ */
+void
+ieee80211_crypto_set_supported_hardware_ciphers(struct ieee80211com *ic,
+ uint32_t cipher_set)
+{
+ ic->ic_cryptocaps = cipher_set;
+}
+
+
/*
* Setup crypto support for a vap.
*/
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -751,6 +751,10 @@
int ic_printf(struct ieee80211com *, const char *, ...) __printflike(2, 3);
void ieee80211_ifattach(struct ieee80211com *);
void ieee80211_ifdetach(struct ieee80211com *);
+void ieee80211_set_software_ciphers(struct ieee80211com *,
+ uint32_t cipher_suite);
+void ieee80211_set_hardware_ciphers(struct ieee80211com *,
+ uint32_t cipher_suite);
int ieee80211_vap_setup(struct ieee80211com *, struct ieee80211vap *,
const char name[IFNAMSIZ], int unit,
enum ieee80211_opmode opmode, int flags,

File Metadata

Mime Type
text/plain
Expires
Thu, May 1, 1:13 PM (17 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17858756
Default Alt Text
D44827.diff (2 KB)

Event Timeline