Page MenuHomeFreeBSD

D44922.id137587.diff
No OneTemporary

D44922.id137587.diff

diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c
--- a/contrib/wpa/src/drivers/driver_bsd.c
+++ b/contrib/wpa/src/drivers/driver_bsd.c
@@ -378,6 +378,27 @@
case WPA_ALG_CCMP:
wk.ik_type = IEEE80211_CIPHER_AES_CCM;
break;
+ case WPA_ALG_CCMP_256:
+ wk.ik_type = IEEE80211_CIPHER_AES_CCM_256;
+ break;
+ case WPA_ALG_GCMP:
+ wk.ik_type = IEEE80211_CIPHER_AES_GCM_128;
+ break;
+ case WPA_ALG_GCMP_256:
+ wk.ik_type = IEEE80211_CIPHER_AES_GCM_256;
+ break;
+ case WPA_ALG_BIP_CMAC_128:
+ wk.ik_type = IEEE80211_CIPHER_BIP_CMAC_128;
+ break;
+ case WPA_ALG_BIP_CMAC_256:
+ wk.ik_type = IEEE80211_CIPHER_BIP_CMAC_256;
+ break;
+ case WPA_ALG_BIP_GMAC_128:
+ wk.ik_type = IEEE80211_CIPHER_BIP_GMAC_128;
+ break;
+ case WPA_ALG_BIP_GMAC_256:
+ wk.ik_type = IEEE80211_CIPHER_BIP_GMAC_256;
+ break;
default:
wpa_printf(MSG_ERROR, "%s: unknown alg=%d", __func__, alg);
return -1;
@@ -485,6 +506,20 @@
}
v = 0;
+ if (params->wpa_pairwise & WPA_CIPHER_BIP_GMAC_128)
+ v |= 1<<IEEE80211_CIPHER_BIP_GMAC_128;
+ if (params->wpa_pairwise & WPA_CIPHER_BIP_GMAC_256)
+ v |= 1<<IEEE80211_CIPHER_BIP_GMAC_256;
+ if (params->wpa_pairwise & WPA_CIPHER_BIP_CMAC_128)
+ v |= 1<<IEEE80211_CIPHER_BIP_CMAC_128;
+ if (params->wpa_pairwise & WPA_CIPHER_BIP_CMAC_256)
+ v |= 1<<IEEE80211_CIPHER_BIP_CMAC_256;
+ if (params->wpa_pairwise & WPA_CIPHER_GCMP)
+ v |= 1<<IEEE80211_CIPHER_AES_GCM_128;
+ if (params->wpa_pairwise & WPA_CIPHER_GCMP_256)
+ v |= 1<<IEEE80211_CIPHER_AES_GCM_256;
+ if (params->wpa_pairwise & WPA_CIPHER_CCMP_256)
+ v |= 1<<IEEE80211_CIPHER_AES_CCM_256;
if (params->wpa_pairwise & WPA_CIPHER_CCMP)
v |= 1<<IEEE80211_CIPHER_AES_CCM;
if (params->wpa_pairwise & WPA_CIPHER_TKIP)
@@ -1528,17 +1563,7 @@
static int wpa_driver_bsd_capa(struct bsd_driver_data *drv)
{
-#ifdef IEEE80211_IOC_DEVCAPS
-/* kernel definitions copied from net80211/ieee80211_var.h */
-#define IEEE80211_CIPHER_WEP 0
-#define IEEE80211_CIPHER_TKIP 1
-#define IEEE80211_CIPHER_AES_CCM 3
-#define IEEE80211_CRYPTO_WEP (1<<IEEE80211_CIPHER_WEP)
-#define IEEE80211_CRYPTO_TKIP (1<<IEEE80211_CIPHER_TKIP)
-#define IEEE80211_CRYPTO_AES_CCM (1<<IEEE80211_CIPHER_AES_CCM)
-#define IEEE80211_C_HOSTAP 0x00000400 /* CAPABILITY: HOSTAP avail */
-#define IEEE80211_C_WPA1 0x00800000 /* CAPABILITY: WPA1 avail */
-#define IEEE80211_C_WPA2 0x01000000 /* CAPABILITY: WPA2 avail */
+#ifdef IEEE80211_IOC_DEVCAPS
struct ieee80211_devcaps_req devcaps;
if (get80211var(drv, IEEE80211_IOC_DEVCAPS, &devcaps,
@@ -1548,9 +1573,6 @@
return -1;
}
- wpa_printf(MSG_DEBUG, "%s: drivercaps=0x%08x,cryptocaps=0x%08x",
- __func__, devcaps.dc_drivercaps, devcaps.dc_cryptocaps);
-
if (devcaps.dc_drivercaps & IEEE80211_C_WPA1)
drv->capa.key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA |
WPA_DRIVER_CAPA_KEY_MGMT_WPA_PSK;
@@ -1563,20 +1585,31 @@
WPA_DRIVER_CAPA_ENC_WEP104;
if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_TKIP)
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP;
+
if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_CCM)
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP;
+ if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_CCM_256)
+ drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP_256;
+
+ if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_GCM_128)
+ drv->capa.enc |= WPA_DRIVER_CAPA_ENC_GCMP;
+ if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_GCM_256)
+ drv->capa.enc |= WPA_DRIVER_CAPA_ENC_GCMP_256;
+
+ if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_BIP_CMAC_128)
+ drv->capa.enc |= WPA_DRIVER_CAPA_ENC_BIP;
+ if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_BIP_CMAC_256)
+ drv->capa.enc |= WPA_DRIVER_CAPA_ENC_BIP_CMAC_256;
+
+ if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_BIP_GMAC_128)
+ drv->capa.enc |= WPA_DRIVER_CAPA_ENC_BIP_GMAC_128;
+ if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_BIP_GMAC_256)
+ drv->capa.enc |= WPA_DRIVER_CAPA_ENC_BIP_GMAC_256;
+
+ /* TODO: NO_GROUP_ADDRESSED (WPA_DRIVER_CAPA_ENC_GTK_NOT_USED) support */
if (devcaps.dc_drivercaps & IEEE80211_C_HOSTAP)
drv->capa.flags |= WPA_DRIVER_FLAGS_AP;
-#undef IEEE80211_CIPHER_WEP
-#undef IEEE80211_CIPHER_TKIP
-#undef IEEE80211_CIPHER_AES_CCM
-#undef IEEE80211_CRYPTO_WEP
-#undef IEEE80211_CRYPTO_TKIP
-#undef IEEE80211_CRYPTO_AES_CCM
-#undef IEEE80211_C_HOSTAP
-#undef IEEE80211_C_WPA1
-#undef IEEE80211_C_WPA2
#else /* IEEE80211_IOC_DEVCAPS */
/* For now, assume TKIP, CCMP, WPA, WPA2 are supported */
drv->capa.key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA |

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 3:58 AM (57 m, 47 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14788949
Default Alt Text
D44922.id137587.diff (4 KB)

Event Timeline