qcacld-3.0: Replace ServiceID with service_id

Removes cammel case.

Change-Id: I8107c9fa783bdec41468191315c901018f6fd05f
CRs-Fixed: 935297
This commit is contained in:
Houston Hoffman 2015-10-20 18:00:29 -07:00 • committed by Akash Patel
commit 7a39c0cb30
9 changed files with 62 additions and 55 deletions

View file

@ -424,7 +424,7 @@ int htt_htc_attach(struct htt_pdev_t *pdev)
#endif
/* connect to control service */
connect.ServiceID = HTT_DATA_MSG_SVC;
connect.service_id = HTT_DATA_MSG_SVC;
status = htc_connect_service(pdev->htc_pdev, &connect, &response);

View file

@ -333,7 +333,7 @@ A_STATUS htc_setup_target_buffer_assignments(HTC_TARGET *target)
*/
status = A_OK;
pEntry++;
pEntry->ServiceID = WMI_CONTROL_SVC;
pEntry->service_id = WMI_CONTROL_SVC;
pEntry->CreditAllocation = credits;
if (WLAN_IS_EPPING_ENABLED(cds_get_conparam())) {
@ -360,23 +360,23 @@ A_STATUS htc_setup_target_buffer_assignments(HTC_TARGET *target)
* BE and BK services to stress the bus so that the total credits
* are equally distributed to BE and BK services.
*/
pEntry->ServiceID = WMI_DATA_BE_SVC;
pEntry->service_id = WMI_DATA_BE_SVC;
pEntry->CreditAllocation = (credits >> 1);
pEntry++;
pEntry->ServiceID = WMI_DATA_BK_SVC;
pEntry->service_id = WMI_DATA_BK_SVC;
pEntry->CreditAllocation = (credits >> 1);
}
if (A_SUCCESS(status)) {
int i;
for (i = 0; i < HTC_MAX_SERVICE_ALLOC_ENTRIES; i++) {
if (target->ServiceTxAllocTable[i].ServiceID != 0) {
if (target->ServiceTxAllocTable[i].service_id != 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_INIT,
("HTC Service Index : %d TX : 0x%2.2X : alloc:%d \n",
("HTC Service Index : %d TX : 0x%2.2X : alloc:%d\n",
i,
target->ServiceTxAllocTable[i].
ServiceID,
service_id,
target->ServiceTxAllocTable[i].
CreditAllocation));
}
@ -386,13 +386,13 @@ A_STATUS htc_setup_target_buffer_assignments(HTC_TARGET *target)
return status;
}
A_UINT8 htc_get_credit_allocation(HTC_TARGET *target, A_UINT16 ServiceID)
A_UINT8 htc_get_credit_allocation(HTC_TARGET *target, A_UINT16 service_id)
{
A_UINT8 allocation = 0;
int i;
for (i = 0; i < HTC_MAX_SERVICE_ALLOC_ENTRIES; i++) {
if (target->ServiceTxAllocTable[i].ServiceID == ServiceID) {
if (target->ServiceTxAllocTable[i].service_id == service_id) {
allocation =
target->ServiceTxAllocTable[i].CreditAllocation;
}
@ -400,8 +400,8 @@ A_UINT8 htc_get_credit_allocation(HTC_TARGET *target, A_UINT16 ServiceID)
if (0 == allocation) {
AR_DEBUG_PRINTF(ATH_DEBUG_INIT,
("HTC Service TX : 0x%2.2X : allocation is zero! \n",
ServiceID));
("HTC Service TX : 0x%2.2X : allocation is zero!\n",
service_id));
}
return allocation;
@ -490,7 +490,7 @@ A_STATUS htc_wait_target(HTC_HANDLE HTCHandle)
connect.EpCallbacks.EpTxComplete = htc_control_tx_complete;
connect.EpCallbacks.EpRecv = htc_control_rx_complete;
connect.MaxSendQueueDepth = NUM_CONTROL_TX_BUFFERS;
connect.ServiceID = HTC_CTRL_RSVD_SVC;
connect.service_id = HTC_CTRL_RSVD_SVC;
/* connect fake service */
status = htc_connect_service((HTC_HANDLE) target,
@ -517,7 +517,7 @@ static void reset_endpoint_states(HTC_TARGET *target)
for (i = ENDPOINT_0; i < ENDPOINT_MAX; i++) {
pEndpoint = &target->endpoint[i];
pEndpoint->ServiceID = 0;
pEndpoint->service_id = 0;
pEndpoint->MaxMsgLength = 0;
pEndpoint->MaxTxQueueDepth = 0;
pEndpoint->Id = i;
@ -692,23 +692,23 @@ void htc_dump_credit_states(HTC_HANDLE HTCHandle)
for (i = 0; i < ENDPOINT_MAX; i++) {
pEndpoint = &target->endpoint[i];
if (0 == pEndpoint->ServiceID) {
if (0 == pEndpoint->service_id)
continue;
}
AR_DEBUG_PRINTF(ATH_DEBUG_ANY,
("--- EP : %d ServiceID: 0x%X --------------\n",
pEndpoint->Id, pEndpoint->ServiceID));
("--- EP : %d service_id: 0x%X --------------\n",
pEndpoint->Id, pEndpoint->service_id));
AR_DEBUG_PRINTF(ATH_DEBUG_ANY,
(" TxCredits : %d \n",
(" TxCredits : %d\n",
pEndpoint->TxCredits));
AR_DEBUG_PRINTF(ATH_DEBUG_ANY,
(" TxCreditSize : %d \n",
(" TxCreditSize : %d\n",
pEndpoint->TxCreditSize));
AR_DEBUG_PRINTF(ATH_DEBUG_ANY,
(" TxCreditsPerMaxMsg : %d \n",
(" TxCreditsPerMaxMsg : %d\n",
pEndpoint->TxCreditsPerMaxMsg));
AR_DEBUG_PRINTF(ATH_DEBUG_ANY,
(" TxQueueDepth : %d \n",
(" TxQueueDepth : %d\n",
HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue)));
AR_DEBUG_PRINTF(ATH_DEBUG_ANY,
("----------------------------------------------------\n"));

View file

@ -163,7 +163,7 @@ typedef struct _HTC_EP_CALLBACKS {
/* service connection information */
typedef struct _HTC_SERVICE_CONNECT_REQ {
HTC_SERVICE_ID ServiceID; /* service ID to connect to */
HTC_SERVICE_ID service_id; /* service ID to connect to */
A_UINT16 ConnectionFlags; /* connection flags, see htc protocol definition */
A_UINT8 *pMetaData; /* ptr to optional service-specific meta-data */
A_UINT8 MetaDataLength; /* optional meta data length */
@ -189,7 +189,7 @@ typedef struct _HTC_SERVICE_CONNECT_RESP {
typedef struct _HTC_ENDPOINT_CREDIT_DIST {
struct _HTC_ENDPOINT_CREDIT_DIST *pNext;
struct _HTC_ENDPOINT_CREDIT_DIST *pPrev;
HTC_SERVICE_ID ServiceID; /* Service ID (set by HTC) */
HTC_SERVICE_ID service_id; /* Service ID (set by HTC) */
HTC_ENDPOINT_ID Endpoint; /* endpoint for this distribution struct (set by HTC) */
A_UINT32 DistFlags; /* distribution flags, distribution function can
set default activity using SET_EP_ACTIVE() macro */

View file

@ -96,8 +96,12 @@ typedef struct {
typedef struct _HTC_ENDPOINT {
HTC_ENDPOINT_ID Id;
HTC_SERVICE_ID ServiceID; /* service ID this endpoint is bound to
non-zero value means this endpoint is in use */
/* service ID this endpoint is bound to
* non-zero value means this endpoint is in use
*/
HTC_SERVICE_ID service_id;
HTC_EP_CALLBACKS EpCallBacks; /* callbacks associated with this endpoint */
HTC_PACKET_QUEUE TxQueue; /* HTC frame buffer TX queue */
int MaxTxQueueDepth; /* max depth of the TX queue before we need to
@ -135,7 +139,7 @@ typedef struct _HTC_ENDPOINT {
#endif
typedef struct {
A_UINT16 ServiceID;
A_UINT16 service_id;
A_UINT8 CreditAllocation;
} HTC_SERVICE_TX_CREDIT_ALLOCATION;
@ -233,7 +237,7 @@ void htc_recv_init(HTC_TARGET *target);
A_STATUS htc_wait_recv_ctrl_message(HTC_TARGET *target);
void htc_free_control_tx_packet(HTC_TARGET *target, HTC_PACKET *pPacket);
HTC_PACKET *htc_alloc_control_tx_packet(HTC_TARGET *target);
A_UINT8 htc_get_credit_allocation(HTC_TARGET *target, A_UINT16 ServiceID);
A_UINT8 htc_get_credit_allocation(HTC_TARGET *target, A_UINT16 service_id);
void htc_tx_resource_avail_handler(void *context, A_UINT8 pipeID);
void htc_control_rx_complete(void *Context, HTC_PACKET *pPacket);
void htc_process_credit_rpt(HTC_TARGET *target,

View file

@ -122,7 +122,7 @@ void htc_get_control_endpoint_tx_host_credits(HTC_HANDLE HTCHandle, int *credits
LOCK_HTC_TX(target);
for (i = 0; i < ENDPOINT_MAX; i++) {
pEndpoint = &target->endpoint[i];
if (pEndpoint->ServiceID == WMI_CONTROL_SVC) {
if (pEndpoint->service_id == WMI_CONTROL_SVC) {
*credits = pEndpoint->TxCredits;
break;
}
@ -689,7 +689,7 @@ void get_htc_send_packets_credit_based(HTC_TARGET *target,
/* tell the target we need credits ASAP! */
sendFlags |= HTC_FLAGS_NEED_CREDIT_UPDATE;
if (pEndpoint->ServiceID == WMI_CONTROL_SVC) {
if (pEndpoint->service_id == WMI_CONTROL_SVC) {
LOCK_HTC_CREDIT(target);
htc_credit_record(HTC_REQUEST_CREDIT,
pEndpoint->TxCredits,
@ -1135,8 +1135,8 @@ A_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueu
AR_DEBUG_ASSERT(pPacket->Endpoint < ENDPOINT_MAX);
pEndpoint = &target->endpoint[pPacket->Endpoint];
if (!pEndpoint->ServiceID) {
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("%s ServiceID is invalid\n",
if (!pEndpoint->service_id) {
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("%s service_id is invalid\n",
__func__));
return A_EINVAL;
}
@ -1648,7 +1648,7 @@ void htc_tx_resource_avail_handler(void *context, A_UINT8 pipeID)
for (i = 0; i < ENDPOINT_MAX; i++) {
pEndpoint = &target->endpoint[i];
if (pEndpoint->ServiceID != 0) {
if (pEndpoint->service_id != 0) {
if (pEndpoint->UL_PipeID == pipeID) {
break;
}
@ -1695,7 +1695,7 @@ void htc_flush_endpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint,
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
HTC_ENDPOINT *pEndpoint = &target->endpoint[Endpoint];
if (pEndpoint->ServiceID == 0) {
if (pEndpoint->service_id == 0) {
AR_DEBUG_ASSERT(false);
/* not in use.. */
return;
@ -1809,7 +1809,7 @@ void htc_process_credit_rpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt,
#else
pEndpoint->TxCredits += rpt_credits;
if (pEndpoint->ServiceID == WMI_CONTROL_SVC) {
if (pEndpoint->service_id == WMI_CONTROL_SVC) {
LOCK_HTC_CREDIT(target);
htc_credit_record(HTC_PROCESS_CREDIT_REPORT,
pEndpoint->TxCredits,
@ -1824,7 +1824,7 @@ void htc_process_credit_rpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt,
#ifdef ATH_11AC_TXCOMPACT
htc_try_send(target, pEndpoint, NULL);
#else
if (pEndpoint->ServiceID == HTT_DATA_MSG_SVC) {
if (pEndpoint->service_id == HTT_DATA_MSG_SVC) {
htc_send_data_pkt(target, NULL, 0);
} else {
htc_try_send(target, pEndpoint, NULL);

View file

@ -57,14 +57,14 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
A_UINT8 rsp_msg_status, rsp_msg_end_id, rsp_msg_serv_meta_len;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,
("+htc_connect_service, target:%p SvcID:0x%X \n", target,
pConnectReq->ServiceID));
("+htc_connect_service, target:%p SvcID:0x%X\n", target,
pConnectReq->service_id));
do {
AR_DEBUG_ASSERT(pConnectReq->ServiceID != 0);
AR_DEBUG_ASSERT(pConnectReq->service_id != 0);
if (HTC_CTRL_RSVD_SVC == pConnectReq->ServiceID) {
if (HTC_CTRL_RSVD_SVC == pConnectReq->service_id) {
/* special case for pseudo control service */
assignedEndpoint = ENDPOINT_0;
maxMsgSize = HTC_MAX_CONTROL_MESSAGE_LENGTH;
@ -72,13 +72,13 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
} else {
txAlloc =
htc_get_credit_allocation(target,
pConnectReq->ServiceID);
txAlloc = htc_get_credit_allocation(target,
pConnectReq->service_id);
if (!txAlloc) {
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,
("Service %d does not allocate target credits!\n",
pConnectReq->ServiceID));
pConnectReq->service_id));
}
/* allocate a packet to send to the target */
@ -117,7 +117,7 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
HTC_SET_FIELD(pConnectMsg, HTC_CONNECT_SERVICE_MSG,
MESSAGEID, HTC_MSG_CONNECT_SERVICE_ID);
HTC_SET_FIELD(pConnectMsg, HTC_CONNECT_SERVICE_MSG,
SERVICE_ID, pConnectReq->ServiceID);
SERVICE_ID, pConnectReq->service_id);
HTC_SET_FIELD(pConnectMsg, HTC_CONNECT_SERVICE_MSG,
CONNECTIONFLAGS, conn_flags);
@ -133,7 +133,7 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
#else
/* Only enable credit for WMI service */
if (!htc_credit_flow
&& pConnectReq->ServiceID != WMI_CONTROL_SVC) {
&& pConnectReq->service_id != WMI_CONTROL_SVC) {
disableCreditFlowCtrl = true;
}
#endif
@ -269,7 +269,7 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
pEndpoint = &target->endpoint[assignedEndpoint];
pEndpoint->Id = assignedEndpoint;
if (pEndpoint->ServiceID != 0) {
if (pEndpoint->service_id != 0) {
/* endpoint already in use! */
AR_DEBUG_ASSERT(false);
break;
@ -280,7 +280,8 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
pConnectResp->MaxMsgLength = maxMsgSize;
/* setup the endpoint */
pEndpoint->ServiceID = pConnectReq->ServiceID; /* this marks the endpoint in use */
/* service_id marks the endpoint in use */
pEndpoint->service_id = pConnectReq->service_id;
pEndpoint->MaxTxQueueDepth = pConnectReq->MaxSendQueueDepth;
pEndpoint->MaxMsgLength = maxMsgSize;
pEndpoint->TxCredits = txAlloc;
@ -300,7 +301,7 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
pEndpoint->EpCallBacks = pConnectReq->EpCallbacks;
status = hif_map_service_to_pipe(target->hif_dev,
pEndpoint->ServiceID,
pEndpoint->service_id,
&pEndpoint->UL_PipeID,
&pEndpoint->DL_PipeID,
&pEndpoint->ul_is_polled,
@ -321,14 +322,14 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
AR_DEBUG_PRINTF(ATH_DEBUG_SETUP,
("HTC Service:0x%4.4X, ULpipe:%d DLpipe:%d id:%d Ready\n",
pEndpoint->ServiceID, pEndpoint->UL_PipeID,
pEndpoint->service_id, pEndpoint->UL_PipeID,
pEndpoint->DL_PipeID, pEndpoint->Id));
if (disableCreditFlowCtrl && pEndpoint->TxCreditFlowEnabled) {
pEndpoint->TxCreditFlowEnabled = false;
AR_DEBUG_PRINTF(ATH_DEBUG_WARN,
("HTC Service:0x%4.4X ep:%d TX flow control disabled\n",
pEndpoint->ServiceID,
pEndpoint->service_id,
assignedEndpoint));
}

View file

@ -415,7 +415,7 @@ int epping_connect_service(epping_context_t *pEpping_ctx)
#endif
/* connect to service */
connect.ServiceID = WMI_DATA_BE_SVC;
connect.service_id = WMI_DATA_BE_SVC;
status = htc_connect_service(pEpping_ctx->HTCHandle, &connect, &response);
if (status != EOK) {
EPPING_LOG(CDF_TRACE_LEVEL_FATAL,
@ -429,7 +429,7 @@ int epping_connect_service(epping_context_t *pEpping_ctx)
pEpping_ctx->EppingEndpoint[0] = response.Endpoint;
#if defined(HIF_PCI) || defined(HIF_USB)
connect.ServiceID = WMI_DATA_BK_SVC;
connect.service_id = WMI_DATA_BK_SVC;
status = htc_connect_service(pEpping_ctx->HTCHandle, &connect, &response);
if (status != EOK) {
EPPING_LOG(CDF_TRACE_LEVEL_FATAL,

View file

@ -1300,7 +1300,7 @@ wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle,
wmi_htc_tx_complete /* ar6000_tx_queue_full */;
/* connect to control service */
connect.ServiceID = WMI_CONTROL_SVC;
connect.service_id = WMI_CONTROL_SVC;
if ((status =
htc_connect_service(htc_handle, &connect, &response)) != EOK) {

View file

@ -196,7 +196,8 @@ typedef PREPACK struct {
/* connect service
* direction : host-to-target */
typedef PREPACK struct {
A_UINT32 MessageID : 16, ServiceID : 16; /* service ID of the service to connect to */
/* service ID of the service to connect to */
A_UINT32 MessageID:16, service_id:16;
A_UINT32 ConnectionFlags : 16, /* connection flags */
#define HTC_CONNECT_FLAGS_REDUCE_CREDIT_DRIBBLE (1 << 2)
/* reduce credit dribbling when
@ -238,7 +239,8 @@ typedef PREPACK struct {
/* connect response
* direction : target-to-host */
typedef PREPACK struct {
A_UINT32 MessageID : 16, ServiceID : 16; /* service ID that the connection request was made */
/* service ID that the connection request was made */
A_UINT32 MessageID:16, service_id:16;
A_UINT32 Status : 8, /* service connection status */
EndpointID : 8, /* assigned endpoint ID */
MaxMsgSize : 16; /* maximum expected message size on this endpoint */