wpa: Restore missing patch
In December after a failed MFV due to a now understood issue I had with
git -- git aborts with extremely large MFV -- this patch was removed
during the revert. Restore this patch.
PR: 264238
Fixes: 4b72b91a71
MFC after: 1 week
This commit is contained in:
parent
f2c88ed6ba
commit
3b29567810
@ -1224,7 +1224,10 @@ wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params)
|
|||||||
mode = 0 /* STA */;
|
mode = 0 /* STA */;
|
||||||
break;
|
break;
|
||||||
case IEEE80211_MODE_IBSS:
|
case IEEE80211_MODE_IBSS:
|
||||||
|
#if 0
|
||||||
mode = IFM_IEEE80211_IBSS;
|
mode = IFM_IEEE80211_IBSS;
|
||||||
|
#endif
|
||||||
|
mode = IFM_IEEE80211_ADHOC;
|
||||||
break;
|
break;
|
||||||
case IEEE80211_MODE_AP:
|
case IEEE80211_MODE_AP:
|
||||||
mode = IFM_IEEE80211_HOSTAP;
|
mode = IFM_IEEE80211_HOSTAP;
|
||||||
@ -1271,6 +1274,13 @@ wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params)
|
|||||||
params->wpa_ie[0] == WLAN_EID_RSN ? 2 : 1) < 0)
|
params->wpa_ie[0] == WLAN_EID_RSN ? 2 : 1) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NB: interface must be marked UP for association
|
||||||
|
* or scanning (ap_scan=2)
|
||||||
|
*/
|
||||||
|
if (bsd_get_iface_flags(drv) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
os_memset(&mlme, 0, sizeof(mlme));
|
os_memset(&mlme, 0, sizeof(mlme));
|
||||||
mlme.im_op = IEEE80211_MLME_ASSOC;
|
mlme.im_op = IEEE80211_MLME_ASSOC;
|
||||||
if (params->ssid != NULL)
|
if (params->ssid != NULL)
|
||||||
@ -1489,6 +1499,17 @@ static int wpa_driver_bsd_capa(struct bsd_driver_data *drv)
|
|||||||
if (devcaps.dc_drivercaps & IEEE80211_C_WPA2)
|
if (devcaps.dc_drivercaps & IEEE80211_C_WPA2)
|
||||||
drv->capa.key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA2 |
|
drv->capa.key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA2 |
|
||||||
WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK;
|
WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK;
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 |
|
||||||
|
WPA_DRIVER_CAPA_ENC_WEP104 |
|
||||||
|
WPA_DRIVER_CAPA_ENC_TKIP |
|
||||||
|
WPA_DRIVER_CAPA_ENC_CCMP;
|
||||||
|
#else
|
||||||
|
/*
|
||||||
|
* XXX
|
||||||
|
* FreeBSD exports hardware cryptocaps. These have no meaning for wpa
|
||||||
|
* since net80211 performs software crypto.
|
||||||
|
*/
|
||||||
|
|
||||||
if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_WEP)
|
if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_WEP)
|
||||||
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 |
|
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 |
|
||||||
@ -1497,6 +1518,7 @@ static int wpa_driver_bsd_capa(struct bsd_driver_data *drv)
|
|||||||
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP;
|
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP;
|
||||||
if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_CCM)
|
if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_CCM)
|
||||||
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP;
|
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (devcaps.dc_drivercaps & IEEE80211_C_HOSTAP)
|
if (devcaps.dc_drivercaps & IEEE80211_C_HOSTAP)
|
||||||
drv->capa.flags |= WPA_DRIVER_FLAGS_AP;
|
drv->capa.flags |= WPA_DRIVER_FLAGS_AP;
|
||||||
@ -1549,6 +1571,8 @@ get80211opmode(struct bsd_driver_data *drv)
|
|||||||
}
|
}
|
||||||
if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP)
|
if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP)
|
||||||
return IEEE80211_M_HOSTAP;
|
return IEEE80211_M_HOSTAP;
|
||||||
|
if (ifmr.ifm_current & IFM_IEEE80211_IBSS)
|
||||||
|
return IEEE80211_M_IBSS;
|
||||||
if (ifmr.ifm_current & IFM_IEEE80211_MONITOR)
|
if (ifmr.ifm_current & IFM_IEEE80211_MONITOR)
|
||||||
return IEEE80211_M_MONITOR;
|
return IEEE80211_M_MONITOR;
|
||||||
#ifdef IEEE80211_M_MBSS
|
#ifdef IEEE80211_M_MBSS
|
||||||
|
Loading…
Reference in New Issue
Block a user