2008-11-23 18:34:26 +01:00
|
|
|
/*
|
|
|
|
* Wi-Fi Protected Setup - device attributes
|
|
|
|
* Copyright (c) 2008, Jouni Malinen <j@w1.fi>
|
|
|
|
*
|
2012-02-11 15:46:35 +01:00
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
2008-11-23 18:34:26 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WPS_DEV_ATTR_H
|
|
|
|
#define WPS_DEV_ATTR_H
|
|
|
|
|
|
|
|
struct wps_parse_attr;
|
|
|
|
|
2009-12-23 00:10:25 +01:00
|
|
|
int wps_build_manufacturer(struct wps_device_data *dev, struct wpabuf *msg);
|
|
|
|
int wps_build_model_name(struct wps_device_data *dev, struct wpabuf *msg);
|
|
|
|
int wps_build_model_number(struct wps_device_data *dev, struct wpabuf *msg);
|
2013-02-15 16:07:28 +01:00
|
|
|
int wps_build_serial_number(struct wps_device_data *dev, struct wpabuf *msg);
|
2009-12-23 00:10:25 +01:00
|
|
|
int wps_build_dev_name(struct wps_device_data *dev, struct wpabuf *msg);
|
2008-11-23 18:34:26 +01:00
|
|
|
int wps_build_device_attrs(struct wps_device_data *dev, struct wpabuf *msg);
|
|
|
|
int wps_build_os_version(struct wps_device_data *dev, struct wpabuf *msg);
|
2012-04-03 23:08:57 +02:00
|
|
|
int wps_build_vendor_ext_m1(struct wps_device_data *dev, struct wpabuf *msg);
|
2013-08-25 09:55:53 +02:00
|
|
|
int wps_build_rf_bands(struct wps_device_data *dev, struct wpabuf *msg,
|
|
|
|
u8 rf_band);
|
2008-11-28 18:29:22 +01:00
|
|
|
int wps_build_primary_dev_type(struct wps_device_data *dev,
|
|
|
|
struct wpabuf *msg);
|
2011-03-17 10:09:49 +01:00
|
|
|
int wps_build_secondary_dev_type(struct wps_device_data *dev,
|
|
|
|
struct wpabuf *msg);
|
2010-07-18 23:30:24 +02:00
|
|
|
int wps_build_dev_name(struct wps_device_data *dev, struct wpabuf *msg);
|
2008-11-23 18:34:26 +01:00
|
|
|
int wps_process_device_attrs(struct wps_device_data *dev,
|
|
|
|
struct wps_parse_attr *attr);
|
|
|
|
int wps_process_os_version(struct wps_device_data *dev, const u8 *ver);
|
hostapd: Support Multi-AP backhaul STA onboarding with WPS
The Wi-Fi Alliance Multi-AP Specification v1.0 allows onboarding of a
backhaul STA through WPS. To enable this, the WPS Registrar offers a
different set of credentials (backhaul credentials instead of fronthaul
credentials) when the Multi-AP subelement is present in the WFA vendor
extension element of the WSC M1 message.
Add new configuration options to specify the backhaul credentials for
the hostapd internal registrar: multi_ap_backhaul_ssid,
multi_ap_backhaul_wpa_psk, multi_ap_backhaul_wpa_passphrase. These are
only relevant for a fronthaul SSID, i.e., where multi_ap is set to 2 or
3. When these options are set, pass the backhaul credentials instead of
the normal credentials when the Multi-AP subelement is present.
Ignore the Multi-AP subelement if the backhaul config options are not
set. Note that for an SSID which is fronthaul and backhaul at the same
time (i.e., multi_ap == 3), this results in the correct credentials
being sent anyway.
The security to be used for the backaul BSS is fixed to WPA2PSK. The
Multi-AP Specification only allows Open and WPA2PSK networks to be
configured. Although not stated explicitly, the backhaul link is
intended to be always encrypted, hence WPA2PSK.
To build the credentials, the credential-building code is essentially
copied and simplified. Indeed, the backhaul credentials are always
WPA2PSK and never use per-device PSK. All the options set for the
fronthaul BSS WPS are simply ignored.
Signed-off-by: Davina Lu <ylu@quantenna.com>
Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Marianna Carrera <marianna.carrera.so@quantenna.com>
2019-02-12 15:35:26 +01:00
|
|
|
void wps_process_vendor_ext_m1(struct wps_device_data *dev, const u8 ext);
|
2008-11-29 11:59:43 +01:00
|
|
|
int wps_process_rf_bands(struct wps_device_data *dev, const u8 *bands);
|
2008-11-23 18:34:26 +01:00
|
|
|
void wps_device_data_free(struct wps_device_data *dev);
|
2011-03-19 10:44:42 +01:00
|
|
|
int wps_build_vendor_ext(struct wps_device_data *dev, struct wpabuf *msg);
|
2020-01-03 09:58:26 +01:00
|
|
|
int wps_build_application_ext(struct wps_device_data *dev, struct wpabuf *msg);
|
2011-03-19 11:57:46 +01:00
|
|
|
int wps_build_req_dev_type(struct wps_device_data *dev, struct wpabuf *msg,
|
|
|
|
unsigned int num_req_dev_types,
|
|
|
|
const u8 *req_dev_types);
|
2008-11-23 18:34:26 +01:00
|
|
|
|
|
|
|
#endif /* WPS_DEV_ATTR_H */
|