OWE: Transition mode with non-AP-MLME
Add OWE Transition IE in build_ap_extra() ies to support drivers that do not use hostapd MLME. Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
This commit is contained in:
parent
92b6e0c582
commit
18e3e9c6e0
4 changed files with 71 additions and 61 deletions
|
@ -364,67 +364,6 @@ static u8 * hostapd_eid_supported_op_classes(struct hostapd_data *hapd, u8 *eid)
|
|||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_OWE
|
||||
static int hostapd_eid_owe_trans_enabled(struct hostapd_data *hapd)
|
||||
{
|
||||
return hapd->conf->owe_transition_ssid_len > 0 &&
|
||||
!is_zero_ether_addr(hapd->conf->owe_transition_bssid);
|
||||
}
|
||||
#endif /* CONFIG_OWE */
|
||||
|
||||
|
||||
static size_t hostapd_eid_owe_trans_len(struct hostapd_data *hapd)
|
||||
{
|
||||
#ifdef CONFIG_OWE
|
||||
if (!hostapd_eid_owe_trans_enabled(hapd))
|
||||
return 0;
|
||||
return 6 + ETH_ALEN + 1 + hapd->conf->owe_transition_ssid_len;
|
||||
#else /* CONFIG_OWE */
|
||||
return 0;
|
||||
#endif /* CONFIG_OWE */
|
||||
}
|
||||
|
||||
|
||||
static u8 * hostapd_eid_owe_trans(struct hostapd_data *hapd, u8 *eid,
|
||||
size_t len)
|
||||
{
|
||||
#ifdef CONFIG_OWE
|
||||
u8 *pos = eid;
|
||||
size_t elen;
|
||||
|
||||
if (hapd->conf->owe_transition_ifname[0] &&
|
||||
!hostapd_eid_owe_trans_enabled(hapd))
|
||||
hostapd_owe_trans_get_info(hapd);
|
||||
|
||||
if (!hostapd_eid_owe_trans_enabled(hapd))
|
||||
return pos;
|
||||
|
||||
elen = hostapd_eid_owe_trans_len(hapd);
|
||||
if (len < elen) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"OWE: Not enough room in the buffer for OWE IE");
|
||||
return pos;
|
||||
}
|
||||
|
||||
*pos++ = WLAN_EID_VENDOR_SPECIFIC;
|
||||
*pos++ = elen - 2;
|
||||
WPA_PUT_BE24(pos, OUI_WFA);
|
||||
pos += 3;
|
||||
*pos++ = OWE_OUI_TYPE;
|
||||
os_memcpy(pos, hapd->conf->owe_transition_bssid, ETH_ALEN);
|
||||
pos += ETH_ALEN;
|
||||
*pos++ = hapd->conf->owe_transition_ssid_len;
|
||||
os_memcpy(pos, hapd->conf->owe_transition_ssid,
|
||||
hapd->conf->owe_transition_ssid_len);
|
||||
pos += hapd->conf->owe_transition_ssid_len;
|
||||
|
||||
return pos;
|
||||
#else /* CONFIG_OWE */
|
||||
return eid;
|
||||
#endif /* CONFIG_OWE */
|
||||
}
|
||||
|
||||
|
||||
static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
|
||||
const struct ieee80211_mgmt *req,
|
||||
int is_p2p, size_t *resp_len)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue