diff --git a/sys/netproto/802_11/ieee80211_dragonfly.h b/sys/netproto/802_11/ieee80211_dragonfly.h
index 0ba82f5..a84248f 100644 (file)
--- a/sys/netproto/802_11/ieee80211_dragonfly.h
+++ b/sys/netproto/802_11/ieee80211_dragonfly.h
@@ -61,6 +61,7 @@
* Global serializer (operates like a non-reentrant lockmgr lock)
*/
extern struct lwkt_serialize wlan_global_serializer;
+extern int ieee80211_force_swcrypto;
#define wlan_serialize_enter() _wlan_serialize_enter(__FUNCTION__)
#define wlan_serialize_exit() _wlan_serialize_exit(__FUNCTION__)
diff --git a/sys/netproto/802_11/wlan/ieee80211_crypto.c b/sys/netproto/802_11/wlan/ieee80211_crypto.c
index 38440ac..88f4cea 100644 (file)
--- a/sys/netproto/802_11/wlan/ieee80211_crypto.c
+++ b/sys/netproto/802_11/wlan/ieee80211_crypto.c
@@ -324,6 +324,10 @@ ieee80211_crypto_newkey(struct ieee80211vap *vap,
__func__, cip->ic_name);
flags |= IEEE80211_KEY_SWCRYPT;
}
+ if (ieee80211_force_swcrypto) {
+ flags |= IEEE80211_KEY_SWCRYPT;
+ flags |= IEEE80211_KEY_SWMIC;
+ }
/*
* Hardware TKIP with software MIC is an important
* combination; we handle it by flagging each key,
diff --git a/sys/netproto/802_11/wlan/ieee80211_dragonfly.c b/sys/netproto/802_11/wlan/ieee80211_dragonfly.c
index 67fc38e..1f4e178 100644 (file)
--- a/sys/netproto/802_11/wlan/ieee80211_dragonfly.c
+++ b/sys/netproto/802_11/wlan/ieee80211_dragonfly.c
@@ -59,8 +59,11 @@ SYSCTL_NODE(_net, OID_AUTO, wlan, CTLFLAG_RD, 0, "IEEE 80211 parameters");
#ifdef IEEE80211_DEBUG
int ieee80211_debug = 0;
+int ieee80211_force_swcrypto = 0;
SYSCTL_INT(_net_wlan, OID_AUTO, debug, CTLFLAG_RW, &ieee80211_debug,
0, "debugging printfs");
+SYSCTL_INT(_net_wlan, OID_AUTO, force_swcrypto, CTLFLAG_RW,
+ &ieee80211_force_swcrypto, 0, "force software crypto");
#endif
MALLOC_DEFINE(M_80211_COM, "80211com", "802.11 com state");