| Index: chromeos/drivers/ath6kl/htc2/htc_send.c
|
| diff --git a/chromeos/drivers/ath6kl/htc2/htc_send.c b/chromeos/drivers/ath6kl/htc2/htc_send.c
|
| index 13eef67aaeaf3c6240f2509da16c04ec4cd0817f..bc7ee78482634d9b9264d6a2e0dfc261c1d45b45 100644
|
| --- a/chromeos/drivers/ath6kl/htc2/htc_send.c
|
| +++ b/chromeos/drivers/ath6kl/htc2/htc_send.c
|
| @@ -1,15 +1,19 @@
|
| //------------------------------------------------------------------------------
|
| // <copyright file="htc_send.c" company="Atheros">
|
| -// Copyright (c) 2007-2008 Atheros Corporation. All rights reserved.
|
| +// Copyright (c) 2007-2010 Atheros Corporation. All rights reserved.
|
| //
|
| -// This program is free software; you can redistribute it and/or modify
|
| -// it under the terms of the GNU General Public License version 2 as
|
| -// published by the Free Software Foundation;
|
| //
|
| -// Software distributed under the License is distributed on an "AS
|
| -// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
| -// implied. See the License for the specific language governing
|
| -// rights and limitations under the License.
|
| +// Permission to use, copy, modify, and/or distribute this software for any
|
| +// purpose with or without fee is hereby granted, provided that the above
|
| +// copyright notice and this permission notice appear in all copies.
|
| +//
|
| +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
| +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
| +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
| +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
| +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
| +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
| +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
| //
|
| //
|
| //------------------------------------------------------------------------------
|
| @@ -29,11 +33,11 @@ typedef enum _HTC_SEND_QUEUE_RESULT {
|
| #define DO_DISTRIBUTION(t,reason,description,pList) \
|
| { \
|
| AR_DEBUG_PRINTF(ATH_DEBUG_SEND, \
|
| - (" calling distribute function (%s) (dfn:0x%X, ctxt:0x%X, dist:0x%X) \n", \
|
| + (" calling distribute function (%s) (dfn:0x%lX, ctxt:0x%lX, dist:0x%lX) \n", \
|
| (description), \
|
| - (A_UINT32)(t)->DistributeCredits, \
|
| - (A_UINT32)(t)->pCredDistContext, \
|
| - (A_UINT32)pList)); \
|
| + (unsigned long)(t)->DistributeCredits, \
|
| + (unsigned long)(t)->pCredDistContext, \
|
| + (unsigned long)pList)); \
|
| (t)->DistributeCredits((t)->pCredDistContext, \
|
| (pList), \
|
| (reason)); \
|
| @@ -62,8 +66,8 @@ static void DoSendCompletion(HTC_ENDPOINT *pEndpoint,
|
| /* using legacy EpTxComplete */
|
| do {
|
| pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate);
|
| - AR_DEBUG_PRINTF(ATH_DEBUG_SEND, (" HTC calling ep %d send complete callback on packet 0x%X \n", \
|
| - pEndpoint->Id, (A_UINT32)(pPacket)));
|
| + AR_DEBUG_PRINTF(ATH_DEBUG_SEND, (" HTC calling ep %d send complete callback on packet 0x%lX \n", \
|
| + pEndpoint->Id, (unsigned long)(pPacket)));
|
| pEndpoint->EpCallBacks.EpTxComplete(pEndpoint->EpCallBacks.pContext, pPacket);
|
| } while (!HTC_QUEUE_EMPTY(pQueueToIndicate));
|
| }
|
| @@ -121,7 +125,7 @@ A_STATUS HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket)
|
|
|
| AR_DEBUG_PRINTF(ATH_DEBUG_SEND,
|
| ("+-HTCIssueSend: transmit length : %d (%s) \n",
|
| - pPacket->ActualLength + HTC_HDR_LENGTH,
|
| + pPacket->ActualLength + (A_UINT32)HTC_HDR_LENGTH,
|
| sync ? "SYNC" : "ASYNC" ));
|
|
|
| /* send message to device */
|
| @@ -165,8 +169,8 @@ static INLINE void GetHTCSendPackets(HTC_TARGET *target,
|
| break;
|
| }
|
|
|
| - AR_DEBUG_PRINTF(ATH_DEBUG_SEND,(" Got head packet:0x%X , Queue Depth: %d\n",
|
| - (A_UINT32)pPacket, HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue)));
|
| + AR_DEBUG_PRINTF(ATH_DEBUG_SEND,(" Got head packet:0x%lX , Queue Depth: %d\n",
|
| + (unsigned long)pPacket, HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue)));
|
|
|
| transferLength = DEV_CALC_SEND_PADDED_LEN(&target->Device, pPacket->ActualLength + HTC_HDR_LENGTH);
|
|
|
| @@ -421,8 +425,8 @@ static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint,
|
| pScatterReq->TotalLength += transferLength;
|
| pScatterReq->ValidScatterEntries++;
|
| packetsInScatterReq++;
|
| - AR_DEBUG_PRINTF(ATH_DEBUG_SEND,(" %d, Adding packet : 0x%X, len:%d (remaining space:%d) \n",
|
| - i, (A_UINT32)pPacket,transferLength,scatterSpaceRemaining));
|
| + AR_DEBUG_PRINTF(ATH_DEBUG_SEND,(" %d, Adding packet : 0x%lX, len:%d (remaining space:%d) \n",
|
| + i, (unsigned long)pPacket,transferLength,scatterSpaceRemaining));
|
| }
|
|
|
| if (packetsInScatterReq >= HTC_MIN_HTC_MSGS_TO_BUNDLE) {
|
| @@ -484,8 +488,8 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
|
| int overflow;
|
| HTC_SEND_QUEUE_RESULT result = HTC_SEND_QUEUE_OK;
|
|
|
| - AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HTCTrySend (Queue:0x%X Depth:%d)\n",
|
| - (A_UINT32)pCallersSendQueue,
|
| + AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HTCTrySend (Queue:0x%lX Depth:%d)\n",
|
| + (unsigned long)pCallersSendQueue,
|
| (pCallersSendQueue == NULL) ? 0 : HTC_PACKET_QUEUE_DEPTH(pCallersSendQueue)));
|
|
|
| /* init the local send queue */
|
| @@ -544,8 +548,8 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
|
| /* walk through the caller's queue and indicate each one to the send full handler */
|
| ITERATE_OVER_LIST_ALLOW_REMOVE(&pCallersSendQueue->QueueHead, pPacket, HTC_PACKET, ListLink) {
|
|
|
| - AR_DEBUG_PRINTF(ATH_DEBUG_SEND, (" Indicating overflowed TX packet: 0x%X \n",
|
| - (A_UINT32)pPacket));
|
| + AR_DEBUG_PRINTF(ATH_DEBUG_SEND, (" Indicating overflowed TX packet: 0x%lX \n",
|
| + (unsigned long)pPacket));
|
| if (pEndpoint->EpCallBacks.EpSendFull(pEndpoint->EpCallBacks.pContext,
|
| pPacket) == HTC_SEND_FULL_DROP) {
|
| /* callback wants the packet dropped */
|
| @@ -670,8 +674,8 @@ A_STATUS HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
|
| HTC_ENDPOINT *pEndpoint;
|
| HTC_PACKET *pPacket;
|
|
|
| - AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCSendPktsMultiple: Queue: 0x%X, Pkts %d \n",
|
| - (A_UINT32)pPktQueue, HTC_PACKET_QUEUE_DEPTH(pPktQueue)));
|
| + AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCSendPktsMultiple: Queue: 0x%lX, Pkts %d \n",
|
| + (unsigned long)pPktQueue, HTC_PACKET_QUEUE_DEPTH(pPktQueue)));
|
|
|
| /* get packet at head to figure out which endpoint these packets will go into */
|
| pPacket = HTC_GET_PKT_AT_HEAD(pPktQueue);
|
| @@ -710,8 +714,8 @@ A_STATUS HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket)
|
| HTC_PACKET_QUEUE queue;
|
|
|
| AR_DEBUG_PRINTF(ATH_DEBUG_SEND,
|
| - ("+-HTCSendPkt: Enter endPointId: %d, buffer: 0x%X, length: %d \n",
|
| - pPacket->Endpoint, (A_UINT32)pPacket->pBuffer, pPacket->ActualLength));
|
| + ("+-HTCSendPkt: Enter endPointId: %d, buffer: 0x%lX, length: %d \n",
|
| + pPacket->Endpoint, (unsigned long)pPacket->pBuffer, pPacket->ActualLength));
|
| INIT_HTC_PACKET_QUEUE_AND_ADD(&queue,pPacket);
|
| return HTCSendPktsMultiple(HTCHandle, &queue);
|
| }
|
| @@ -867,8 +871,8 @@ static void HTCFlushEndpointTX(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_
|
| break;
|
| }
|
| pPacket->Status = A_ECANCELED;
|
| - AR_DEBUG_PRINTF(ATH_DEBUG_TRC, (" Flushing TX packet:0x%X, length:%d, ep:%d tag:0x%X \n",
|
| - (A_UINT32)pPacket, pPacket->ActualLength, pPacket->Endpoint, pPacket->PktInfo.AsTx.Tag));
|
| + AR_DEBUG_PRINTF(ATH_DEBUG_TRC, (" Flushing TX packet:0x%lX, length:%d, ep:%d tag:0x%X \n",
|
| + (unsigned long)pPacket, pPacket->ActualLength, pPacket->Endpoint, pPacket->PktInfo.AsTx.Tag));
|
| INIT_HTC_PACKET_QUEUE_AND_ADD(&container,pPacket);
|
| DO_EP_TX_COMPLETION(pEndpoint,&container);
|
| }
|
| @@ -879,8 +883,8 @@ void DumpCreditDist(HTC_ENDPOINT_CREDIT_DIST *pEPDist)
|
| {
|
| AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("--- EP : %d ServiceID: 0x%X --------------\n",
|
| pEPDist->Endpoint, pEPDist->ServiceID));
|
| - AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" this:0x%X next:0x%X prev:0x%X\n",
|
| - (A_UINT32)pEPDist, (A_UINT32)pEPDist->pNext, (A_UINT32)pEPDist->pPrev));
|
| + AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" this:0x%lX next:0x%lX prev:0x%lX\n",
|
| + (unsigned long)pEPDist, (unsigned long)pEPDist->pNext, (unsigned long)pEPDist->pPrev));
|
| AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" DistFlags : 0x%X \n", pEPDist->DistFlags));
|
| AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" TxCreditsNorm : %d \n", pEPDist->TxCreditsNorm));
|
| AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" TxCreditsMin : %d \n", pEPDist->TxCreditsMin));
|
|
|