mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
Import bsd_configure_wpa() to sync with upstream code.
This commit is contained in:
parent
916753954d
commit
5db98cc304
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216536
1 changed files with 12 additions and 1 deletions
|
@ -263,6 +263,17 @@ bsd_set_key(const char *ifname, void *priv, enum wpa_alg alg,
|
|||
return set80211var(priv, IEEE80211_IOC_WPAKEY, &wk, sizeof(wk));
|
||||
}
|
||||
|
||||
static int
|
||||
bsd_configure_wpa(void *priv, struct wpa_bss_params *params)
|
||||
{
|
||||
wpa_printf(MSG_DEBUG, "%s: enable WPA= 0x%x", __func__, params->wpa);
|
||||
if (set80211param(priv, IEEE80211_IOC_WPA, params->wpa)) {
|
||||
printf("Unable to set WPA to %u\n", params->wpa);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
bsd_set_ieee8021x(void *priv, struct wpa_bss_params *params)
|
||||
{
|
||||
|
@ -278,7 +289,7 @@ bsd_set_ieee8021x(void *priv, struct wpa_bss_params *params)
|
|||
__func__);
|
||||
return -1;
|
||||
}
|
||||
if (params->wpa && set80211param(priv,IEEE80211_IOC_WPA, params->wpa)) {
|
||||
if (params->wpa && bsd_configure_wpa(priv, params) != 0) {
|
||||
wpa_printf(MSG_ERROR, "%s: Failed to configure WPA state",
|
||||
__func__);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue