/* pan roles */
#define BTA_PAN_ROLE_PANU PAN_ROLE_CLIENT
-#define BTA_PAN_ROLE_GN PAN_ROLE_GN_SERVER
#define BTA_PAN_ROLE_NAP PAN_ROLE_NAP_SERVER
typedef uint8_t tBTA_PAN_ROLE;
if (src_role == PAN_ROLE_CLIENT)
p_scb->app_id = bta_pan_cb.app_id[0];
- else if (src_role == PAN_ROLE_GN_SERVER)
- p_scb->app_id = bta_pan_cb.app_id[1];
else if (src_role == PAN_ROLE_NAP_SERVER)
p_scb->app_id = bta_pan_cb.app_id[2];
} else if ((state != PAN_SUCCESS) && !is_role_change) {
else
bta_sys_remove_uuid(UUID_SERVCLASS_NAP);
- if (p_data->api_set_role.role & PAN_ROLE_GN_SERVER)
- bta_sys_add_uuid(UUID_SERVCLASS_GN);
- else
- bta_sys_remove_uuid(UUID_SERVCLASS_GN);
-
if (p_data->api_set_role.role & PAN_ROLE_CLIENT)
bta_sys_add_uuid(UUID_SERVCLASS_PANU);
else
#define PAN_SUPPORTS_ROLE_PANU TRUE
#endif
-/* This will enable the GN role */
-#ifndef PAN_SUPPORTS_ROLE_GN
-#define PAN_SUPPORTS_ROLE_GN TRUE
-#endif
-
/* This will enable the NAP role */
#ifndef PAN_SUPPORTS_ROLE_NAP
#define PAN_SUPPORTS_ROLE_NAP TRUE
#define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
#endif
-/* Default service name for GN role */
-#ifndef PAN_GN_DEFAULT_SERVICE_NAME
-#define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
-#endif
-
/* Default service name for PANU role */
#ifndef PAN_PANU_DEFAULT_SERVICE_NAME
#define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
#define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
#endif
-/* Default description for GN role service */
-#ifndef PAN_GN_DEFAULT_DESCRIPTION
-#define PAN_GN_DEFAULT_DESCRIPTION "GN"
-#endif
-
/* Default description for PANU role service */
#ifndef PAN_PANU_DEFAULT_DESCRIPTION
#define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
/* Bit map for PAN roles */
#define PAN_ROLE_CLIENT 0x01 /* PANU role */
-#define PAN_ROLE_GN_SERVER 0x02 /* GN role */
#define PAN_ROLE_NAP_SERVER 0x04 /* NAP role */
/* Bitmap to indicate the usage of the Data */
*
* Parameters: role - is bit map of roles to be active
* PAN_ROLE_CLIENT is for PANU role
- * PAN_ROLE_GN_SERVER is for GN role
* PAN_ROLE_NAP_SERVER is for NAP role
* sec_mask - Security mask for different roles
* It is array of uint8_t. The bytes
* src_role - Role of the local device for the connection
* dst_role - Role of the remote device for the connection
* PAN_ROLE_CLIENT is for PANU role
- * PAN_ROLE_GN_SERVER is for GN role
* PAN_ROLE_NAP_SERVER is for NAP role
* *handle - Pointer for returning Handle to the connection
*
*
* Parameters: role - is bit map of roles to be active
* PAN_ROLE_CLIENT is for PANU role
- * PAN_ROLE_GN_SERVER is for GN role
* PAN_ROLE_NAP_SERVER is for NAP role
* p_user_name - Service name for PANU role
* p_gn_name - Service name for GN role
const char* p_desc;
/* If the role is not a valid combination reject it */
- if ((!(role &
- (PAN_ROLE_CLIENT | PAN_ROLE_GN_SERVER | PAN_ROLE_NAP_SERVER))) &&
+ if ((!(role & (PAN_ROLE_CLIENT | PAN_ROLE_NAP_SERVER))) &&
role != PAN_ROLE_INACTIVE) {
PAN_TRACE_ERROR("PAN role %d is invalid", role);
return PAN_FAILURE;
}
#endif
-#if (PAN_SUPPORTS_ROLE_GN == TRUE)
- if (role & PAN_ROLE_GN_SERVER) {
- /* Check the service name */
- if ((p_gn_name == NULL) || (*p_gn_name == 0))
- p_gn_name = PAN_GN_DEFAULT_SERVICE_NAME;
-
- /* Registering for GN service with SDP */
- p_desc = PAN_GN_DEFAULT_DESCRIPTION;
-
- if (pan_cb.pan_gn_sdp_handle != 0)
- SDP_DeleteRecord(pan_cb.pan_gn_sdp_handle);
-
- pan_cb.pan_gn_sdp_handle =
- pan_register_with_sdp(UUID_SERVCLASS_GN, p_gn_name, p_desc);
- bta_sys_add_uuid(UUID_SERVCLASS_GN);
- }
- /* If the GN role is already active and now being cleared delete the record */
- else if (pan_cb.role & PAN_ROLE_GN_SERVER) {
- if (pan_cb.pan_gn_sdp_handle != 0) {
- SDP_DeleteRecord(pan_cb.pan_gn_sdp_handle);
- pan_cb.pan_gn_sdp_handle = 0;
- bta_sys_remove_uuid(UUID_SERVCLASS_GN);
- }
- }
-#endif
-
#if (PAN_SUPPORTS_ROLE_PANU == TRUE)
if (role & PAN_ROLE_CLIENT) {
/* Check the service name */
* src_role - Role of the local device for the connection
* dst_role - Role of the remote device for the connection
* PAN_ROLE_CLIENT is for PANU role
- * PAN_ROLE_GN_SERVER is for GN role
* PAN_ROLE_NAP_SERVER is for NAP role
* *handle - Pointer for returning Handle to the connection
*
}
/* Validate the parameters before proceeding */
- if ((src_role != PAN_ROLE_CLIENT && src_role != PAN_ROLE_GN_SERVER &&
- src_role != PAN_ROLE_NAP_SERVER) ||
- (dst_role != PAN_ROLE_CLIENT && dst_role != PAN_ROLE_GN_SERVER &&
- dst_role != PAN_ROLE_NAP_SERVER)) {
+ if ((src_role != PAN_ROLE_CLIENT && src_role != PAN_ROLE_NAP_SERVER) ||
+ (dst_role != PAN_ROLE_CLIENT && dst_role != PAN_ROLE_NAP_SERVER)) {
PAN_TRACE_ERROR("Either source %d or destination role %d is invalid",
src_role, dst_role);
return PAN_FAILURE;
src_uuid = UUID_SERVCLASS_PANU;
if (dst_role == PAN_ROLE_CLIENT) {
dst_uuid = UUID_SERVCLASS_PANU;
- } else if (dst_role == PAN_ROLE_GN_SERVER) {
- dst_uuid = UUID_SERVCLASS_GN;
} else {
dst_uuid = UUID_SERVCLASS_NAP;
}
}
dst_uuid = UUID_SERVCLASS_PANU;
- if (src_role == PAN_ROLE_GN_SERVER) {
- src_uuid = UUID_SERVCLASS_GN;
- } else {
- src_uuid = UUID_SERVCLASS_NAP;
- }
+ src_uuid = UUID_SERVCLASS_NAP;
mx_chan_id = src_uuid;
}
/* The role combination is not valid */
/* Requested destination role is */
if (local_uuid16 == UUID_SERVCLASS_PANU)
req_role = PAN_ROLE_CLIENT;
- else if (local_uuid16 == UUID_SERVCLASS_GN)
- req_role = PAN_ROLE_GN_SERVER;
else
req_role = PAN_ROLE_NAP_SERVER;
/* Requested destination role is */
if (pcb->src_uuid == UUID_SERVCLASS_PANU)
pan_cb.active_role = PAN_ROLE_CLIENT;
- else if (pcb->src_uuid == UUID_SERVCLASS_GN)
- pan_cb.active_role = PAN_ROLE_GN_SERVER;
else
pan_cb.active_role = PAN_ROLE_NAP_SERVER;
if (pcb->dst_uuid == UUID_SERVCLASS_PANU)
peer_role = PAN_ROLE_CLIENT;
- else if (pcb->dst_uuid == UUID_SERVCLASS_GN)
- peer_role = PAN_ROLE_GN_SERVER;
else
peer_role = PAN_ROLE_NAP_SERVER;