/* Function for validating AD structure content for a Bluetooth Carrier Configuration LE record. 
This function validates AD structure content. LE Bluetooth Device Address and LE Role fields are required. Security Manager Out Of Band Flags structure must not be included. */
static ret_code_t nfc_le_oob_adv_data_check(ble_advdata_t const *const p_ble_advdata)
/* Function for validating AD structure content for a Bluetooth Carrier Configuration LE record. 
This function validates AD structure content. LE Bluetooth Device Address and LE Role fields are required. Security Manager Out Of Band Flags structure must not be included. */
static ret_code_t nfc_le_oob_adv_data_check(ble_advdata_t const *const p_ble_advdata)
{
    if((false == p_ble_advdata->include_ble_device_addr)        ||
       (BLE_ADVDATA_ROLE_NOT_PRESENT == p_ble_advdata->le_role) ||
       (NULL != p_ble_advdata->p_sec_mgr_oob_flags))
    {
        return NRF_ERROR_INVALID_PARAM;
    }
    if ((0 != p_ble_advdata->flags) &&
            ((p_ble_advdata->flags & BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED) == 0))
    {
        return NRF_ERROR_INVALID_PARAM;
    }
    return NRF_SUCCESS;
}