diff --git a/mlme/core/src/wlan_mlme_main.c b/mlme/core/src/wlan_mlme_main.c index c922c753db..b9043bb8c5 100644 --- a/mlme/core/src/wlan_mlme_main.c +++ b/mlme/core/src/wlan_mlme_main.c @@ -1848,6 +1848,11 @@ static void mlme_init_wps_params_cfg(struct wlan_objmgr_psoc *psoc, cfg_default(CFG_WPS_PIMARY_DEVICE_OUI); wps_params->wps_state = cfg_default(CFG_WPS_STATE); wps_params->wps_version = cfg_default(CFG_WPS_VERSION); + wps_params->wps_uuid.max_len = MLME_CFG_WPS_UUID_MAX_LEN; + qdf_uint8_array_parse(cfg_default(CFG_WPS_UUID), + wps_params->wps_uuid.data, + MLME_CFG_WPS_UUID_MAX_LEN, + &wps_params->wps_uuid.len); } static void mlme_init_btm_cfg(struct wlan_mlme_btm *btm) diff --git a/mlme/dispatcher/inc/cfg_mlme_wps_params.h b/mlme/dispatcher/inc/cfg_mlme_wps_params.h index 66fa6efb4f..43a093503a 100644 --- a/mlme/dispatcher/inc/cfg_mlme_wps_params.h +++ b/mlme/dispatcher/inc/cfg_mlme_wps_params.h @@ -87,6 +87,16 @@ CFG_VALUE_OR_DEFAULT, \ "wps device password id") +#define WPS_UUID_DEF_STR "0xa, 0xb, 0xc, 0xd, 0xe, 0xf" +#define WPS_UUID_DEF_LEN (sizeof(WPS_UUID_DEF_STR) - 1) + +#define CFG_WPS_UUID CFG_STRING( \ + "wps_uuid", \ + 0, \ + WPS_UUID_DEF_LEN, \ + WPS_UUID_DEF_STR, \ + "wps uuid") + #define CFG_WPS_ALL \ CFG(CFG_WPS_ENABLE) \ CFG(CFG_WPS_STATE) \ @@ -95,7 +105,8 @@ CFG(CFG_WPS_PRIMARY_DEVICE_CATEGORY) \ CFG(CFG_WPS_PIMARY_DEVICE_OUI) \ CFG(CFG_WPS_DEVICE_SUB_CATEGORY) \ - CFG(CFG_WPS_DEVICE_PASSWORD_ID) + CFG(CFG_WPS_DEVICE_PASSWORD_ID) \ + CFG(CFG_WPS_UUID) #endif /* __CFG_MLME_WPS_PARAMS_H */ diff --git a/mlme/dispatcher/inc/wlan_mlme_api.h b/mlme/dispatcher/inc/wlan_mlme_api.h index cdbe3acffa..0d4035bafd 100644 --- a/mlme/dispatcher/inc/wlan_mlme_api.h +++ b/mlme/dispatcher/inc/wlan_mlme_api.h @@ -2050,4 +2050,15 @@ QDF_STATUS wlan_mlme_override_bmps_imps(struct wlan_objmgr_psoc *psoc); QDF_STATUS wlan_mlme_is_imps_enabled(struct wlan_objmgr_psoc *psoc, bool *value); +/* + * wlan_mlme_get_wps_uuid() - get the wps uuid string + * @wps_params: pointer to mlme wps parameters structure + * @data: data to which the parameter is to be copied + * + * Return None + * + */ +void +wlan_mlme_get_wps_uuid(struct wlan_mlme_wps_params *wps_params, uint8_t *data); + #endif /* _WLAN_MLME_API_H_ */ diff --git a/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 8982212ac0..8067d4bfb1 100644 --- a/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -482,6 +482,7 @@ struct wlan_mlme_ht_caps { bool short_slot_time_enabled; }; +#define MLME_CFG_WPS_UUID_MAX_LEN 16 /* * struct wlan_mlme_wps_params - All wps based related cfg items * @@ -493,6 +494,7 @@ struct wlan_mlme_ht_caps { * @wps_primary_device_oui - primary device OUI * @wps_device_sub_category - device sub category * @wps_device_password_id - password id of device + * @wps_uuid - wps uuid to be sent in probe */ struct wlan_mlme_wps_params { uint8_t enable_wps; @@ -503,6 +505,7 @@ struct wlan_mlme_wps_params { uint32_t wps_primary_device_oui; uint16_t wps_device_sub_category; uint32_t wps_device_password_id; + struct mlme_cfg_str wps_uuid; }; #define MLME_CFG_LISTEN_INTERVAL 1 diff --git a/mlme/dispatcher/src/wlan_mlme_api.c b/mlme/dispatcher/src/wlan_mlme_api.c index 241ba24018..8b336092f9 100644 --- a/mlme/dispatcher/src/wlan_mlme_api.c +++ b/mlme/dispatcher/src/wlan_mlme_api.c @@ -3012,3 +3012,11 @@ QDF_STATUS wlan_mlme_override_bmps_imps(struct wlan_objmgr_psoc *psoc) return QDF_STATUS_SUCCESS; } + +void wlan_mlme_get_wps_uuid(struct wlan_mlme_wps_params *wps_params, + uint8_t *data) +{ + qdf_size_t len = wps_params->wps_uuid.len; + + wlan_mlme_get_cfg_str(data, &wps_params->wps_uuid, &len); +}