Lines 1224-1230
wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params)
Link Here
|
1224 |
mode = 0 /* STA */; |
1224 |
mode = 0 /* STA */; |
1225 |
break; |
1225 |
break; |
1226 |
case IEEE80211_MODE_IBSS: |
1226 |
case IEEE80211_MODE_IBSS: |
|
|
1227 |
#if 0 |
1227 |
mode = IFM_IEEE80211_IBSS; |
1228 |
mode = IFM_IEEE80211_IBSS; |
|
|
1229 |
#endif |
1230 |
mode = IFM_IEEE80211_ADHOC; |
1228 |
break; |
1231 |
break; |
1229 |
case IEEE80211_MODE_AP: |
1232 |
case IEEE80211_MODE_AP: |
1230 |
mode = IFM_IEEE80211_HOSTAP; |
1233 |
mode = IFM_IEEE80211_HOSTAP; |
Lines 1271-1276
wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params)
Link Here
|
1271 |
params->wpa_ie[0] == WLAN_EID_RSN ? 2 : 1) < 0) |
1274 |
params->wpa_ie[0] == WLAN_EID_RSN ? 2 : 1) < 0) |
1272 |
return -1; |
1275 |
return -1; |
1273 |
|
1276 |
|
|
|
1277 |
/* |
1278 |
* NB: interface must be marked UP for association |
1279 |
* or scanning (ap_scan=2) |
1280 |
*/ |
1281 |
if (bsd_get_iface_flags(drv) < 0) |
1282 |
return -1; |
1283 |
|
1274 |
os_memset(&mlme, 0, sizeof(mlme)); |
1284 |
os_memset(&mlme, 0, sizeof(mlme)); |
1275 |
mlme.im_op = IEEE80211_MLME_ASSOC; |
1285 |
mlme.im_op = IEEE80211_MLME_ASSOC; |
1276 |
if (params->ssid != NULL) |
1286 |
if (params->ssid != NULL) |
Lines 1489-1494
static int wpa_driver_bsd_capa(struct bsd_driver_data *drv)
Link Here
|
1489 |
if (devcaps.dc_drivercaps & IEEE80211_C_WPA2) |
1499 |
if (devcaps.dc_drivercaps & IEEE80211_C_WPA2) |
1490 |
drv->capa.key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA2 | |
1500 |
drv->capa.key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA2 | |
1491 |
WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK; |
1501 |
WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK; |
|
|
1502 |
#ifdef __FreeBSD__ |
1503 |
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 | |
1504 |
WPA_DRIVER_CAPA_ENC_WEP104 | |
1505 |
WPA_DRIVER_CAPA_ENC_TKIP | |
1506 |
WPA_DRIVER_CAPA_ENC_CCMP; |
1507 |
#else |
1508 |
/* |
1509 |
* XXX |
1510 |
* FreeBSD exports hardware cryptocaps. These have no meaning for wpa |
1511 |
* since net80211 performs software crypto. |
1512 |
*/ |
1492 |
|
1513 |
|
1493 |
if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_WEP) |
1514 |
if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_WEP) |
1494 |
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 | |
1515 |
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 | |
Lines 1497-1502
static int wpa_driver_bsd_capa(struct bsd_driver_data *drv)
Link Here
|
1497 |
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP; |
1518 |
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP; |
1498 |
if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_CCM) |
1519 |
if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_CCM) |
1499 |
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP; |
1520 |
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP; |
|
|
1521 |
#endif |
1500 |
|
1522 |
|
1501 |
if (devcaps.dc_drivercaps & IEEE80211_C_HOSTAP) |
1523 |
if (devcaps.dc_drivercaps & IEEE80211_C_HOSTAP) |
1502 |
drv->capa.flags |= WPA_DRIVER_FLAGS_AP; |
1524 |
drv->capa.flags |= WPA_DRIVER_FLAGS_AP; |
Lines 1549-1554
get80211opmode(struct bsd_driver_data *drv)
Link Here
|
1549 |
} |
1571 |
} |
1550 |
if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) |
1572 |
if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) |
1551 |
return IEEE80211_M_HOSTAP; |
1573 |
return IEEE80211_M_HOSTAP; |
|
|
1574 |
if (ifmr.ifm_current & IFM_IEEE80211_IBSS) |
1575 |
return IEEE80211_M_IBSS; |
1552 |
if (ifmr.ifm_current & IFM_IEEE80211_MONITOR) |
1576 |
if (ifmr.ifm_current & IFM_IEEE80211_MONITOR) |
1553 |
return IEEE80211_M_MONITOR; |
1577 |
return IEEE80211_M_MONITOR; |
1554 |
#ifdef IEEE80211_M_MBSS |
1578 |
#ifdef IEEE80211_M_MBSS |